defdlg.c 14.4 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3
/*
 * Default dialog procedure
 *
Alexandre Julliard's avatar
Alexandre Julliard committed
4
 * Copyright 1993, 1996 Alexandre Julliard
Alexandre Julliard's avatar
Alexandre Julliard committed
5
 *
6 7 8 9 10 11 12 13 14 15 16 17
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Alexandre Julliard's avatar
Alexandre Julliard committed
19
 */
Alexandre Julliard's avatar
Alexandre Julliard committed
20

21 22
#include <stdarg.h>

23
#include "windef.h"
24
#include "winbase.h"
25
#include "wingdi.h"
26
#include "winuser.h"
27
#include "controls.h"
Alexandre Julliard's avatar
Alexandre Julliard committed
28
#include "win.h"
29
#include "user_private.h"
30
#include "wine/debug.h"
31

32
WINE_DEFAULT_DEBUG_CHANNEL(dialog);
Alexandre Julliard's avatar
Alexandre Julliard committed
33

Alexandre Julliard's avatar
Alexandre Julliard committed
34

35 36 37
/***********************************************************************
 *           DEFDLG_GetDlgProc
 */
38
static DLGPROC DEFDLG_GetDlgProc( HWND hwnd )
39
{
40
    DLGPROC ret;
41 42 43 44
    WND *wndPtr = WIN_GetPtr( hwnd );

    if (!wndPtr) return 0;
    if (wndPtr == WND_OTHER_PROCESS)
45
    {
46
        ERR( "cannot get dlg proc %p from other process\n", hwnd );
47
        return 0;
48
    }
49
    ret = *(DLGPROC *)((char *)wndPtr->wExtra + DWLP_DLGPROC);
50
    WIN_ReleasePtr( wndPtr );
51 52 53
    return ret;
}

Alexandre Julliard's avatar
Alexandre Julliard committed
54 55 56 57 58 59
/***********************************************************************
 *           DEFDLG_SetFocus
 *
 * Set the focus to a control of the dialog, selecting the text if
 * the control is an edit dialog.
 */
