|
|
|
|
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 |
|
Adrian M
|
May 27, 2005 - 12:35 AM
|
I implemented the method OnNcAreaButtonsReinitialize in my CExtControlBar derived class and I got rid of the ’x’ in the title bar. My application has several control bars, none of which individually has the ’x’ any more. However, when I combine several control bars into one tabbed control bar, the ’x’ becomes visible again, and the control bars can be closed. This poses a big issue, as my app doesn’t provide a way to reopen the control bars, other than by deleting the keys in the registry. How do I ensure that the ’x’ never appears in the title bar, even in this case of tabbed control bars? Thanks, Adrian
|
|
Technical Support
|
May 30, 2005 - 9:41 AM
|
The tabbed control bar container is a newly/dynamically created resizable control bar which keeps both docked CExtControlBar windows and the CExtTabWnd tab control. This tabbed container is implemented as the CExtDynTabControlBar class. To hide the Close or X button, create a CExtDynTabControlBar -derived class and override the OnNcAreaButtonsReinitialize() virtual method similar to as you already did this in your CExtControlBar -derived class. To use your tabbed control bar container in Prof-UIS, add a message handler for the CExtControlBar::g_nMsgCreateTabbedBar registered windows message:// declaration in the header file
afx_msg LRESULT OnMsgCreateTabbedBar(
WPARAM wParam,
LPARAM lParam
);
// message map entry
ON_REGISTERED_MESSAGE(
CExtControlBar::g_nMsgCreateTabbedBar,
OnMsgCreateTabbedBar
)
// implementation
LRESULT CMainFrame::OnMsgCreateTabbedBar(
WPARAM wParam, LPARAM lParam )
{
CExtDynTabControlBar ** ppTabbedBar =
(CExtDynTabControlBar **)wParam;
ASSERT( ppTabbedBar != NULL );
(*ppTabbedBar) =
new C_YOUR_DynTabControlBar;
return 0;
}
|
|