MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / _tWinMain

Function _tWinMain

Source/TestRenderer/WinMain.cpp:278–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) {
279 UNREFERENCED_PARAMETER(hPrevInstance);
280 UNREFERENCED_PARAMETER(lpCmdLine);
281
282 // Disable automatic DPI scaling.
283 SetProcessDPIAware();
284
285 MSG msg;
286 HACCEL hAccelTable;
287
288 // Initialize global strings
289 LoadString(hInstance, IDS_APP_TITLE, szTitle, COUNT_OF(szTitle));
290
291 // Perform application initialization
292 if (!InitInstance(nCmdShow)) {
293 return FALSE;
294 }
295
296 hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_TESTRENDERER));
297
298 while (1) {
299 while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
300 if (msg.message == WM_QUIT) {
301 goto QUIT;
302 }
303
304 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
305 TranslateMessage(&msg);
306 DispatchMessage(&msg);
307 }
308 }
309
310 app.RunFrame();
311
312 if (mainContext) {
313 BE1::rhi.DisplayContext(mainContext);
314 }
315#ifdef CREATE_SUB_WINDOW
316 if (subContext) {
317 BE1::rhi.DisplayContext(subContext);
318 }
319#endif
320 }
321
322QUIT:
323 ShutdownInstance();
324
325 return (int)msg.wParam;
326}
327
328INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
329 UNREFERENCED_PARAMETER(lParam);

Callers

nothing calls this directly

Calls 5

LoadStringFunction · 0.85
InitInstanceFunction · 0.70
ShutdownInstanceFunction · 0.70
RunFrameMethod · 0.45
DisplayContextMethod · 0.45

Tested by

no test coverage detected