| 318 | |
| 319 | |
| 320 | void Window::MessageLoop() |
| 321 | { |
| 322 | // Main message loop: |
| 323 | MSG msg; |
| 324 | |
| 325 | while(PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) |
| 326 | { |
| 327 | if(!accelTable || !TranslateAccelerator(msg.hwnd, accelTable, &msg)) |
| 328 | { |
| 329 | ::TranslateMessage( &msg ); |
| 330 | ::DispatchMessage( &msg ); |
| 331 | } |
| 332 | } |
| 333 | } |
| 334 | |
| 335 | void Window::RegisterMessageCallback(MsgFunction msgFunction, void* context) |
| 336 | { |