News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

DialogBoxParam bug on Windows XP

Started by M@st3r, June 14, 2006, 01:32:41 AM

Previous topic - Next topic

M@st3r

Hi all,
I have created a lot of program on Win 98 that use the DialogBoxParam API as Main Window and I compile this with MASM32 v9 and I tryed one of my programs on Windows XP (sp2) and it bug
What's the problem ????
Download the file plz and check it


[attachment deleted by admin]

Mincho Georgiev

Hi and welcome!

1st - Your Dialog Procedure Should return 0 to Dialog to work properly.
2nd - You dont have the right to use this dialog in your App, unless you're the autor of WinRaR !!!

no-one

Alos your program is written wrong.  You invoke the dialog box procedure and then you crash into it because you do not have a line that says

invoke     ExitProcess,0

After the dialog box invoke line

Paul

M@st3r

Thank a lot shaka_zulu for your help and I just use the Ressource of the REMINDER DialogBox of WinRAR for test. I know that it's illegal to put ressource of copyrighted software, but I just put the ressource for a test. And second, it is not obligatory to put ExitProcess, 0 after your DialogBoxParam if you quit the program in the Dialog Procedure with ExitProcess when the program receives the message WM_CLOSE.

Shantanu Gadgil

Hi, I have not checked the dialog styles or anything, but some immediate things which are visible... :)

invoke DialogBoxParam, hInstance, DIALOG_1, NULL, addr DlgProc, NULL
invoke ExitProcess, 0 ; put this line here
.
.
.
DlgProc proc hwndDlg:HWND, uMsg:UINT, wParam:WPARAM, lParam:LPARAM
.IF uMsg==WM_CLOSE
;invoke ExitProcess, 0 ;change this line to
invoke EndDialog,hWndDlg,0
.ELSE
xor eax,eax ;mov eax, FALSE
ret
.ENDIF

mov eax,TRUE
ret
DlgProc endp


Hope this helps!
To ret is human, to jmp divine!