MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / WndProc

Method WndProc

SHTest/SampleFramework12/v1.04/Window.cpp:347–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347LRESULT WINAPI Window::WndProc(HWND hWnd, uint32 uMsg, WPARAM wParam, LPARAM lParam)
348{
349 switch(uMsg)
350 {
351 case WM_NCCREATE:
352 {
353 LPCREATESTRUCT pCreateStruct = reinterpret_cast<LPCREATESTRUCT>(lParam);
354 ::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pCreateStruct->lpCreateParams));
355 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
356 }
357 }
358
359 Window* pObj = reinterpret_cast<Window*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
360 if(pObj)
361 return pObj->MessageHandler(hWnd, uMsg, wParam, lParam);
362 else
363 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
364}
365
366
367void Window::MessageLoop()

Callers

nothing calls this directly

Calls 1

MessageHandlerMethod · 0.80

Tested by

no test coverage detected