skip to main
|
skip to sidebar
Win32 Tips
Tuesday, March 24, 2009
Attach Menu to Dialog-based Application
1. Create menu resource MYMENU.
2. Use the following code in response to the WM_INITDIALOG message
HMENU hMenu = LoadMenu(hInst, MAKEINTRESOURCE(MYMENU));
SetMenu( hwnd,hMenu);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Popular Posts
Retrieve Menu Item Text with GetMenuItemInfo function
MENUITEMINFO MenuItem; HMENU hmenu, hsubmenu; HWND hwnd; //handle to main window char szString[256]; int countLast =0; //Initialize MENUITEM...
How to Trap Enter key on Edit Box
In order to trap the keypress you'll need to subclass the edit window. Here's how to do it. First, you'll need to store the or...
Set Foreground Color to an Individual Edit Box or Static Control
If you have several edit boxes but want to set color to one of them only, capture the WM_CTLCOLOREDIT message and get the handle to that ed...
Use Bold or Underlined Font
1. Define a static HFONT variable: static HFONT hFont; 2. In the response to the WM_INITDIALOG message, create a font with desired features,...
Blog Archive
►
2011
(1)
►
May
(1)
▼
2009
(16)
▼
March
(16)
Make Sure Only One Instance of the Application Is ...
How to Launch Internet Properties Control Applet
Measure Time In Milliseconds
Measure Time In Milliseconds
Retrieve Menu Item Text with GetMenuItemInfo function
Use Bold or Underlined Font
Enable a Button Depending On Whether There is Any ...
Set Foreground Color to an Individual Edit Box or ...
How to Get a Handle to a Control
Create A Combo Box on a Toolbar
Create Toolbar Tips
How to Trap Enter key on Edit Box
Display Last Error
Attach Menu to Dialog-based Application
Retrieving the Path of the Running Application
Attach Icon to the Title bar of Dialog-based Appl...
About Me
Erik K.
Toronto, Ontario, Canada
View my complete profile
No comments:
Post a Comment