![]() |
Context menu on gallery item |
Post Reply ![]() |
Author | |
ssejud ![]() Newbie ![]() Joined: 09 March 2012 Location: Poland Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() Posted: 09 March 2012 at 5:37am |
I need to show context menu when clicked on gallery item. I overrided method OnRButtonUp and show context menu then, but, when user clicks on menu item which is outside gallery popup area, gallery disappears, and i want to prevent that.
my code: BOOL MyGallery::OnRButtonUp(CPoint point) { CMenu menu; menu.CreatePopupMenu(); // Here I add some menu items. CPoint cursor; GetCursorPos(&cursor); UINT returnValue = (UINT)menu.TrackPopupMenu( TPM_RETURNCMD|TPM_LEFTBUTTON|TPM_NONOTIFY, cursor.x, cursor.y, AfxGetMainWnd() ); // Here I process menu choice. return TRUE; } How to prevent closing gallery when clicked outside it while context menu is shown?
|
|
![]() |
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 |