![]() |
MFC C++ Dialog-based right click SubMenu Issue |
Post Reply ![]() |
Author | |
SubDrag ![]() Groupie ![]() Joined: 19 December 2014 Location: United States Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() Posted: 19 December 2014 at 10:55pm |
I'm using the latest Skin framework for MFC C++ VS 2008 in a dialog-based application. It works great, except for right click submenus. Instead of showing the menu, it just shows a little button. This happens on all themes, cjstyles or msstyles. It happens in a CMenu, TrackPopupMenu call. What do I do to fix this? http://gyazo.com/4deb0b885df1607bc05f9bdbfd22e5fa
|
|
![]() |
|
SubDrag ![]() Groupie ![]() Joined: 19 December 2014 Location: United States Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
I have an update to the problem - it only happens on submenus that are not statically defined but added on the fly before showing.
I have recreated it in the test Skin Controls app. void CSkinControlsDlg::OnToolbarDropDown(NMHDR* /*pNotifyStruct*/, LRESULT* /*result*/ ) { RECT rc; m_wndToolBar.GetItemRect(1, &rc); m_wndToolBar.ClientToScreen(&rc); CMenu menu; menu.LoadMenu(IDR_MENU_POPUP); UINT startBitFlags = 10000; CMenu tempMenu1Main; tempMenu1Main.CreatePopupMenu(); CMenu* menuLoaded = menu.GetSubMenu(0); for (int y = 0; y < 50; y+=50) { CMenu tempSubMenu1; tempSubMenu1.CreatePopupMenu(); for (int x = 0; x < 50; x=x++) { CString tempStr; tempStr.Format("Item %04X", x+y); tempSubMenu1.AppendMenu(MF_STRING | MF_ENABLED, (startBitFlags+x+y), "Item"); } tempMenu1Main.InsertMenu(y/50, MF_BYPOSITION | MF_POPUP, (UINT_PTR)tempSubMenu1.m_hMenu, "SubMenu"); } CString csMnuText; menuLoaded->GetMenuString(2, csMnuText, MF_BYPOSITION); menuLoaded->DeleteMenu(2, MF_BYPOSITION); //delete old popup menuLoaded->InsertMenu(2, MF_BYPOSITION | MF_POPUP, (UINT_PTR)tempMenu1Main.m_hMenu, csMnuText); TrackPopupMenu(menuLoaded->GetSafeHmenu(), 0, rc.left, rc.bottom, 0, m_hWnd, 0); } It seems the predefined submenus are working, but not these - it does work without loading any skins. This is done, then the menu is shown. It works without code jock skinning. There must be a way to fix this. Also, when I tried to just disable popup menus just as a test using SetApplyOptions (1 | 2 | 4)...the popup menus reverted fine...but the main menu didn't work at all.
|
|
![]() |
|
mcmastl ![]() Admin Group ![]() ![]() Joined: 14 April 2015 Status: Offline Points: 79 |
![]() ![]() ![]() ![]() ![]() |
We have informed our development team of the issue and will be looking into it. Thank you for bringing this to our attention. If the issue has been resolved please let us know.
|
|
Luke McMasters, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
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 |