
July 4th, 2002, 06:03 AM
|
|
Designer
|
|
Join Date: Jan 2002
Location: Netherlands
Posts: 104
Time spent in forums: 3 h 22 m 16 sec
Reputation Power: 7
|
|
|
Borland C++ 5 Popup menu
Lo I want to create a popup menu on left click I got the left click I also got the hmenu defined my problem is with the getsubmenu wich returns NULL
Here is the initialisation code:
Code:
switch (iMsg) {
case WM_CREATE :
SetInternational();
hMenu = LoadMenu (hInst, MAKEINTRESOURCE(MENU_1) );
// if (LoadMenu (hInst, MAKEINTRESOURCE(MENU_1)) == NULL) { MessageBox (hwnd, "Doet het niet :(", szAppName, MB_ICONINFORMATION | MB_OK); }
hMenu = GetSubMenu(hMenu, 0);
if (GetSubMenu(hMenu, 0) == NULL) { MessageBox (hwnd, "It doesn't work :(", szAppName, MB_ICONINFORMATION | MB_OK); }
return 0 switch (iMsg) {
case WM_CREATE :
SetInternational();
hMenu = LoadMenu (hInst, MAKEINTRESOURCE(MENU_1) );
// if (LoadMenu (hInst, MAKEINTRESOURCE(MENU_1)) == NULL) { MessageBox (hwnd, "It doesn't work :(", szAppName, MB_ICONINFORMATION | MB_OK); }
hMenu = GetSubMenu(hMenu, 0);
if (GetSubMenu(hMenu, 0) == NULL) { MessageBox (hwnd, "It doesn't work:(", szAppName, MB_ICONINFORMATION | MB_OK); }
return 0;
My problem is the second if It returns NULL instead of the menu handler... Any takers?
Using (like I said) Borland 5.0
|