| 365 | |
| 366 | |
| 367 | void Window::MessageLoop() |
| 368 | { |
| 369 | // Main message loop: |
| 370 | MSG msg; |
| 371 | |
| 372 | while(PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) |
| 373 | { |
| 374 | if(!accelTable || !TranslateAccelerator(msg.hwnd, accelTable, &msg)) |
| 375 | { |
| 376 | ::TranslateMessage( &msg ); |
| 377 | ::DispatchMessage( &msg ); |
| 378 | } |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | void Window::RegisterMessageCallback(MsgFunction msgFunction, void* context) |
| 383 | { |