문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top