Hi,all.  i have a question about hotkey.

i have use the RegisterHotKey created a hotkey
just like this:

invoke RegisterHotKey,hWnd,1,MOD_ALT,053h
....
.....
.....
.ELSEIF uMsg==WM_HOTKEY
invoke SendMessage,hWnd,WM_COMMAND,??,??     

;What to do to let it realize the function of button that I have already defined? What should i fill in the wParam and lParam.

Is it SendMessage Function works?
Posted on 2005-08-14 12:39:53 by Abuseyourdna
Well, it depends on what you want to do. First off, you should use PostMessage and not SendMessage because you do not want the callback to wait until it gets a response from itself. For hot keys I generally give them the ID of the button or menu item I want them to mimic so the WM_COMMAND would look like this..

cmp D, WM_HOTKEY
jne >.NextMsg
invoke PostMessage, , WM_COMMAND, , 0
Posted on 2005-08-14 13:05:54 by donkey
thx,i get it !!

Posted on 2005-08-14 13:20:53 by Abuseyourdna
i have another question.

when i use the HOTKEY "ALT+S"
it also active the menu what i dont want to see.


is it any way to solve it?
Posted on 2005-08-14 13:31:34 by Abuseyourdna
when you put "&" char before a letter from menu item name it automatically gets
the hotkey <alt + letter> it is used for menu navigation with keyboard
example <alt+f+x> is exit in most programs.

solution: either change ALT to other extended key (CTRL)
or delete & sign before the letter in your menu
or move the & sign to different letter
&Something
S&omething




Posted on 2005-08-14 15:37:37 by drizz