60
static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl )
Alexandre Julliard's avatar
Alexandre Julliard committed
61
{
62 63
    if (SendMessageW( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
        SendMessageW( hwndCtrl, EM_SETSEL, 0, -1 );
64
    SetFocus( hwndCtrl );
Alexandre Julliard's avatar
Alexandre Julliard committed
65 66 67 68 69 70
}


/***********************************************************************
 *           DEFDLG_SaveFocus
 */
71
static void DEFDLG_SaveFocus( HWND hwnd )
Alexandre Julliard's avatar
Alexandre Julliard committed
72
{
73
    DIALOGINFO *infoPtr;
74
    HWND hwndFocus = GetFocus();
Alexandre Julliard's avatar
Alexandre Julliard committed
75

76
    if (!hwndFocus || !IsChild( hwnd, hwndFocus )) return;
77
    if (!(infoPtr = DIALOG_get_info( hwnd, FALSE ))) return;
Alexandre Julliard's avatar
Alexandre Julliard committed
78
    infoPtr->hwndFocus = hwndFocus;
79
    /* Remove default button */
Alexandre Julliard's avatar
Alexandre Julliard committed
80 81 82 83 84 85
}


/***********************************************************************
 *           DEFDLG_RestoreFocus
 */
86
static void DEFDLG_RestoreFocus( HWND hwnd )
Alexandre Julliard's avatar
Alexandre Julliard committed
87
{
88
    DIALOGINFO *infoPtr;
89

90
    if (IsIconic( hwnd )) return;
91
    if (!(infoPtr = DIALOG_get_info( hwnd, FALSE ))) return;
92
    /* Don't set the focus back to controls if EndDialog is already called.*/
93 94 95 96 97
    if (infoPtr->flags & DF_END) return;
    if (!IsWindow(infoPtr->hwndFocus) || infoPtr->hwndFocus == hwnd) {
        /* If no saved focus control exists, set focus to the first visible,
           non-disabled, WS_TABSTOP control in the dialog */
        infoPtr->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE );
98
        if (!IsWindow( infoPtr->hwndFocus )) return;
99
    }
100
    DEFDLG_SetFocus( hwnd, infoPtr->hwndFocus );
101

102 103
    /* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
       sometimes losing focus when receiving WM_SETFOCUS messages. */
Alexandre Julliard's avatar
Alexandre Julliard committed
104 105 106 107 108 109 110 111
}


/***********************************************************************
 *           DEFDLG_FindDefButton
 *
 * Find the current default push-button.
 */
112
static HWND DEFDLG_FindDefButton( HWND hwndDlg )
Alexandre Julliard's avatar
Alexandre Julliard committed
113
{
114 115 116
    HWND hwndChild, hwndTmp;

    hwndChild = GetWindow( hwndDlg, GW_CHILD );
Alexandre Julliard's avatar
Alexandre Julliard committed
117 118
    while (hwndChild)
    {
119
        if (SendMessageW( hwndChild, WM_GETDLGCODE, 0, 0 ) & DLGC_DEFPUSHBUTTON)
Alexandre Julliard's avatar
Alexandre Julliard committed
120
            break;
121 122

        /* Recurse into WS_EX_CONTROLPARENT controls */
123
        if (GetWindowLongW( hwndChild, GWL_EXSTYLE ) & WS_EX_CONTROLPARENT)
124
        {
125
            LONG dsStyle = GetWindowLongW( hwndChild, GWL_STYLE );
126 127 128 129
            if ((dsStyle & WS_VISIBLE) && !(dsStyle & WS_DISABLED) &&
                (hwndTmp = DEFDLG_FindDefButton(hwndChild)) != NULL)
           return hwndTmp;
        }
130
        hwndChild = GetWindow( hwndChild, GW_HWNDNEXT );
Alexandre Julliard's avatar
Alexandre Julliard committed
131 132 133 134 135 136
    }
    return hwndChild;
}


/***********************************************************************
137
 *           DEFDLG_SetDefId
Alexandre Julliard's avatar
Alexandre Julliard committed
138
 *
139
 * Set the default button id.
Alexandre Julliard's avatar
Alexandre Julliard committed
140
 */
141
static BOOL DEFDLG_SetDefId( HWND hwndDlg, DIALOGINFO *dlgInfo, WPARAM wParam)
Alexandre Julliard's avatar
Alexandre Julliard committed
142
{
143
    DWORD dlgcode=0; /* initialize just to avoid a warning */
144 145
    HWND hwndOld, hwndNew = GetDlgItem(hwndDlg, wParam);
    INT old_id = dlgInfo->idResult;
146 147

    dlgInfo->idResult = wParam;
Alexandre Julliard's avatar
Alexandre Julliard committed
148
    if (hwndNew &&
149
        !((dlgcode=SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 ))
150
            & (DLGC_UNDEFPUSHBUTTON | DLGC_BUTTON)))
Alexandre Julliard's avatar
Alexandre Julliard committed
151
        return FALSE;  /* Destination is not a push button */
152

153 154
    /* Make sure the old default control is a valid push button ID */
    hwndOld = GetDlgItem( hwndDlg, old_id );
155
    if (!hwndOld || !(SendMessageW( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
156 157
        hwndOld = DEFDLG_FindDefButton( hwndDlg );
    if (hwndOld && hwndOld != hwndNew)
158
        SendMessageW( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
159 160

    if (hwndNew)
Alexandre Julliard's avatar
Alexandre Julliard committed
161
    {
162
        if(dlgcode & DLGC_UNDEFPUSHBUTTON)
163
            SendMessageW( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
Alexandre Julliard's avatar
Alexandre Julliard committed
164
    }
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
    return TRUE;
}


/***********************************************************************
 *           DEFDLG_SetDefButton
 *
 * Set the new default button to be hwndNew.
 */
static BOOL DEFDLG_SetDefButton( HWND hwndDlg, DIALOGINFO *dlgInfo, HWND hwndNew )
{
    DWORD dlgcode=0; /* initialize just to avoid a warning */
    HWND hwndOld = GetDlgItem( hwndDlg, dlgInfo->idResult );

    if (hwndNew &&
        !((dlgcode=SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 ))
            & (DLGC_UNDEFPUSHBUTTON | DLGC_DEFPUSHBUTTON)))
    {
        /**
         * Need to draw only default push button rectangle.
         * Since the next control is not a push button, need to draw the push
         * button rectangle for the default control.
         */
        hwndNew = hwndOld;
        dlgcode = SendMessageW(hwndNew, WM_GETDLGCODE, 0, 0 );
    }

    /* Make sure the old default control is a valid push button ID */
193
    if (!hwndOld || !(SendMessageW( hwndOld, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON))
194 195
        hwndOld = DEFDLG_FindDefButton( hwndDlg );
    if (hwndOld && hwndOld != hwndNew)
196
        SendMessageW( hwndOld, BM_SETSTYLE, BS_PUSHBUTTON, TRUE );
197

Alexandre Julliard's avatar
Alexandre Julliard committed
198 199
    if (hwndNew)
    {
200
        if(dlgcode & DLGC_UNDEFPUSHBUTTON)
201
            SendMessageW( hwndNew, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE );
Alexandre Julliard's avatar
Alexandre Julliard committed
202 203 204
    }
    return TRUE;
}
Alexandre Julliard's avatar
Alexandre Julliard committed
205 206 207


/***********************************************************************
Alexandre Julliard's avatar
Alexandre Julliard committed
208 209 210 211
 *           DEFDLG_Proc
 *
 * Implementation of DefDlgProc(). Only handle messages that need special
 * handling for dialogs.
Alexandre Julliard's avatar
Alexandre Julliard committed
212
 */
213
static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
Alexandre Julliard's avatar
Alexandre Julliard committed
214
                            LPARAM lParam, DIALOGINFO *dlgInfo )
Alexandre Julliard's avatar
Alexandre Julliard committed
215
{
Alexandre Julliard's avatar
Alexandre Julliard committed
216
    switch(msg)
Alexandre Julliard's avatar
Alexandre Julliard committed
217 218
    {
        case WM_ERASEBKGND:
219
        {
220 221
            HBRUSH brush = (HBRUSH)SendMessageW( hwnd, WM_CTLCOLORDLG, wParam, (LPARAM)hwnd );
            if (!brush) brush = (HBRUSH)DefWindowProcW( hwnd, WM_CTLCOLORDLG, wParam, (LPARAM)hwnd );
222 223 224 225 226 227 228 229 230 231
            if (brush)
            {
                RECT rect;
                HDC hdc = (HDC)wParam;
                GetClientRect( hwnd, &rect );
                DPtoLP( hdc, (LPPOINT)&rect, 2 );
                FillRect( hdc, &rect, brush );
            }
            return 1;
        }
232
        case WM_NCDESTROY:
233
            if (dlgInfo)
234
            {
235 236
                WND *wndPtr;

237 238 239
                if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
                if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
                HeapFree( GetProcessHeap(), 0, dlgInfo );
240 241 242 243

                wndPtr = WIN_GetPtr( hwnd );
                wndPtr->dlgInfo = NULL;
                WIN_ReleasePtr( wndPtr );
244
            }
245 246
              /* Window clean-up */
            return DefWindowProcA( hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
247

248 249 250
        case WM_SHOWWINDOW:
            if (!wParam) DEFDLG_SaveFocus( hwnd );
            return DefWindowProcA( hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
251

252 253 254 255
        case WM_ACTIVATE:
            if (wParam) DEFDLG_RestoreFocus( hwnd );
            else DEFDLG_SaveFocus( hwnd );
            return 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
256

257 258 259
        case WM_SETFOCUS:
            DEFDLG_RestoreFocus( hwnd );
            return 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
260 261

        case DM_SETDEFID:
262
            if (dlgInfo && !(dlgInfo->flags & DF_END))
263
                DEFDLG_SetDefId( hwnd, dlgInfo, wParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
264
            return 1;
Alexandre Julliard's avatar
Alexandre Julliard committed
265 266

        case DM_GETDEFID:
267
            if (dlgInfo && !(dlgInfo->flags & DF_END))
Alexandre Julliard's avatar
Alexandre Julliard committed
268
            {
269
                HWND hwndDefId;
Alexandre Julliard's avatar
Alexandre Julliard committed
270 271 272
                if (dlgInfo->idResult)
                    return MAKELONG( dlgInfo->idResult, DC_HASDEFID );
                if ((hwndDefId = DEFDLG_FindDefButton( hwnd )))
273
                    return MAKELONG( GetDlgCtrlID( hwndDefId ), DC_HASDEFID);
Alexandre Julliard's avatar
Alexandre Julliard committed
274
            }
275
            return 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
276

277
        case WM_NEXTDLGCTL:
278 279
            if (dlgInfo)
            {
280
                HWND hwndDest = (HWND)wParam;
Alexandre Julliard's avatar
Alexandre Julliard committed
281
                if (!lParam)
282
                    hwndDest = GetNextDlgTabItem(hwnd, GetFocus(), wParam);
Alexandre Julliard's avatar
Alexandre Julliard committed
283
                if (hwndDest) DEFDLG_SetFocus( hwnd, hwndDest );
284
                DEFDLG_SetDefButton( hwnd, dlgInfo, hwndDest );
Alexandre Julliard's avatar
Alexandre Julliard committed
285
            }
Alexandre Julliard's avatar
Alexandre Julliard committed
286
            return 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
287

Alexandre Julliard's avatar
Alexandre Julliard committed
288 289 290 291
        case WM_ENTERMENULOOP:
        case WM_LBUTTONDOWN:
        case WM_NCLBUTTONDOWN:
            {
292
                HWND hwndFocus = GetFocus();
Alexandre Julliard's avatar
Alexandre Julliard committed
293 294
                if (hwndFocus)
                {
295
                    /* always make combo box hide its listbox control */
296 297
                    if (!SendMessageW( hwndFocus, CB_SHOWDROPDOWN, FALSE, 0 ))
                        SendMessageW( GetParent(hwndFocus), CB_SHOWDROPDOWN, FALSE, 0 );
Alexandre Julliard's avatar
Alexandre Julliard committed
298 299
                }
            }
300
            return DefWindowProcA( hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
301

302
        case WM_GETFONT:
303
            return dlgInfo ? (LRESULT)dlgInfo->hUserFont : 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
304

Alexandre Julliard's avatar
Alexandre Julliard committed
305
        case WM_CLOSE:
306
            PostMessageA( hwnd, WM_COMMAND, MAKEWPARAM(IDCANCEL, BN_CLICKED),
307
                            (LPARAM)GetDlgItem( hwnd, IDCANCEL ) );
Alexandre Julliard's avatar
Alexandre Julliard committed
308
            return 0;
Alexandre Julliard's avatar
Alexandre Julliard committed
309 310 311 312
    }
    return 0;
}

313
/***********************************************************************
314
*               DIALOG_get_info
315
*
316 317
* Get the DIALOGINFO structure of a window, allocating it if needed
* and 'create' is TRUE.
318
*/
319
DIALOGINFO *DIALOG_get_info( HWND hwnd, BOOL create )
320 321
{
    WND* wndPtr;
322
    DIALOGINFO* dlgInfo;
323

324 325
    wndPtr = WIN_GetPtr( hwnd );
    if (!wndPtr || wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP)
326 327
    {
        SetLastError( ERROR_INVALID_WINDOW_HANDLE );
328
        return NULL;
329
    }
330 331 332 333

    dlgInfo = wndPtr->dlgInfo;

    if (!dlgInfo && create)
334
    {
335 336
        if (!(dlgInfo = HeapAlloc( GetProcessHeap(), 0, sizeof(*dlgInfo) )))
            goto out;
337 338 339 340 341
        dlgInfo->hwndFocus   = 0;
        dlgInfo->hUserFont   = 0;
        dlgInfo->hMenu       = 0;
        dlgInfo->xBaseUnit   = 0;
        dlgInfo->yBaseUnit   = 0;
342
        dlgInfo->idResult    = IDOK;
343
        dlgInfo->flags       = 0;
344
        wndPtr->dlgInfo = dlgInfo;
345
    }
346 347 348

out:
    WIN_ReleasePtr( wndPtr );
349 350 351
    return dlgInfo;
}

Alexandre Julliard's avatar
Alexandre Julliard committed
352
/***********************************************************************
353
 *              DefDlgProcA (USER32.@)
Alexandre Julliard's avatar
Alexandre Julliard committed
354
 */
355
LRESULT WINAPI DefDlgProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
Alexandre Julliard's avatar
Alexandre Julliard committed
356
{
357
    DIALOGINFO *dlgInfo;
358
    DLGPROC dlgproc;
359
    LRESULT result = 0;
360

361
    /* Perform DIALOGINFO initialization if not done */
362
    if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0;
363

364
    SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, 0 );
Alexandre Julliard's avatar
Alexandre Julliard committed
365

366 367
    if ((dlgproc = DEFDLG_GetDlgProc( hwnd ))) /* Call dialog procedure */
        result = WINPROC_CallDlgProcA( dlgproc, hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
368

369
    if (!result && IsWindow(hwnd))
Alexandre Julliard's avatar
Alexandre Julliard committed
370
    {
Alexandre Julliard's avatar
Alexandre Julliard committed
371 372 373 374 375 376 377 378 379 380 381 382 383 384
        /* callback didn't process this message */

        switch(msg)
        {
            case WM_ERASEBKGND:
            case WM_SHOWWINDOW:
            case WM_ACTIVATE:
            case WM_SETFOCUS:
            case DM_SETDEFID:
            case DM_GETDEFID:
            case WM_NEXTDLGCTL:
            case WM_GETFONT:
            case WM_CLOSE:
            case WM_NCDESTROY:
Alexandre Julliard's avatar
Alexandre Julliard committed
385 386 387
            case WM_ENTERMENULOOP:
            case WM_LBUTTONDOWN:
            case WM_NCLBUTTONDOWN:
388
                 return DEFDLG_Proc( hwnd, msg, wParam, lParam, dlgInfo );
Alexandre Julliard's avatar
Alexandre Julliard committed
389 390 391 392 393 394 395
            case WM_INITDIALOG:
            case WM_VKEYTOITEM:
            case WM_COMPAREITEM:
            case WM_CHARTOITEM:
                 break;

            default:
396
                 return DefWindowProcA( hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
397
        }
Alexandre Julliard's avatar
Alexandre Julliard committed
398
    }
399 400 401 402 403 404 405 406

    if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) ||
         msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
         msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM ||
         msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
        return result;

    return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT );
Alexandre Julliard's avatar
Alexandre Julliard committed
407 408 409 410
}


/***********************************************************************
411
 *              DefDlgProcW (USER32.@)
Alexandre Julliard's avatar
Alexandre Julliard committed
412
 */
413
LRESULT WINAPI DefDlgProcW( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
Alexandre Julliard's avatar
Alexandre Julliard committed
414
{
415
    DIALOGINFO *dlgInfo;
416
    DLGPROC dlgproc;
417
    LRESULT result = 0;
418

419
    /* Perform DIALOGINFO initialization if not done */
420
    if(!(dlgInfo = DIALOG_get_info( hwnd, TRUE ))) return 0;
421

422
    SetWindowLongPtrW( hwnd, DWLP_MSGRESULT, 0 );
Alexandre Julliard's avatar
Alexandre Julliard committed
423

424 425
    if ((dlgproc = DEFDLG_GetDlgProc( hwnd ))) /* Call dialog procedure */
        result = WINPROC_CallDlgProcW( dlgproc, hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
426

427
    if (!result && IsWindow(hwnd))
Alexandre Julliard's avatar
Alexandre Julliard committed
428
    {
Alexandre Julliard's avatar
Alexandre Julliard committed
429 430 431 432 433 434 435 436 437 438 439 440 441 442
        /* callback didn't process this message */

        switch(msg)
        {
            case WM_ERASEBKGND:
            case WM_SHOWWINDOW:
            case WM_ACTIVATE:
            case WM_SETFOCUS:
            case DM_SETDEFID:
            case DM_GETDEFID:
            case WM_NEXTDLGCTL:
            case WM_GETFONT:
            case WM_CLOSE:
            case WM_NCDESTROY:
Alexandre Julliard's avatar
Alexandre Julliard committed
443 444 445
            case WM_ENTERMENULOOP:
            case WM_LBUTTONDOWN:
            case WM_NCLBUTTONDOWN:
446
                 return DEFDLG_Proc( hwnd, msg, wParam, lParam, dlgInfo );
Alexandre Julliard's avatar
Alexandre Julliard committed
447 448 449 450 451 452 453
            case WM_INITDIALOG:
            case WM_VKEYTOITEM:
            case WM_COMPAREITEM:
            case WM_CHARTOITEM:
                 break;

            default:
454
                 return DefWindowProcW( hwnd, msg, wParam, lParam );
Alexandre Julliard's avatar
Alexandre Julliard committed
455
        }
Alexandre Julliard's avatar
Alexandre Julliard committed
456
    }
457 458 459 460 461 462 463 464

    if ((msg >= WM_CTLCOLORMSGBOX && msg <= WM_CTLCOLORSTATIC) ||
         msg == WM_CTLCOLOR || msg == WM_COMPAREITEM ||
         msg == WM_VKEYTOITEM || msg == WM_CHARTOITEM ||
         msg == WM_QUERYDRAGICON || msg == WM_INITDIALOG)
        return result;

    return GetWindowLongPtrW( hwnd, DWLP_MSGRESULT );
Alexandre Julliard's avatar
Alexandre Julliard committed
465
}