PDA

Click to See Complete Forum and Search --> : resource files???


squirrelly1
Nov 19th, 2001, 06:35 PM
I have a menu in a resource file named simpmenu.rc

How do I use this resource file to impliment my menu in my program???


Any help would be appreciated!

THanx,

~Squirrelly1

CornedBee
Nov 20th, 2001, 08:54 AM
VC++ creates a resource.h file that you nee3d to include everywhere you want to use the menu. then there are two ways:

1) When initializing the WNDCLASS(EX) struct:
wc.szMenuName = MAKEINTRESOURCE(IDM_MYMENU);
IDM_MYMENU is whatever ID you assigned to your menu.

2)

HMENU hMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDM_MYMENU));
CreateWindow(..., hMenu, ...);