FW: WM_NEXTDLGCTL changes the default button ID and does not
rest ore default control identifier
Alexandre Julliard
julliard at winehq.org
Thu Jun 17 22:35:39 CDT 2004
Krishna Murthy <Krishna.Murthy at guptaworldwide.com> writes:
> + /**
> + * if the next control is push button, then draw default push button
> + * rectangle.
> + *
> + * if the next control is not a push button, then draw the push button
> + * rectangle for the default control.
> + *
> + * Call SetDefButton to draw the default rectangle, but do not change the
> + * default push button ID (idResult) - As Per MSDN
> + */
> + if ( !(SendMessageW(hwndDest, WM_GETDLGCODE, 0, 0 ) &
> + (DLGC_UNDEFPUSHBUTTON | DLGC_BUTTON)) )
> + hwndDest = GetDlgItem(hwnd, idSaveResult);
> + DEFDLG_SetDefButton( hwnd, dlgInfo, GetDlgCtrlID(hwndDest) );
> + dlgInfo->idResult = idSaveResult;
It seems you are doing redundant work here, since DEFDLG_SetDefButton
will also send the same WM_GETDLGCODE. Wouldn't a simpler fix be to
have DEFDLG_SetDefButton not set idResult unless it really changed the
default button?
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list