flat assembler
Message board for the users of flat assembler.
Index
> Windows > Fasm, DialogBox and Iczelion tut. 10 |
Author |
|
polygon7 28 Aug 2004, 19:38
Hi,
i try to make program which have dialogbox with icons (like that one in Iczelion tut. 10), but i have problem with "CreateDialogParam" function. It returns 0 and i dont know why. Could anybody look into source code and *.res file and tell me what is wrong?
_________________ best regards p7 |
|||||||||||
28 Aug 2004, 19:38 |
|
roticv 29 Aug 2004, 05:35
You never passed the id of the dialog, how would u expect the dialog to be created?
|
|||
29 Aug 2004, 05:35 |
|
Tomasz Grysztar 29 Aug 2004, 08:27
The procedure you provide for the class is not DialogProc, it is WindowProc, so you should follow the rules of standard window procedure, replace it with something like:
Code: proc MainDialogProc,hwnddlg,msg,wparam,lparam push ebx esi edi cmp [msg],WM_CREATE je .wmcreate cmp [msg],WM_COMMAND je .wmcommand cmp [msg],WM_CLOSE je .wmclose cmp [msg],WM_DESTROY je .wmdestroy .default: invoke DefWindowProc,[hwnddlg],[msg],[wparam],[lparam] jmp .finish .wmcreate: mov eax,FILE_ATTRIBUTE_DIRECTORY mov [DirAttr1],eax mov [DirAttr2],eax mov eax,TRUE jmp .finish .wmcommand: cmp [wparam],BN_CLICKED shl 16 + ID_CANCEL je .wmclose ; ... .wmclose: invoke DestroyWindow,[hwnddlg] jmp .finish .wmdestroy: invoke PostQuitMessage,0 .finish: pop edi esi ebx return endp and it should work. |
|||
29 Aug 2004, 08:27 |
|
polygon7 29 Aug 2004, 09:51
Privalov wrote: (...) and it should work. Yes, thats work. Big thanks _________________ best regards p7 |
|||
29 Aug 2004, 09:51 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.