Professional UI Solutions
Site Map   /  Register


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 » CExtBarButton::SetSeparatedDropDown Event Collapse All
Subject Author Date
John Ritzenthaler Oct 29, 2009 - 5:00 PM

I wish to display a special dialog when the drop-down button is pressed (not a menu).  Is there any way to just get a message?

John Ritzenthaler Oct 30, 2009 - 5:47 PM

This is CExtBarButton in the toolbar, not CExtButton

Technical Support Oct 31, 2009 - 1:43 PM

Please create your CExtBarButton-derived class which implements the CExtBarButton::GetSeparatedDropDown(), CExtBarButton::IsAbleToTrackMenu() and CExtBarButton::OnTrackPopup() virtual methods. First two methods should simply return true flag. Last method should display dialog instead of tracking popup menu. The CExtToolControlBar::OnCreateBarCommandBtn() method creates instances of toolbar buttons. You can override it for instantiating your toolbar button objects for particular command identifiers.

John Ritzenthaler Oct 30, 2009 - 10:39 AM

I tried capturing the g_nMsgPrepareMenu command and setting m_bMenuCanceled but that results in an exception thrown at line 4219 of ExtToolControlBar.cpp when pPopup is deleted.  The hWnd for pPopup is 0xfeeefeee

(I’m on 2.83)

Technical Support Oct 30, 2009 - 2:29 PM

Please override the CExtButton::_IsMenuAvail() virtual method and simply return true from it. The override the CExtButton::_OnTrackPopup() virtual method and display dialog in it.

John Ritzenthaler Oct 31, 2009 - 7:06 AM

This is CExtBarButton in the toolbar, not CExtButton