Handling dialog messages for non-template based dialogs

Santosh Siddheshwar santosh.s at sonata-software.com
Wed Apr 14 03:33:57 CDT 2004


Thanks for the feedback. Excellent catches! Hope my next mail to
wine-patches gets through!
Regards
Santosh Siddheshwar

> -----Original Message-----
> From:	Dmitry Timoshkov [SMTP:dmitry at baikal.ru]
> Sent:	Tuesday, April 13, 2004 7:38 PM
> To:	Santosh Siddheshwar; Robert Shearman; wine-devel at winehq.org
> Cc:	santosh.s at sonata-software.com
> Subject:	Re: Handling dialog messages for non-template based dialogs
> 
> "Santosh Siddheshwar" <santosh.s at sonata-software.com> wrote:
> 
> >   I didnt get the second point that you mention
> > Another one might be that WM_CREATE must be always
> > passed to DEFDLG_Proc regardless of what result an application
> > returned to DefDlgProc16/A/W.
> 
> Here is a snippet of DefDlgProc16 (DefDlgProcA/W are the same):
> 
> LRESULT WINAPI DefDlgProc16( HWND16 hwnd, UINT16 msg, WPARAM16 wParam,
>                              LPARAM lParam )
> {
>     WNDPROC16 dlgproc;
>     HWND hwnd32 = WIN_Handle32( hwnd );
>     BOOL result = FALSE;
> 
> =====
> Perhaps WM_CREATE handling code should be moved here:
> if (msg == WM_CREATE)
> {
>     wndPtr->flags |= WIN_ISDIALOG;
>     blah-blah-blah
> }
> =====
> 
>     SetWindowLongW( hwnd32, DWL_MSGRESULT, 0 );
> 
>     if ((dlgproc = (WNDPROC16)DEFDLG_GetDlgProc( hwnd32 )))
>     {
>         /* Call dialog procedure */
>         result = CallWindowProc16( dlgproc, hwnd, msg, wParam, lParam );
>         /* 16 bit dlg procs only return BOOL16 */
>         if( WINPROC_GetProcType( (WNDPROC)dlgproc ) == WIN_PROC_16 )
>             result = LOWORD(result);
>     }
> 
>     if (!result && IsWindow(hwnd32)) <== here we check whether an app
> handled the message
>     {
>         /* callback didn't process this message */
> 
>         switch(msg)
>         {
>             case WM_ERASEBKGND:
> 
> Probably WM_CREATE handling should be performed even before control
> is passed to an application.
> 
> -- 
> Dmitry.
*********************************************************************
Disclaimer: The information in this e-mail and any attachments is
confidential / privileged. It is intended solely for the addressee or
addressees. If you are not the addressee indicated in this message, you may
not copy or deliver this message to anyone. In such case, you should destroy
this message and kindly notify the sender by reply email. Please advise
immediately if you or your employer does not consent to Internet email for
messages of this kind.
*********************************************************************



More information about the wine-devel mailing list