flat assembler
Message board for the users of flat assembler.

Index > Windows > obtaining RECT co-ordinates in a proc

Author
Thread Post new topic Reply to topic
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman
Hi,

I'm trying to do the following...
Code:
.
.data
InRect    RECT
OutRect   RECT
.
.
.code
.
.
stdcall  ChgRect, InRect, OutRect
.
.
proc ChgRect rIn, rOut
        mov     eax, [rIn.top]
        .
        .
        .
endp
    


but when I try to compile I get [rIn.top] as an undefined symbol.

How can I transfer the RECT info to a proc?

thx

mori
Post 31 Jul 2006, 15:31
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7734
Location: Kraków, Poland
Tomasz Grysztar
[rIn] is a pointer to RECT, not structure itself. The simplest way to do it is:
Code:
proc ChgRect rIn, rOut

        mov     ebx, [rIn]
        mov     eax, [ebx+RECT.top]

endp    
Post 31 Jul 2006, 15:36
View user's profile Send private message Visit poster's website Reply with quote
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman
WOW, thx for the very quick reply Tomasz Very Happy
Post 31 Jul 2006, 15:40
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.