who can help find bug?
thank you

test.asm file:
.386
.Model Flat,StdCall
Option CaseMap:None
include windows.inc
include kernel32.inc
include user32.inc
include gdi32.inc
includelib kernel32.lib
includelib user32.lib
includelib gdi32.lib

IDC_CUSTOMTEXT equ 107
DLG_MAIN equ 1

.data
hInstance dd ?

.code

_ProcDlgMain proc uses ebx esi edi,hWnd,wMsg,wParam,lParam
mov eax,wMsg
.if eax==WM_CLOSE
invoke EndDialog,hWnd,NULL
.endif
mov eax,TRUE
ret

_ProcDlgMain endp

start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke DialogBoxParam,hInstance,DLG_MAIN,
NULL,offset _ProcDlgMain,NULL
invoke ExitProcess,NULL
end start

profile.rc file:

#include "resource.h"
#define IDC_CUSTOMTEXT 107
#define DLG_MAIN 1


DLG_MAIN DIALOG DISCARDABLE 50, 50, 113, 64
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"

BEGIN
CTEXT "input words:",-1,10,6,53,13
EDITTEXT IDC_CUSTOMTEXT,9,26,96,18,ES_RIGHT | ES_UPPERCASE
DEFPUSHBUTTON "OK",IDOK,23,46,50,14
END
Posted on 2004-07-18 10:07:36 by cccer
two many viewers,but no answer,
why?
I am beginer,this quesion should is easy to you,
Help beginer
Posted on 2004-07-18 11:31:52 by cccer
MSDN For DialogProc:
Typically, the dialog box procedure should return TRUE if it processed the message, and FALSE if it did not. If the dialog box procedure returns FALSE, the dialog manager performs the default dialog operation in response to the message.

Does your dialog procedure process all messages?

Other minor mistakes are there, but I believe you mean this one in particular.
Posted on 2004-07-18 11:39:26 by death
thanks
Posted on 2004-07-18 12:11:41 by cccer