[Bug 41460] Visual Studio C++ 6.0 crash when exit and a menu is oppened

wine-bugs at winehq.org wine-bugs at winehq.org
Mon Oct 10 18:04:00 CDT 2016


https://bugs.winehq.org/show_bug.cgi?id=41460

--- Comment #9 from Chituc Georgian <dianaxxyyzz at gmail.com> ---
I fixed it , for me works good. Maybe not the perfect fix but at least works.


Mods must be made to /dlls/message.c 


///////////////////////////add this
BOOL CALLBACK DoSomethingCallBack(HWND hwnd, LPARAM lParam)
{

    PostMessageW( hwnd, WM_KILLFOCUS, 0 ,0);

    return TRUE;
}

void DoSomethingToWindowTree(HWND hwndRoot)
{

    EnumThreadWindows(  GetWindowThreadProcessId(hwndRoot, NULL) , 
DoSomethingCallBack, 0);

}
////////////////////////////////


/***********************************************************************
 *        SendMessageW  (USER32.@)
 */
LRESULT WINAPI SendMessageW( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam
)
{
    DWORD_PTR res = 0;
    struct send_message_info info;

    info.type    = MSG_UNICODE;
    info.hwnd    = hwnd;
    info.msg     = msg;
    info.wparam  = wparam;
    info.lparam  = lparam;
    info.flags   = SMTO_NORMAL;
    info.timeout = 0;

    ////////////////////////////add this
    if ( msg == WM_CLOSE)
    {

       DoSomethingToWindowTree(hwnd);

       PostMessageW( hwnd, WM_CLOSE, 0 ,0);

       return TRUE;

    }
    /////////////////////////////////////

-- 
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