Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Customization of Popup Menu from the Gripper of CExtDynamicControlBar Collapse All
Subject Author Date
Chun Pong Lau Oct 1, 2006 - 6:09 PM

Hello dear support team,

When I right click on the gripper of a CExtDyanmicControlBar, there will be a popup (context) menu showing up.

1) How can I disable this feature?

2) How can I customize the items of this popup menu? In other words, instead of "floating", "dockable", "tabbed document", "auto-hide" and "hide", how can I use some other items, e.g. "move left", "move right" and "close"?

Thanks in advance,
Alan

Technical Support Oct 2, 2006 - 11:25 AM

You should use a CExtDynamicControlBar-derived class and override the CExtDynamicControlBar::OnInitDbsMenu() virtual method in it. Invoke the parent class’s method and modify the menu created by default. you can also create your own custom menu from scratch.

Chun Pong Lau Oct 2, 2006 - 6:50 PM

Thank you for your response. After I tried to follow your instructions and disabled the popup the by the overiding the following method:

bool CMyExtDynamicControlBar::OnInitDbsMenu(CExtPopupMenuWnd * pPopup, HWND hWndTrack, CObject * pHelperSrc, LPARAM lParamHelper){
return true;
}

When I right-click the program, the popup menu does not appear (thank you) but when I close the program, it crashed at, according to the debug mode,

    !CExtHookSink::HookChains_t::HookChainsWindowProc() + 0x6d bytes    C++
    !CExtHookSink::HookChains_t::g_HookWndProc() + 0x67 bytes    C++

Is there any method to avoid this annoying shutdown crashing problem?

Thanks in advance,
Alan

Technical Support Oct 3, 2006 - 2:37 AM

This leak typically occurs only if you terminate your application with PostQuitMessage() or ExitThread(). It does not occur in our sample projects even if we override the CMyExtDynamicControlBar::OnInitDbsMenu() virtual method as you do it. We can look at your project and find out what’s wrong.