http://bugs.winehq.org/show_bug.cgi?id=19495
Summary: DialogBox() returns -1 for Invalid Window Handle, Should Be 0 Product: Wine Version: 1.1.26 Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P3 Component: user32 AssignedTo: wine-bugs@winehq.org ReportedBy: robertgonder@embarqmail.com
DialogBox( hInstance, MAKEINTRESOURCE(MyDlg), NULL, MyDlgProc ) returns -1 (AFTER the dialog has completed correctly!) GetLastError() returns 1400 (Invalid Window Handle). NULL is the window handle, meaning the desktop is the owner.
According to the MS docs here http://msdn.microsoft.com/en-us/library/ms645452(VS.85).aspx "If the function fails because the hWndParent parameter is invalid, the return value is zero."
I can work around this, but it might be causing problems in commercial software.