flat assembler
Message board for the users of flat assembler.

Index > Windows > System menu modification in assembler

Author
Thread Post new topic Reply to topic
Gomer73



Joined: 29 Nov 2003
Posts: 151
Gomer73 06 Dec 2003, 22:10
I am using the following code to add my menu item to the system menu(The menu you get when you right click on application icon on the task bar):

invoke GetSystemMenu,[hwnd],FALSE
push eax
invoke InsertMenu,eax,0,MF_BYPOSITION+MF_SEPARATOR,0,0
pop eax
invoke InsertMenu,eax,0,MF_BYPOSITION,IDM_FONT,"Choose &Font"

When I call this functions in C++, it underscores the F so that you can use it as a hotkey. The hot key functions and selects the option when I hit F, but it isn't underscored.

Anybody know why this might be the case?
Post 06 Dec 2003, 22:10
View user's profile Send private message Reply with quote
LiuGuoHua(Chinese)



Joined: 26 Sep 2003
Posts: 25
LiuGuoHua(Chinese) 05 Jan 2004, 05:01
I think the reason may be that you haven't used the function TranslateAccelerators() in your message loop. So the hot key could not be
translated to WM_COMMAND message .
Post 05 Jan 2004, 05:01
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 05 Jan 2004, 23:03
Other option would be to check if your Windows settings are still the same. Some versions have an option sth. like this:
"Underline hotkeys when I hit Alt"
If you have noticed that pushing Alt+F in a window, the underscores just appear AFTER you have hit the Alt key.
Post 05 Jan 2004, 23:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.