Hi,
Default menuitem is often displayed as bold text, and I want my popup menu do so too, but I don't find information about it.
Is it some resource statement like MENUITEM, or is is done via code?
Best regards, Sami
Default menuitem is often displayed as bold text, and I want my popup menu do so too, but I don't find information about it.
Is it some resource statement like MENUITEM, or is is done via code?
Best regards, Sami
You need to use SetMenuItemInfo. With the MENUITEMINFO structure, the fState member should be MFS_DEFAULT which will make it bold. But you can only have one menuitem set to MFS_DEFAULT.
Otherwise you can use SetMenuDefaultItem (and GetMenuDefaultItem if you need to know which item is the default one)
This API only show the item in bold font, you need to handle by yourself the double-click action.
BOOL SetMenuDefaultItem(
HMENU hMenu,
UINT uItem,
UINT fByPos
);
This API only show the item in bold font, you need to handle by yourself the double-click action.
you can download "arretdezindows" on my site if you want some help, but that's exactly what it is already said.
It's a popupmenu, when you select an item, it set another one as default, and then when you dblclick on the trayicon, it executes a specific command...
--><--www.vombonjour.fr.st
Hope this will help.
Note that the code is uncommented (I'm sorry for that), it's quite not well written (test lines as comment, well, you'll understand)
It's a popupmenu, when you select an item, it set another one as default, and then when you dblclick on the trayicon, it executes a specific command...
--><--www.vombonjour.fr.st
Hope this will help.
Note that the code is uncommented (I'm sorry for that), it's quite not well written (test lines as comment, well, you'll understand)
Thank you guys!
I used SetMenuDefaultItem as LuHa said and it works, now I'm quite happy with my Network Neighborhood replacement for XP.
Thanks, Sami
I used SetMenuDefaultItem as LuHa said and it works, now I'm quite happy with my Network Neighborhood replacement for XP.
Thanks, Sami