flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
polygon7
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 |
|||||||||||
![]() |
|
roticv
You never passed the id of the dialog, how would u expect the dialog to be created?
|
|||
![]() |
|
Tomasz Grysztar
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. |
|||
![]() |
|
polygon7
Privalov wrote: (...) and it should work. Yes, thats work. Big thanks ![]() _________________ best regards p7 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.