Hi,
I've managed to get the pop up menu in my program
however now I have to set commands to make it do things when I click on them.
here is my code
Code:
case WM_MOUSEMOVE:
{
mouse_y = LOWORD(lParam);
mouse_x = HIWORD(lParam);
}
case WM_INITDIALOG:
{
hMenu = LoadMenu(GetModuleHandle(NULL),//Load Menu
MAKEINTRESOURCE(IDR_MENU2));
hMenu = GetSubMenu(hMenu,0);//Get Sub Menu
return 1;
}
case WM_RBUTTONDOWN:
{
point.x = LOWORD(lParam);//Get cursor Pos
point.y = HIWORD(lParam);
TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_RIGHTBUTTON,
point.x,point.y,NULL,hWnd,NULL);//Create popup
return 1;
}
case WM_LBUTTONDOWN:
{
case ID_COUCHCOLOR_RED:
{
couch couch2;
couch2.set_rgb(1.0, 0.0, 0.0);
couch2.draw();
}
}
the code works correctly when i right click but when I try to change the color it wouldn't work its WGL based program. I am trying to get the couch to change the color.
I am thinkin hard
Thx