Question 1: in the MDI window, hope to get rid of the child window icon, but keep the "maximum, minimum, close" button
Try to use the following statement:
BOOL CChildFrame: : PreCreateWindow (CREATESTRUCT& Cs)
{
Cs) style=cs) style & amp; ~ WS_SYSMENU;//the new statement
Return CMDIChildWnd: : PreCreateWindow (cs);
}
Though the window icon to remove, but the "maximum, minimum, close" button disappears, run results as shown in the figure below, how in removing child window icon at the same time, keep the "maximum, minimum, close" button?
Question 2: why is the window to maximize, the title of the main window will add the title of the child window, how to block the MFC default function?
Maximize window before, the main window title didn't add the title of the child window
But after maximization, the title of the main window with the title of the child window
CodePudding user response:
Now that is a beginner, don't change the framework elements, learn how to learn framework work1. Where are you going to rewrite the CChildFrame OnNcPaint
2. The document title to the main window is not MFC mechanism, is more than MDI document window mechanism