Pregunta

I have a CPaneDialog which uses a dialog resource to show two graphics. One graphic is left justified and the other right justified. I always want that pane to be at the top of the main window below the menu bar. I want it to always be there, and don't want the user to be able to move it or remove it.

Is there a style I can set upon creation of the CPaneDialog that will not place the "pin" or "close" buttons in the pane?

I'm also looking for alternate approaches. I've looked into just using a CWnd, but I'm unclear how to force the other dockable windows to be consider the height of the windows in their initial positioning.

Suggestions?

¿Fue útil?

Solución

You can override CDockablePane::OnBeforeFloat and return FALSE to stop the pane from being detached. To then remove the buttons just call the protected method CDockablePane::RemoveCaptionButtons.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top