Mercurial > dwindows
changeset 461:12ba7e744560
Fixes timer problems on Windows, however this may break Win95 support.
The Microsoft documentation is contradictory regarding this and I don't
have a copy of Win95 to test on here.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 09 Jul 2003 07:20:17 +0000 |
parents | 65bc397a7233 |
children | 9d874ce0124a |
files | win/dw.c |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Mon Jul 07 16:20:30 2003 +0000 +++ b/win/dw.c Wed Jul 09 07:20:17 2003 +0000 @@ -1899,6 +1899,11 @@ return DefWindowProc(hWnd, msg, mp1, mp2); } +VOID CALLBACK _TimerProc(HWND hwnd, UINT msg, UINT_PTR idEvent, DWORD dwTime) +{ + _wndproc(hwnd, msg, (WPARAM)idEvent, 0); +} + BOOL CALLBACK _framewndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) { switch( msg ) @@ -3130,8 +3135,6 @@ while(GetMessage(&msg, NULL, 0, 0)) { - if(msg.hwnd == NULL && msg.message == WM_TIMER) - _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); } @@ -3152,8 +3155,6 @@ if(PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { GetMessage(&msg, NULL, 0, 0); - if(msg.hwnd == NULL && msg.message == WM_TIMER) - _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); } @@ -3173,8 +3174,6 @@ if(GetMessage(&msg, NULL, 0, 0)) { - if(msg.hwnd == NULL && msg.message == WM_TIMER) - _wndproc(msg.hwnd, msg.message, msg.wParam, msg.lParam); TranslateMessage(&msg); DispatchMessage(&msg); } @@ -8068,7 +8067,7 @@ { if(sigfunc) { - int timerid = SetTimer(NULL, 0, interval, NULL); + int timerid = SetTimer(NULL, 0, interval, _TimerProc); if(timerid) {