Hi PaulIshak,
Thanks fo using Easy Code!
Here is the code you asked for:
.Const
.Data?
.Data
.Code
Window1Procedure Proc hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
.If uMsg == WM_CREATE
.ElseIf uMsg == WM_COMMAND
LoWord wParam
.If Ax == IDC_WINDOW1_BUTTON1
HiWord wParam
.If Ax == BN_CLICKED
Invoke MessageBox, hWnd, TextAddr("Hello world!"), TextAddr("Title"), MB_OK
Return TRUE
.EndIf
.EndIf
.ElseIf uMsg == WM_CLOSE
Invoke IsModal, hWnd
.If Eax
Invoke EndModal, hWnd, IDCANCEL
Mov Eax, TRUE ;Return TRUE
Ret
.EndIf
.EndIf
Xor Eax, Eax ;Return FALSE
Ret
Window1Procedure EndP
Note that the procedure for Button1 (Window1Button1 Proc ...) has been removed as it is not needed.
Please read the help file for visual projects.
Regards,
Ramon