The MASM Forum

Projects => Rarely Used Projects => GoAsm => Topic started by: shankle on June 11, 2018, 02:10:50 AM

Title: GetClientRect
Post by: shankle on June 11, 2018, 02:10:50 AM
              6-10-2018
          
The GetClientRect compiles with an error. WHY?

.const
RECT
rcClient       STRUCT
left         db   360
top          db   160
right        db   560
bottom       db   200
rcClient       ENDS

GetClientRect,[hWnd],addr rcClient

WndProc:
    FRAME  hWnd,iMsg,wParam,lParam,hPen,xx,yy,ww,hh

Error!
Line 226 of assembler source file (xxxxxx.asm):-
Unknown mnemonic, instruction, redefinition or directive:-
GetClientRect,[hWnd],addr rcClient


Title: Re: GetClientRect
Post by: jj2007 on June 11, 2018, 02:15:53 AM
RECT has 4 dword members. It won't work with "db". Besides, GetClientRect writes to the rect: difficult to a constant.
Title: Re: GetClientRect
Post by: Yuri on June 11, 2018, 02:18:24 AM
That's true, but there should also be "invoke" before the function name.
Title: Re: GetClientRect
Post by: shankle on June 11, 2018, 03:26:22 AM
Thanks fellows.
I have an extraordinary way of missing the obvious. :(