I want my dialog as a main window
and it dosent works:

.model flat,stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\user32.inc
includelib \masm32\lib\user32.lib
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
include \masm32\include\wininet.inc
includelib \masm32\lib\wininet.lib

ClassName db "DLGCLASS",0
DlgName db "IDD_DLG1",0
hInstance HINSTANCE ?
CommandLine LPSTR ?
buffer db 512 dup(?)
IDM_EXIT equ 32002
IDC_EXIT equ 3002
IDC_EDIT equ 1001
invoke GetModuleHandle, NULL
mov hInstance,eax

invoke DialogBoxParam, hInstance, ADDR DlgName,NULL, addr DlgProc, NULL
invoke ExitProcess,eax

DlgProc proc hWnd:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
invoke GetDlgItem, hWnd,IDC_EDIT
invoke SetFocus,eax
invoke EndDialog, hWnd,NULL
mov eax,FALSE
mov eax,TRUE
DlgProc endp
end start

i have read Iczelion's Tutorials but i dont get it to work =/
does anyone seen why?
Posted on 2003-08-30 12:56:08 by bj1500
When you create the dialog if you want to use a string as the identifier (ADDR DlgName) of the dialog be sure you set it's ID to zero otherwise use the ID number to identify it. The class name is not necessary, leave it out of both the dialog in the editor and your program, it will default to #32770 (dialog class)
Posted on 2003-08-30 12:59:03 by donkey
god damn you are fast, and it worked!! so simple :tongue:
Posted on 2003-08-30 13:04:32 by bj1500