how would i go about supplying the value returned from GetWindowLong in this code
Quoteinvoke GetWindowLong, hDlg, GWL_EXSTYLE
invoke SetWindowLong, hDlg, GWL_EXSTYLE, WS_EX_LAYERED or eax
i get the "error constant expected"
thanks.
:U
invoke GetWindowLong, hDlg, GWL_EXSTYLE
.if (eax != 0)
or eax, WS_EX_LAYERED
invoke SetWindowLong, hDlg, GWL_EXSTYLE, eax
.endif
Maybe in that case this is better...
invoke GetWindowLong, hDlg, GWL_EXSTYLE
or eax, WS_EX_LAYERED
invoke SetWindowLong, hDlg, GWL_EXSTYLE, eax
jdoe, thanks! i got the picture :U
remember that the invoke macro unfolds to become a series of pushes followed by a call, so, you can't have 'constant or eax' because you can't 'push constant or eax'. so you would 'or eax,constant' then use eax as your parameter to invoke.
Hi Rainstorm,
Another solution based on the following macro :
.
.
TEST_VALUE equ 0
Calc MACRO operation
operation
EXITM <eax>
ENDM
.code
start:
xor eax,eax
invoke ExitProcess,Calc(<or eax,TEST_VALUE>)
END start
nice one, thx vortex ! :U