Author Topic: GetClientRect  (Read 3496 times)

shankle

  • Member
  • ****
  • Posts: 868
GetClientRect
« 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



jj2007

  • Member
  • *****
  • Posts: 13945
  • Assembly is fun ;-)
    • MasmBasic
Re: GetClientRect
« Reply #1 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.

Yuri

  • Member
  • **
  • Posts: 179
Re: GetClientRect
« Reply #2 on: June 11, 2018, 02:18:24 AM »
That's true, but there should also be "invoke" before the function name.

shankle

  • Member
  • ****
  • Posts: 868
Re: GetClientRect
« Reply #3 on: June 11, 2018, 03:26:22 AM »
Thanks fellows.
I have an extraordinary way of missing the obvious. :(