Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-24 Thread Lance Vorgin
-- [ Picked text/plain from multipart/alternative ] All sorts of ways to hook WndProc. Easiest way would be to subclass HL2's window - SetWindowLong GWL_WNDPROC the window to your own func. You could use SetWindowsHookEx WH_CALLWNDPROC, but that's huge and wasteful. You could also IAT hook

Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-24 Thread Aditya Gaddam
Thats a cool idea lance for getting messages lance, thanks. I am currently widening the string using: wchar_t *wSong = (wchar_t *)malloc(sizeof(wchar_t)); mbstowcs(wSong, currentSongInfo.FullPath, strlen(currentSongInfo.FullPath)); LPCWSTR lpcwstr_SongName = (LPCWSTR)wSong; Anything wrong

Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-24 Thread Lance Vorgin
-- [ Picked text/plain from multipart/alternative ] I can't hardly see straight, but I believe you forget to make room for the null terminator :P Try this crap: int iLen = strlen(lpcSong) + 1; WCHAR* lpwcSong = new WCHAR[iLen + 1]; //yay paranoia memset(lpwcSong, 0, (iLen + 1));

Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-24 Thread Aditya Gaddam
Thanks Lance, That did the trick! Damn null terminators... On 9/24/05, Lance Vorgin [EMAIL PROTECTED] wrote: -- [ Picked text/plain from multipart/alternative ] I can't hardly see straight, but I believe you forget to make room for the null terminator :P Try this crap: int iLen =

Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-23 Thread Andrew (British_Bomber)
-- [ Picked text/plain from multipart/alternative ] I was originally using Fmod for my mp3 player, before I stopped working on it. One of the guys at Valve was talking about working on an example such as an mp3 player so I stopped working with FMod and just decided to wait on that, but it has yet

RE: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-23 Thread Ian Warwick
I doubt you would be able to handle WndProc messages, this would all be done by the engine but I could be wrong. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aditya Gaddam Sent: 23 September 2005 02:03 To: hlcoders@list.valvesoftware.com Subject:

Re: [hlcoders] Accessing WndProc in HL2 SDK?

2005-09-23 Thread Aditya Gaddam
well, it seems like event handling is not my only problem. I followed the MSDN article to playing mp3s with DirectShow, but it doesn't seem like the conversion for LPCWSTR works so well. I can get the list of files in a directory fine, but as soon as I try to play the file, HL2 just crashes. It