Error in DockingDemo |
Post Reply |
Author | |
Gian
Newbie Joined: 29 June 2004 Location: Italy Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 01 July 2004 at 6:49am |
i've tried to add a ON_WM_RBUTTONDOWN() event function to display a
popup menu in the TreeCtrl controls (CTabClassTree) when the
right mouse button is pressed.
The function is CPoint pt = point; ClientToScreen(&pt); CXTMenu menu; VERIFY(menu.LoadMenu(IDR_POPUP)); CXTMenu* pPopup = menu.GetSubMenu(0); pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, this); IDR_POPUP is a simple menu with ID_EDIT_COPY, ID_EDIT_CUT, ID_EDIT_PASTE when the menu is displayed the icons of Copy Cut Paste are not visible. Only changing the CWnd owner parameter in the TrackPopupMenu call to CFrameWnd the icons are loaded. In a program of mine i need to show the icons but also link the menu item selection to some functions in the TreeCtrl class, so i cant make CFrameWnd the owner. How i can fix this? Thanks |
|
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 |