LOCAL CaptionRect : RECT
LOCAL WinRect :RECT

invoke GetWindowRect, hWnd, addr CaptionRect


How can i copy the CaptionRect structure to WinRect structure without calling GetWindowRect ?
Is copying faster than calling API ?

Thanks
Posted on 2002-04-30 15:31:42 by yoursguideline
Hmm couple of API ways.

1)
invoke CopyRect, addr WinRect, addr CaptionRect
2)
invoke CopyMemory, addr WinRect, addr CaptionRect, 16

both of these will be slightly faster than GetWindowRect and also doing it directly from asm would probably be faster than all of them. But the speed gains, in this case I think, do not warrent the extra lines of code it would take and it will decrease the readablility greatly.

Just my opinion however :grin:
Posted on 2002-04-30 15:52:51 by Graebel
Is copying faster than calling API ?

In the case it 1000s times faster :)
the structs just 4 dwords each.
Use rep movsd
or other way to copy data.
with MMX it's fastest way. with movq.
Posted on 2002-04-30 16:04:01 by The Svin