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

Method MessageHandler

SampleFramework12/v1.00/Window.cpp:273–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273LRESULT Window::MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
274{
275 for(uint64 i = 0; i < messageCallbacks.Count(); ++i)
276 {
277 Callback callback = messageCallbacks[i];
278 MsgFunction msgFunction = callback.Function;
279 msgFunction(callback.Context, hWnd, uMsg, wParam, lParam);
280 }
281
282 switch(uMsg)
283 {
284 // Window is being destroyed
285 case WM_DESTROY:
286 ::PostQuitMessage(0);
287 return 0;
288
289 // Window is being closed
290 case WM_CLOSE:
291 {
292 DestroyWindow(hwnd);
293 return 0;
294 }
295 }
296
297 return ::DefWindowProc(hwnd, uMsg, wParam, lParam);
298}
299
300LRESULT WINAPI Window::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
301{

Callers 1

WndProcMethod · 0.80

Calls 1

CountMethod · 0.45

Tested by

no test coverage detected