invoke MoveWindow, , /3, 0, (1/4)*cxClient, (1/7)*cyClient, TRUE

arguments 2,4 and 5 are not masm friendly, how can i make this call in masm?
Posted on 2006-08-19 02:49:33 by w0lfshad3
First: use 32bit registers, not 16bit (ie, ESI not SI).

Second: you can't do HLL-style calculations, you need to do this maunally. Ie, you can't pass "/3" as an argument, you need do the DIV yourself.
Posted on 2006-08-19 03:38:22 by f0dder
Sure but in the end i need to pass the function 3 arguments thus i need 3 registers;
ecx is occupied counting since this is into a loop, si is occupied indexing the array, i am left with eax, ebx, edx and di should i pass them to the function(alltough i don't think i can use di)?

EDIT: MASM doesn't even accept "(1/4)*cxClient" i tried supplying it before the function call to label and it said at assembly that it expected a constant, can't tell if its because of cxClient or the temp label i moved it into.
Posted on 2006-08-19 03:52:15 by w0lfshad3
you can use temporary variables, or you can do the push/call manually instead of invoke... and there's no problem using EDI.

Just remember that if you're in a callback (most common: wndproc/dlgproc), you need to preserve EBX,ESI,EDI.
Posted on 2006-08-19 03:56:46 by f0dder