diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:24:50 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:24:50 +0100 |
commit | 09795a01ef859f072920de9df974d1b03b9ab9a4 (patch) | |
tree | 4d05907fc37f1bd781e506f5e196f7435aeec0ab /app/wlib/mswlib/mswbutt.c | |
parent | 5b4163d8c76b03f0d31b09866aa4bd06b4d8d804 (diff) |
New upstream version 4.2.4aupstream/4.2.4a
Diffstat (limited to 'app/wlib/mswlib/mswbutt.c')
-rw-r--r-- | app/wlib/mswlib/mswbutt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/wlib/mswlib/mswbutt.c b/app/wlib/mswlib/mswbutt.c index b5d7b49..24e669f 100644 --- a/app/wlib/mswlib/mswbutt.c +++ b/app/wlib/mswlib/mswbutt.c @@ -257,7 +257,7 @@ static void buttDone( free(b); } -long FAR PASCAL _export pushButt( +LRESULT CALLBACK pushButt( HWND hWnd, UINT message, UINT wParam, @@ -301,9 +301,10 @@ long FAR PASCAL _export pushButt( InvalidateRect( b->hWnd, NULL, TRUE ); return 0L; break; - case WM_ERASEBKGND: - if (kludge12) - return 1L; + case WM_LBUTTONUP: + /* don't know why but this solves a problem with color selection */ + Sleep( 0 ); + break; } return CallWindowProc( oldButtProc, hWnd, message, wParam, lParam ); } @@ -372,9 +373,8 @@ wButton_p wButtonCreate( b->action = action; mswCallBacks[B_BUTTON] = &buttonCallBacks; mswChainFocus( (wControl_p)b ); - newButtProc = MakeProcInstance( (XWNDPROC)pushButt, mswHInst ); - oldButtProc = (XWNDPROC)GetWindowLong( b->hWnd, GWL_WNDPROC ); - SetWindowLong( b->hWnd, GWL_WNDPROC, (LONG)newButtProc ); + + oldButtProc = (WNDPROC) SetWindowLongPtr(b->hWnd, GWL_WNDPROC, (LONG_PTR)&pushButt); if (mswPalette) { hDc = GetDC( b->hWnd ); SelectPalette( hDc, mswPalette, 0 ); |