|
|
Comments and Discussions
|
|
 |

|
BCMenu cMenu;
BCMenu cPopUp;
int i=1000;
cMenu.CreatePopupMenu();
cMenu.AppendMenu(MF_STRING, i++, "Test 1");
cMenu.AppendMenu(MF_STRING|MF_CHECKED, i++, "Test 2");
cPopUp.CreatePopupMenu();
cMenu.AppendMenu(MF_POPUP,(UINT)cPopUp.GetSafeHmenu(),"PopUp");
cPopUp.AppendMenu(MF_STRING,i++,"Test 4");
cPopUp.AppendMenu(MF_STRING,i++,"Test 5");
//cPopUp.Detach(); if not comment crash in other function
CRect rect;
GetDlgItem(IDC_BUTTON1)->GetClientRect(&rect);
ClientToScreen(&rect);
cMenu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON ,
rect.left,rect.bottom,this);
cMenu.DestroyMenu();
/*
if "cPopUp.Detach();" is comment crash in "BOOL BCMenu::DestroyMenu()"
if "cPopUp.Detach();" is not comment crash in "void BCMenu::SynchronizeMenu(void)"
*/
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This class implements an owner drawn menu class that mimics the menu style used in XP, Office and Visual C++
| Type | Article |
| Licence | CPOL |
| First Posted | 18 Nov 1999 |
| Views | 758,253 |
| Downloads | 13,613 |
| Bookmarked | 263 times |
|
|