I'm trying to create a hotkey, but apparently I'm doing something wrong. I'm using (masm32) and using a dialog box with the following code:

Posted on 2002-05-31 19:28:36 by frihz
everything looks good. although make sure the handle your using in RegisterHotKey is the right one. to make a global hotkey, make your hotkey with the WM_SETHOTKEY message. for thread specific you just use the RegisterHotKey function.
Posted on 2002-06-01 00:02:44 by smurf
Well, I have the exact code in a small 'test' file, and can't get it to work. What do you mean by the right handle?

Is there any sample source I can download somewhere on the 'net (perhaps masm-specific) that uses hotkeys? I'm basically trying to make my app able to process some command (a messagebox or just anything really) once the user presses a corresponding key sequence (shift+z or something like that). I'd like to make it be available globally -- though right now I can't even set a hotkey for just my app :(

Posted on 2002-06-01 21:17:36 by frihz
is just made a little example. i used iczelions tutorial #10 source code and just added the hotkey so you have some extra crap in there. i dont ever use dialogs so i didnt write it up from scratch.
Posted on 2002-06-01 22:00:56 by smurf
Okay, thanks for the example -- but, the hotkey still isn't working. I'm using WinME (though I don't know if it matters or not) and when I try SHIFT+Z after I have opened your app, the messagebox isn't popping up.

What other ways are there of making something similar to a hotkey (perhaps a global) -- and preferably w/o the use of an external file (like having to add a dll or something) ?

Posted on 2002-06-02 12:44:56 by frihz
at this point i cant help you further. the only testing machine i have available has windows xp. im in the process of setting my alt computer up with multiple os'es mainly to use as a testing machine. gonna set it up with all the os'es: 95,98se,me,2k,xp but im looking around for windows 95 because i had thrown away my cd some time ago.
Posted on 2002-06-02 12:57:51 by smurf
Well, I guess I'll put aside my 'project' for a while. Thanks for your help anyway smurf :)

Posted on 2002-06-02 13:41:47 by frihz