Search code examples
c++mfcmfc-feature-pack

Can I remove the caption in a CDockablePane


I'm porting a MFC application to use the Ribbon UI and MFC feature pack and would like to have a docked horizontal pane that does not include a caption. I'd hope that something like

MyPane.ModifyStyle(WS_CAPTION, 0);
m_pParentFrame->RecalcLayout();

would work, but no joy. FWIW, the docking pane is hosting a wide horizontal dialog docked under the main view and the caption wastes more desktop real estate than I'd like to give away.

Edit: Further googling found a possible solution here: http://www.sibisa.com/remove-hide-title-bar-board-cdockablepane-window/

Edit2: EnableGripper(FALSE) was what was needed, see https://msdn.microsoft.com/en-us/library/bb984118.aspx


Solution

  • Calling EnableGripper(FALSE) removes the caption.