Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- M E W E L - <b>load functions take lpstr as id's</b> http://www.X-Hacker.org [<<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()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson