summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/button/button.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp
index f3384f3fcc..ed00c94f3b 100644
--- a/src/modules/button/button.cpp
+++ b/src/modules/button/button.cpp
@@ -261,11 +261,9 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint)
static LRESULT CALLBACK MButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
MButtonCtrl* bct = (MButtonCtrl *)GetWindowLongPtr(hwndDlg, 0);
- if (bct && bct->fnWindowProc) {
- LRESULT res = bct->fnWindowProc(hwndDlg, msg, wParam, lParam);
- if (res)
- return res;
- }
+ if (bct && bct->fnWindowProc)
+ if ( bct->fnWindowProc(hwndDlg, msg, wParam, lParam))
+ return bct->lResult;
switch(msg) {
case WM_NCCREATE: