Ignore:
Timestamp:
May 11, 2004, 11:08:20 AM (21 years ago)
Author:
sandervl
Message:

DT: Added wrappers for calling window handlers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/windowmsg.cpp

    r10439 r10602  
    1 /* $Id: windowmsg.cpp,v 1.49 2004-02-04 14:59:57 bird Exp $ */
     1/* $Id: windowmsg.cpp,v 1.50 2004-05-11 09:08:20 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    3434#define INCL_TIMERWIN32
    3535#include "timer.h"
     36#include "callwrap.h"
    3637
    3738#define DBG_LOCALLOG    DBG_windowmsg
     
    326327 * @author  knut st. osmundsen <bird-srcspam@anduin.net>
    327328 * @remark  One cannot attach a threads input queue to it self.
     329 * @remark  This implemenation requires the thread which input is 'forwarded' to
     330 *          process it's message queue. Window (and wine) will not bother that thread
     331 *          at all with the messages. (DEADLOCK WARNING)
    328332 * @todo    Not sure if all this is 100% ok according to the windows reality.
    329333 *          I'm sure some error cases aren't caught.
     
    10021006    if (WINPROC_MapMsg32ATo32W( hwnd, msg, &wParam, &lParam ) == -1) return 0;
    10031007
    1004     result = func( hwnd, msg, wParam, lParam );
     1008    result = WrapCallback4(func, hwnd, msg, wParam, lParam );
    10051009    WINPROC_UnmapMsg32ATo32W( hwnd, msg, wParam, lParam );
    10061010
     
    10131017        {
    10141018            LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR ));
    1015             result = func( hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )ustr );
     1019            result = WrapCallback4(func, hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )ustr );
    10161020            result = lstrlenWtoA( ustr, result );
    10171021            HeapFree( GetProcessHeap(), 0, ustr );
     
    10221026        {
    10231027            LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR ));
    1024             result = func( hwnd, LB_GETTEXT, wParam, ( LPARAM )ustr );
     1028            result = WrapCallback4(func, hwnd, LB_GETTEXT, wParam, ( LPARAM )ustr );
    10251029            if( result != LB_ERR )
    10261030                result = lstrlenWtoA( ustr, result );
     
    10341038        {
    10351039            LPWSTR ustr = ( LPWSTR )HeapAlloc( GetProcessHeap(), 0, ( result + 1 ) * sizeof( WCHAR ));
    1036             result = func( hwnd, CB_GETLBTEXT, wParam, ( LPARAM )ustr );
     1040            result = WrapCallback4(func, hwnd, CB_GETLBTEXT, wParam, ( LPARAM )ustr );
    10371041            if( result != CB_ERR )
    10381042                result = lstrlenWtoA( ustr, result );
     
    10601064    if (WINPROC_MapMsg32WTo32A( hwnd, msg, &wParam, &lParam ) == -1) return 0;
    10611065
    1062     result = func( hwnd, msg, wParam, lParam );
     1066    result = WrapCallback4(func, hwnd, msg, wParam, lParam );
    10631067    WINPROC_UnmapMsg32WTo32A( hwnd, msg, wParam, lParam );
    10641068
     
    10711075        {
    10721076            LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 );
    1073             result = func( hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )astr );
     1077            result = WrapCallback4(func, hwnd, WM_GETTEXT, ( WPARAM )( result + 1 ), ( LPARAM )astr );
    10741078            result = lstrlenAtoW( astr, result );
    10751079            HeapFree( GetProcessHeap(), 0, astr );
     
    10801084        {
    10811085            LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 );
    1082             result = func( hwnd, LB_GETTEXT, wParam, ( LPARAM )astr );
     1086            result = WrapCallback4(func, hwnd, LB_GETTEXT, wParam, ( LPARAM )astr );
    10831087            if( result != LB_ERR )
    10841088                result = lstrlenAtoW( astr, result );
     
    10921096        {
    10931097            LPSTR astr = ( LPSTR )HeapAlloc( GetProcessHeap(), 0, result + 1 );
    1094             result = func( hwnd, CB_GETLBTEXT, wParam, ( LPARAM )astr );
     1098            result = WrapCallback4(func, hwnd, CB_GETLBTEXT, wParam, ( LPARAM )astr );
    10951099            if( result != CB_ERR )
    10961100                result = lstrlenAtoW( astr, result );
Note: See TracChangeset for help on using the changeset viewer.