Win16 programs and Wine internal messages

Richard Cohen richard at daijobu.co.uk
Fri Apr 22 05:35:54 CDT 2005


Alexandre Julliard wrote:
> Richard Cohen <richard at daijobu.co.uk> writes:
> 
>>Closing Win16 programs using the Window manager doesn't work any more,
>>because 16 bit programs don't recognize the WINE internal messages, so
>>they don't get processed.
> 
> This should be fixed now.
> 
Almost. In PeekMessageW, the message should be removed before handling it

         if (msg.message & 0x80000000)
         {
-->         handle_internal_message( msg.hwnd, msg.message, msg.wParam, 
msg.lParam );
             if (!(flags & PM_REMOVE))  /* have to remove it explicitly */
-->             peek_message( &msg, msg.hwnd, msg.message, msg.message, 
GET_MSG_REMOVE );
         }

In 16bit SkiFree (again!), handle_internal_message()  leads to 
PostQuitMessage() & DefWindowProc(WM_NCDESTROY), which calls 
queue_cleanup_window in wineserver, which clears the queue of messages 
for the window. So, when peek_message is called again it removes 
WM_QUIT, which therfore never gets returned to the app.

Perhaps handling of internal messages should even be moved into 
peek_message?

Richard.



More information about the wine-devel mailing list