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

Method WndProc

SampleFramework12/v1.00/Window.cpp:300–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300LRESULT WINAPI Window::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
301{
302 switch(uMsg)
303 {
304 case WM_NCCREATE:
305 {
306 LPCREATESTRUCT pCreateStruct = reinterpret_cast<LPCREATESTRUCT>(lParam);
307 ::SetWindowLongPtr(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pCreateStruct->lpCreateParams));
308 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
309 }
310 }
311
312 Window* pObj = reinterpret_cast<Window*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
313 if(pObj)
314 return pObj->MessageHandler(hWnd, uMsg, wParam, lParam);
315 else
316 return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
317}
318
319
320void Window::MessageLoop()

Callers

nothing calls this directly

Calls 1

MessageHandlerMethod · 0.80

Tested by

no test coverage detected