[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Load functions take LPSTR as ID's
All of the various LoadXXX() functions have been made more compatible
with Microsoft Windows by accepting strings as resource identifiers in
addition to numeric identifiers.
The resource compiler has been enhanced to accept strings as identifiers
for all of the resources (except stringtable strings). This means that you
can have the following two variations :
#define ID_MENU 10
ID_MENU MENU
BEGIN
...
END
or
MyAppMenu MENU
BEGIN
...
END
The second argument to the LoadXXX() functions is now a LPSTR (a far
pointer to a string). This argument can be a string, or can be cast
to a far string by using the MAKEINTRESOURCE() macro. To load both
of the above menus, you can use the following code :
hMenu1 = LoadMenu(hMod, MAKEINTRESOURCE(ID_MENU), hWndMain);
hMenu2 = LoadMenu(hMod, "MyAppMenu", hWndMain);
The functions affected by this change are :
LoadDialog()
LoadMenu()
LoadPopupMenu()
LoadIcon()
LoadAccelerators()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson