user25749
user25749

Reputation: 4905

How to get a CView based Windows that do not contain title bar and status bar

I am writing MFC application, I choose CView based application other then Dialog based application. I don't know how to remove title bar and status bar, is there any method to do this? And made a CView based application just like dialog based application ? Many thanks!

Upvotes: 1

Views: 570

Answers (1)

Roel
Roel

Reputation: 19642

Status bar can be removed by deleting all references to the CStatusBar member in your MainFrm class.

Title bar, what do you mean - the menu, the toolbar or the caption bar? First two you remove by commenting out the relevant parts in OnCreate() of CMainFrm, the last one I'm not 100% but I think you can do it by modifying cs.style in PreCreateWindow of your CMainFrm. Set the style to WS_DLGFRAME, that should work I think.

Upvotes: 1

Related Questions