Dont let toolbar hide in customize dialog |
Post Reply |
Author | |
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
Posted: 11 May 2004 at 9:21pm |
When I set pToolBar->SetContextMenuPresent(FALSE); the purpose as far as I can tell is so that you can't right click and hide the toolbar. I have a toolbar (thats on a docking pane) that I don't want hidable, movable, or anything. All is fine except that you can right click other toolbars and pick Customize and uncheck the box and cause the toolbar to be hidden. I added void SetCustomizeHidable(BOOL bHidable); just under SetContextMenuPresent in XTPToolBar.h and then AFX_INLINE void CXTPToolBar::SetCustomizeHidable(BOOL bHidable) { m_bCustomizeHidable = bHidable; } in the same file under the inline for SetContextMenuPresent Then, in XTPCommandBar.h I added the line BOOL m_bCustomizeHidable; // TRUE if the command bar is able to be hidden via customize dialog Just under the BOOL m_bContextMenuPresent And also m_bCustomizeHidable = TRUE; in the CXTPCommandBar constructor in XTPCommandBar.cpp Finally, I changed the line in XTPCustomizeToolbarsPage.cpp inside of CXTPCustomizeToolbarsPage::OnChkChange from if (pToolBar->GetType() == xtpBarTypeMenuBar) to if (pToolBar->GetType() == xtpBarTypeMenuBar || !pToolBar->m_bCustomizeHidable) and now I can easily call pToolBar->SetCustomizeHidable(FALSE); and have this toolbar not be uncheckable, but still be customizeable. Please add this or something similar to future versions... Edited by Ark42 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Thank you for good suggestion. added in source too.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
IsCloseable/SetCloseable methods added
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Ark42
Senior Member Joined: 20 October 2003 Status: Offline Points: 291 |
Post Options
Thanks(0)
|
I just tried this SetClosable but the toolbar still shows up in the toolbar list (view -> toolbars) and lets you close/add it from there. I think it should be removed from that list together, just like it is from the right-click list of toolbars. |
|
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 |