i have this code block from source DougieM wrote for a custom control. I get a "sytax error" at a statement like this:
; select type of background if gif is transparant
.if FUNC(GetObject,[ebx].backg,0,0) == sizeof LOGBRUSH <<-------- DIES RIGHT HERE
invoke FillRect,memdc,addr [ebx].rc,[ebx].backg; if a brush has been sent in backg
.else ; fill with brush
invoke CreateCompatibleDC,hdc
mov backdc,eax
invoke SelectObject,backdc,[ebx].backg ; or a bitmap
push eax ; then copy backg bmp into our memdc
invoke BitBlt,memdc,0,0,[ebx].rc.right,[ebx].rc.bottom,backdc,0,0,SRCCOPY
pop eax
invoke SelectObject,backdc,eax
invoke DeleteDC,backdc
.endif
Why is the compiler dying right here at this point?
hi
is a invoke macro
FUNC MACRO parameters:VARARG
invoke parameters
EXITM <eax>
ENDM
greets
ragdog
localmotion34,
Here is a quick example :
mov hModule,FUNC(GetModuleHandle,0)
is equivalent to :
invoke GetModuleHandle,0
mov hModule,eax
Thanks to you both!!!
i included the macro, and boom, the LIB compiled. There are so many macros for MASM, i'm having trouble reading much of any code without having to constantly search for macro.inc files.
you must simply search in the board or with google for the appropriate macro!
and it more simply to coding if one macros uses :U
ragdog
localmotion34,
Never hesitate to post here your questions. To study the basic principles of MASM macros, have a look at here :
Chapter Nine: Using Macros
http://webster.cs.ucr.edu/Page_TechDocs/MASMDoc/ProgrammersGuide/Chap_09.htm
localmotion34,
Use the existing HELP FILE in masm32 for all of the high leel help. Thats what its there for. MASM is a macro assembler and this is used to simplify much of the code for people leqarning assembler programming.