diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:25:00 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-12-28 20:25:00 +0100 |
commit | db0fcf9142f9ee7035370f832036c873d4c87168 (patch) | |
tree | a4062cdf2158362a0a431eb1806719e9f0975cb1 /app/wlib/mswlib/mswbutt.c | |
parent | ee016bcb70b5c380e03b5fd2c12b1baa504c3cc8 (diff) | |
parent | 09795a01ef859f072920de9df974d1b03b9ab9a4 (diff) |
Merge tag 'upstream/4.2.4a'
Upstream version 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 ); |