Handling dialog messages for non-template based dialogs
Robert Shearman
R.J.Shearman at warwick.ac.uk
Tue Apr 13 07:00:27 CDT 2004
Santosh Siddheshwar wrote:
>
> Change Log:
> windows/defdlg.c - Added code for allocating DIALOGINFO structure and
> storing it as an attribute of the window
> windows/dialog.c - Removed code for allocating DIALOGINFO structure and
> moved initialization of DIALOGINFO structure
> to after CreateWindowEx has been called.
> <<patch.diff>>
>
> diff -urN wine-20040408/windows/defdlg.c wine-bin/windows/defdlg.c
> --- wine-20040408/windows/defdlg.c 2003-09-06 04:45:40.000000000 +0530
> +++ wine-bin/windows/defdlg.c 2004-04-13 11:53:02.000000000 +0530
> @@ -168,6 +168,27 @@
> {
> switch(msg)
> {
> + case WM_CREATE:
> + {
> + /* Allocate memory for DIALOGINFO structure and store in
DWL_DIALOGINFO
> + structure. Also flag the window as a dialog type */
> + WND* wndPtr;
> + DIALOGINFO* dlgInfo;
> + if (!(dlgInfo = HeapAlloc( GetProcessHeap(), 0,
sizeof(*dlgInfo) ))) return 0;
Minor point, but you probably want to return -1 here to say that window
creation failed.
> + dlgInfo->hwndFocus = 0;
> + dlgInfo->hUserFont = 0;
> + dlgInfo->hMenu = 0;
> + dlgInfo->xBaseUnit = 0;
> + dlgInfo->yBaseUnit = 0;
Rob
More information about the wine-devel
mailing list