flat assembler
Message board for the users of flat assembler.
Index
> Windows > Question about GetWindowRect |
Author |
|
revolution 28 Jul 2014, 13:26
You need to load the value from the structure:
Code: mov eax,[rc.left] mov [left],eax |
|||
28 Jul 2014, 13:26 |
|
upsurt 28 Jul 2014, 13:29
I did this before, but I get an "operand sizes do not match (mov [left],eax)" error.
|
|||
28 Jul 2014, 13:29 |
|
upsurt 28 Jul 2014, 13:39
Ok, I got it working with your help! Thank you, revolution.
Code: invoke GetWindowRect,[hwnd],rc ;x mov eax,[rc.left] mov dword[left],eax ;y mov eax,[rc.top] mov dword[top],eax ;width mov eax,[rc.right] mov dword[width],eax mov eax,[rc.left] sub dword[width],eax ;height mov eax,[rc.bottom] mov dword[height],eax mov eax,[rc.top] sub dword[height],eax now I get the correct data in dword[left], dword[top], dword[width] and dword[height] But is this the correct way to do it, or is there a better way? |
|||
28 Jul 2014, 13:39 |
|
revolution 28 Jul 2014, 14:01
You can use the matching size for the values then you don't need the 'dword' overrides:
Code: left dd ? |
|||
28 Jul 2014, 14:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.