// // FUNCTION: InitMainWindowInstance(HINSTANCE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // HWND InitMainWindowInstance( HINSTANCE hInstance, int nCmdShow, PTCHAR szWindowClass, PTCHAR szTitle) { hInst = hInstance; // Store instance handle in our global variable beginMainWindowCreationTime.Now(); // Should make window size be data driven mainWindowHandle = CreateWindowEx(WS_EX_OVERLAPPEDWINDOW | WS_EX_CLIENTEDGE, szWindowClass, szTitle, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, CW_USEDEFAULT, // WS_POPUP, CW_USEDEFAULT, 0, DEFAULT_WIN_WIDTH, DEFAULT_WIN_HEIGHT, NULL, NULL, hInstance, NULL); if (mainWindowHandle) { if (!devMode) { jumpList.SetUpJumpList(hInst); } } return mainWindowHandle; }