I. After creating MFC, the window displays untitled-project name
Modify the method on the Internet to see a few, the following is a relatively simple:
1. Find this function in the mianframe.c file BOOL CMainFrame::P Recreatewindow (createstruct& CS)
2. Add such a sentence to the function to modify the title name
M_strtitle = "My title v1.0";
3. Add the following code to the function to remove the words without headings
Cs.style &= ~fws_addtotitle;//Prevent MFC from adding a document name on the window title bar
Return CFrameWnd::P Recreatewindow (CS);
Two. window display position and whether to maximize
1. This function is also found in the mianframe.c file BOOL CMainFrame::P Recreatewindow (createstruct& CS)
2. Add the following code to maximize the window display
cs.x=cs.y=0; In the upper-left corner of the screen
Cs.cx=getsystemmetrics (sm_cxmaximized); Maximize and display the status bar
Cs.cy=getsystemmetrics (sm_cymaximized);
Cs.style &= ~fws_addtotitle;//Prevent MFC from adding a document name on the window title bar
Return CFrameWnd::P Recreatewindow (CS);
two. Modify the Execute file icon
Locate the Res folder in the project file to change the icon of the original project filename to create a good one for you. But to convert to an ICO file.
MFC modifies window untitled and header information, modifies the Execute file icon