CMainFrame mainFrame; if (!mainFrame.CreateEx(WS_EX_CLIENTEDGE, NULL, NULL, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL)) { // error handling }
CMainFrame mainFrame; if (!mainFrame.CreateEx(0, "My Application", "My Custom Main Frame", WS_OVERLAPPEDWINDOW, 100, 100, 800, 600, NULL, NULL, NULL)) { // error handling }
CMainFrame mainFrame; if (!mainFrame.CreateEx(WS_EX_TOOLWINDOW, NULL, NULL, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, 0, 0, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, NULL)) { // error handling }This example creates a main frame window with a different window class style by specifying the WS_EX_TOOLWINDOW style. Package library: MFC