|
|
|
|
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.
Subject |
Author |
Date |
|
Dave Kymlicka
|
Apr 4, 2005 - 8:10 PM
|
Following advice in Forum posts to control which buttons are displayed in CExtDynamicControlBar, I override CExtDynamicControlBar::OnNcAreaButtonsReinitialize().
However, if I tab-dock any control bars, the following method gets called, and creates buttons that I didn’t want. Can you suggest how I can get around this problem?
void CExtDynamicTabbedControlBar::OnNcAreaButtonsReinitialize() { ASSERT_VALID( this ); INT nCountOfNcButtons = NcButtons_GetCount(); if( nCountOfNcButtons > 0 ) return; NcButtons_Add( new CExtDynamicBarNcAreaButtonClose(this) ); NcButtons_Add( new CExtDynamicBarNcAreaButtonAutoHide(this) ); NcButtons_Add( new CExtDynamicBarNcAreaButtonMenu(this) ); }
Here’s a sample call-stack when I perform some code-driven tab-docking (as opposed to drag-n-drop), if it is of any use to you.
CExtDynamicTabbedControlBar::OnNcAreaButtonsReinitialize() line 4944 CExtControlBar::OnNcCalcSize(int 1, tagNCCALCSIZE_PARAMS * 0x0012ebe8) line 6753 + 22 bytes CExtDynTabControlBar::OnNcCalcSize(int 1, tagNCCALCSIZE_PARAMS * 0x0012ebe8) line 1177 CWnd::OnWndMsg(unsigned int 131, unsigned int 1, long 1240040, long * 0x0012e9e4) line 1950 CWnd::WindowProc(unsigned int 131, unsigned int 1, long 1240040) line 1585 + 30 bytes CControlBar::WindowProc(unsigned int 131, unsigned int 1, long 1240040) line 480 + 20 bytes CExtControlBar::WindowProc(unsigned int 131, unsigned int 1, long 1240040) line 6043 AfxCallWndProc(CWnd * 0x01fe2f70, HWND__ * 0x003107f8, unsigned int 131, unsigned int 1, long 1240040) line 215 + 26 bytes AfxWndProc(HWND__ * 0x003107f8, unsigned int 131, unsigned int 1, long 1240040) line 368 AfxWndProcBase(HWND__ * 0x003107f8, unsigned int 131, unsigned int 1, long 1240040) line 220 + 21 bytes USER32! 77e11ef0() USER32! 77e13869() USER32! 77e1677c() NTDLL! 77f9ff57() CExtControlBar::DockControlBarIntoTabbedContainer(CExtControlBar * 0x01fd1d10 {CToolWnd hWnd=???}, int -1, CFrameWnd * 0x01fb77d8 {CMainFrame hWnd=???}, unsigned char 1) line 15824
|
|
Dave Kymlicka
|
Apr 4, 2005 - 8:24 PM
|
Perhaps I should also mention: the unwanted buttons go away once the affected control bars are no longer tab-docked.
|
|
Technical Support
|
Apr 6, 2005 - 2:52 AM
|
To get control over the caption buttons in tabbed bar containers, you need to make Prof-UIS using your own CExtDynamicTabbedControlBar -derived class which should manage its buttons. This class is also kind of CExtControlBar . Just override the CExtDynamicBarSite::OnDbsCreateTabbedBarInstance() virtual method and return an instance of your tabbed bar container:
CExtDynamicTabbedControlBar *
CMainFrame::OnDbsCreateTabbedBarInstance() const
{
ASSERT( this != NULL );
CExtDynamicTabbedControlBar * pBar =
new C_YOUR_DynamicTabbedControlBar;
return pBar;
} This method has been added to the new implementation of the CExtDynamicBarSite class, which we sent you be e-mail.
|
|