flat assembler
Message board for the users of flat assembler.
Index
> Windows > invoking CallWindowProc |
Author |
|
Kermil 28 Apr 2006, 08:51
I see only one reason of such behaviour, you transfer wrong parameter to CallWindowProc. You should transfer to CallWindowProc correct address of old window procedure. But I can be mistaken. Show your code completely.
|
|||
28 Apr 2006, 08:51 |
|
zhak 29 Apr 2006, 10:29
here is the complete template:
|
|||||||||||
29 Apr 2006, 10:29 |
|
Kermil 02 May 2006, 07:54
I have looked your code and changed it, look below:
Code: proc NumPadButtonsProc, hWnd, uMsg, wParam, lParam mov esi, [globals] mov eax, [uMsg] cmp eax, WM_PAINT jz .paint cmp eax, WM_LBUTTONDOWN jz .paint cmp eax, WM_LBUTTONDBLCLK jz .paint cmp eax, WM_LBUTTONUP jz .paint cmp eax, WM_MOUSEMOVE jz .paint cmp eax, WM_NCMOUSEMOVE jz .paint lea eax, [esi+global.lpDefNumPadButtonsProc] invoke CallWindowProc, [eax], [hWnd], [uMsg], [wParam], [lParam] ; not handled messages ret .ret: mov eax, 1 ret .paint: lea eax, [esi+global.lpDefNumPadButtonsProc] invoke CallWindowProc, [eax], [hWnd], [uMsg], [wParam], [lParam] ; this call needed for drawing the button xor ecx, ecx mov edx, [hWnd] lea esi, [esi+global.hDlgMain_bn0] @@: lodsd cmp eax, edx jz .numpad inc ecx cmp ecx, (BN_SIGN-BN_0) jnz @b lodsd cmp eax, edx jnz .ret .numpad: shl ecx, 1 lea esi, [ecx+szDlgMain_bn0Caption] push 00FF0000h ;blue color push esi push eax call setButtonTextAndColor xor eax, eax ret endp |
|||
02 May 2006, 07:54 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.