MCPcopy Create free account
hub / github.com/BabylonJS/BabylonNative / InitInstance

Function InitInstance

Apps/ValidationTests/Win32/App.cpp:209–225  ·  view source on GitHub ↗

FUNCTION: InitInstance(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.

Source from the content-addressed store, hash-verified

207// create and display the main program window.
208//
209BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
210{
211 hInst = hInstance; // Store instance handle in our global variable
212 HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
213 CW_USEDEFAULT, CW_USEDEFAULT, TEST_WIDTH, TEST_HEIGHT, nullptr, nullptr, hInstance, nullptr);
214
215 if (!hWnd)
216 {
217 return FALSE;
218 }
219
220 ShowWindow(hWnd, nCmdShow);
221 UpdateWindow(hWnd);
222 Initialize(hWnd);
223
224 return TRUE;
225}
226
227//
228// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)

Callers 1

wWinMainFunction · 0.70

Calls 1

InitializeFunction · 0.70

Tested by

no test coverage detected