Assembly code snippets

Back to the snippets overview


TitleCheck if windows - fields are filled
AuthorThe Svin
Submitted by:The Svin
Date added:2002-02-20 05:53:28
Date modified:2002-02-20 05:53:28


To check that the user filled all data.
In other words is any window ( of those wich supposed to be filled ) is empty.
First param - number of windows you want to check.
Next params (any number) handles of the windows.
Return 0 if any of the windows is empty, otherwise - not zero value
proc is in C format, don't forget to add "C" in proto:
IfFieldsEmpty proto C :DWORD,:VARARG


IfFieldsEmpty proc C uses ebx edi pcount:DWORD,hndls:VARARG
LOCAL buffer[4]:BYTE
    mov edi,pcount
    dec edi
@@: invoke GetWindowText,dword ptr hndls[edi*4],addr buffer,4
    test eax,eax
    je @r
    dec edi
    jns @B
@r: ret
IfFieldsEmpty endp