smichaud
smichaud

Reputation: 326

Add a button to MFC CDockingPane titlebar

Anyone knows how to add a button to the titlebar of a CDockablePane ? I tried the usual way with CDialog but it does not work for CDockablePane...

Thanks

Upvotes: 2

Views: 2379

Answers (1)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 263137

You need to create an instance of CMFCCaptionButton, then use the protected but undocumented m_arrButtons member of the CDockablePane class:

yourDockablePane.m_arrButtons.Add(new CMFCCaptionButton(YOURCOMMANDID));

Upvotes: 2

Related Questions