[Bug 19495] DialogBox() returns -1 for Invalid Window Handle, Should Be 0

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Aug 4 21:57:06 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=19495


Dmitry Timoshkov <dmitry at codeweavers.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID




--- Comment #13 from Dmitry Timoshkov <dmitry at codeweavers.com>  2009-08-04 21:57:06 ---
Comment #6 has the pointer to the test source.

hwnd 0 is a notion of a desktop window (HWND_DESKTOP), it's a valid pseudo
window handle.

Regarding to your test case:

static int test_DialogBoxReturnProc(HWND hWnd, unsigned message, unsigned
wParam, LONG lParam)

dialog callback has wrong calling convention and wrong parameter types.
If you would try to compile it you would notice that.

db = DialogBoxA(g_hinst, "RADIO_TEST_DIALOG", NULL, test_DialogBoxReturnProc );
le = GetLastError();
if( -1 == db )
{
    ok (le == 1400, "DialogBox Failed to return 0.\n");
    ok (le != 1400, "test_DialogBoxReturn failed for unknow reason.\n");
}

First of all DialogBoxA() will never fail, therefore the code under if ()
statement will never ececute. Second which of ok() calls above is supposed
to test what you want?

Again, reopen once you have an evidence of the bug, and an appropriate test
case.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list