Show PopUp Menu? Help!! |
Post Reply |
Author | |
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Posted: 30 December 2003 at 1:20am |
If you don't have MainFrame in you application, try to call CXTPPaintManager::SetTheme(xtpThemeOfficeXP); in the dialog::OnInitDialog |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
softz
Newbie Joined: 29 December 2003 Location: Singapore Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Hi! I'm trying to pop-up a dynamic menu from my dialog through CXTPCommandBars::TrackPopupMenu(). The following is my code. /// --- CXTMenu popupMenu; popupMenu.CreatePopupMenu(); for(int i = 0; i < 5; i++) { CMenu subMenu; subMenu.CreatePopupMenu(); subMenu.AppendMenu(MF_STRING, ID_LOGIN + i, "Login"); subMenu.AppendMenu(MF_SEPARATOR); subMenu.AppendMenu(MF_STRING, ID_AUTOIN + i, "Auto In"); subMenu.AppendMenu(MF_STRING, ID_MANUALIN + i, "Manual In"); subMenu.AppendMenu(MF_STRING, ID_AFTERCALLWORK + i, "AfterCall Work"); subMenu.AppendMenu(MF_SEPARATOR); subMenu.AppendMenu(MF_STRING, ID_LOGOUT + i, "Logout"); CString str; str.Format("User%d", i); popupMenu.AppendMenu(MF_POPUP, (UINT_PTR)subMenu.m_hMenu, str); } TRACE("GetMenuItemCount: %d\n", popupMenu.GetMenuItemCount()); CXTPCommandBars::TrackPopupMenu(&popupMenu, 0, 10, 10, this); /// -- I can't display the menu which I originally wanted through Codejock's CXTPCommandBars. However, it works fine with Win32API. Can anyone help me on this. By the way, "this" is a pointer to my dialog.
Regards, Eric |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |