Changeset 2250 for trunk/src


Ignore:
Timestamp:
Dec 29, 1999, 3:37:19 PM (26 years ago)
Author:
sandervl
Message:

PostMessage memory leak fixed

Location:
trunk/src/user32
Files:
10 edited

Legend:

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

    r2246 r2250  
    1 /* $Id: oslibmsg.cpp,v 1.17 1999-12-29 12:39:44 sandervl Exp $ */
     1/* $Id: oslibmsg.cpp,v 1.18 1999-12-29 14:37:16 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    124124ULONG TranslateWinMsg(ULONG msg, BOOL fMinFilter)
    125125{
    126  POSTMSG_PACKET *packet;
    127 
    128126    if(msg == 0)
    129127        return 0;
     
    235233    } while (eaten);
    236234  }
    237   OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode);
     235  OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode, MSG_REMOVE);
    238236  return rc;
    239237}
     
    287285  }
    288286
    289   OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode);
     287  OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, (fRemove & PM_REMOVE_W) ? MSG_REMOVE : MSG_NOREMOVE);
    290288  //TODO: This is not safe! There's no guarantee this message will be dispatched and it might overwrite a previous message
    291289  if(fRemove & PM_REMOVE_W) {
     
    366364//******************************************************************************
    367365//******************************************************************************
    368 BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
    369 {
    370   return WinPostMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
    371 }
    372 //******************************************************************************
    373 //******************************************************************************
    374 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
    375 {
    376   return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
     366ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode)
     367{
     368 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
     369
     370    packet->Msg    = msg;
     371    packet->wParam = wParam;
     372    packet->lParam = lParam;
     373
     374    return (ULONG)WinSendMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
    377375}
    378376//******************************************************************************
     
    380378ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend)
    381379{
    382   return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam,
    383                          (fSend) ? BMSG_SEND : BMSG_POST);
    384 }
    385 //******************************************************************************
    386 //******************************************************************************
    387 BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
     380    return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam,
     381                           (fSend) ? BMSG_SEND : BMSG_POST);
     382}
     383//******************************************************************************
     384//******************************************************************************
     385BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode)
     386{
     387 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
     388
     389    packet->Msg = msg;
     390    packet->wParam = wParam;
     391    packet->lParam = lParam;
     392    return WinPostMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
     393}
     394//******************************************************************************
     395//******************************************************************************
     396BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
    388397{
    389398 THDB *thdb = GetTHDBFromThreadId(threadid);
     399 POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    390400
    391401    if(thdb == NULL) {
     
    393403        return FALSE;
    394404    }
    395     return WinPostQueueMsg(thdb->hmq, msg, (MPARAM)wParam, (MPARAM)lParam);
    396 }
    397 //******************************************************************************
    398 //******************************************************************************
    399 
     405    dprintf(("PostThreadMessageA %x %x %x %x", threadid, msg, wParam, lParam));
     406    packet->Msg = msg;
     407    packet->wParam = wParam;
     408    packet->lParam = lParam;
     409    return WinPostQueueMsg(thdb->hmq, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
     410}
     411//******************************************************************************
     412//******************************************************************************
     413
  • trunk/src/user32/oslibmsg.h

    r2246 r2250  
    1 /* $Id: oslibmsg.h,v 1.9 1999-12-29 12:39:44 sandervl Exp $ */
     1/* $Id: oslibmsg.h,v 1.10 1999-12-29 14:37:16 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    1515ULONG TranslateWinMsg(ULONG msg);
    1616
    17 #define ODINMSG_NOEXTRAMSGS     0
    18 #define ODINMSG_EXTRAMSGS       1
     17#define MSG_NOREMOVE    0
     18#define MSG_REMOVE      1
    1919
    2020#ifdef OS2DEF_INCLUDED
    21 BOOL  OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs = ODINMSG_EXTRAMSGS);
     21BOOL  OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fMsgRemoved);
    2222void  WinToOS2MsgTranslate(MSG *winMsg, QMSG *os2Msg, BOOL isUnicode);
    2323
     
    4343ULONG OSLibWinQueryQueueStatus();
    4444
    45 BOOL  OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
    46 BOOL  OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
    47 ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
     45BOOL  OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
     46BOOL  OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode);
     47ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode);
    4848ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend);
    4949
  • trunk/src/user32/oslibmsgtranslate.cpp

    r2246 r2250  
    1 /* $Id: oslibmsgtranslate.cpp,v 1.4 1999-12-29 12:39:44 sandervl Exp $ */
     1/* $Id: oslibmsgtranslate.cpp,v 1.5 1999-12-29 14:37:16 sandervl Exp $ */
    22/*
    33 * Window message translation functions for OS/2
     
    102102//******************************************************************************
    103103//******************************************************************************
    104 BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs)
     104BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fMsgRemoved)
    105105{
    106106  Win32BaseWindow *win32wnd = 0;
     
    128128    {
    129129        packet = (POSTMSG_PACKET *)os2Msg->mp2;
    130         if(packet && (ULONG)os2Msg->mp1 == WIN32PM_MAGIC) {
     130        if(packet && ((ULONG)os2Msg->mp1 == WIN32MSG_MAGICA || (ULONG)os2Msg->mp1 == WIN32MSG_MAGICW)) {
    131131            winMsg->message = packet->Msg;
    132132            winMsg->wParam  = packet->wParam;
    133133            winMsg->lParam  = packet->lParam;
    134             if(win32wnd == NULL) {
    135                 free(packet); //messages posted by PostThreadMessage are never dispatched, so free the memory here
    136             }
     134            if(fMsgRemoved == MSG_REMOVE) free(packet); //free the shared memory here
    137135            break;
    138136        }
  • trunk/src/user32/pmwindow.cpp

    r2214 r2250  
    1 /* $Id: pmwindow.cpp,v 1.72 1999-12-27 18:43:42 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.73 1999-12-29 14:37:16 sandervl Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    167167        qmsg.reserved = 0;
    168168
    169         if(OS2ToWinMsgTranslate((PVOID)thdb, &qmsg, &winMsg, FALSE, ODINMSG_NOEXTRAMSGS) == FALSE)
     169        if(OS2ToWinMsgTranslate((PVOID)thdb, &qmsg, &winMsg, FALSE, MSG_REMOVE) == FALSE)
    170170        {//message was not translated
    171171            memset(&winMsg, 0, sizeof(MSG));
     
    178178  }
    179179
    180   if(msg == WIN32APP_POSTMSG && (ULONG)mp1 == WIN32PM_MAGIC) {
    181         //win32 app user message
    182         return (MRESULT)win32wnd->PostMessage((POSTMSG_PACKET *)mp2);
     180  if(msg == WIN32APP_POSTMSG) {
     181        //probably win32 app user message
     182        if((ULONG)mp1 == WIN32MSG_MAGICA) {
     183            return (MRESULT)win32wnd->DispatchMsgA(pWinMsg);
     184        }
     185        else
     186        if((ULONG)mp1 == WIN32MSG_MAGICW) {
     187            return (MRESULT)win32wnd->DispatchMsgW(pWinMsg);
     188        }
    183189  }
    184190  switch( msg )
     
    403409    case WM_COMMAND:
    404410        dprintf(("OS2: WM_COMMAND %x %x %x", hwnd, mp1, mp2));
    405         win32wnd->DispatchMsg(pWinMsg);
     411        win32wnd->DispatchMsgA(pWinMsg);
    406412        break;
    407413
    408414    case WM_SYSCOMMAND:
    409         win32wnd->DispatchMsg(pWinMsg);
     415        win32wnd->DispatchMsgA(pWinMsg);
    410416        break;
    411417
    412418    case WM_CHAR:
    413         win32wnd->DispatchMsg(pWinMsg);
     419        win32wnd->DispatchMsgA(pWinMsg);
    414420        break;
    415421
     
    419425
    420426    case WM_TIMER:
    421         win32wnd->DispatchMsg(pWinMsg);
     427        win32wnd->DispatchMsgA(pWinMsg);
    422428        goto RunDefWndProc;
    423429
     
    461467
    462468    case WM_PAINT:
    463         win32wnd->DispatchMsg(pWinMsg);
     469        win32wnd->DispatchMsgA(pWinMsg);
    464470        goto RunDefWndProc;
    465471
     
    488494    case WM_CONTEXTMENU:
    489495    {
    490         win32wnd->DispatchMsg(pWinMsg);
     496        win32wnd->DispatchMsgA(pWinMsg);
    491497
    492498        RestoreOS2TIB();
  • trunk/src/user32/win32dlg.cpp

    r2200 r2250  
    1 /* $Id: win32dlg.cpp,v 1.38 1999-12-24 18:39:11 sandervl Exp $ */
     1/* $Id: win32dlg.cpp,v 1.39 1999-12-29 14:37:17 sandervl Exp $ */
    22/*
    33 * Win32 Dialog Code for OS/2
     
    806806
    807807    case WM_CLOSE:
    808         PostMessageA(WM_COMMAND, IDCANCEL, (LPARAM)GetDlgItem( getWindowHandle(), IDCANCEL ) );
     808        PostMessageA(getWindowHandle(), WM_COMMAND, IDCANCEL, (LPARAM)GetDlgItem( getWindowHandle(), IDCANCEL ) );
    809809        return 0;
    810810
  • trunk/src/user32/win32wbase.cpp

    r2246 r2250  
    1 /* $Id: win32wbase.cpp,v 1.123 1999-12-29 12:39:45 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.124 1999-12-29 14:37:17 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    923923//******************************************************************************
    924924//******************************************************************************
    925 ULONG Win32BaseWindow::DispatchMsg(MSG *msg)
     925ULONG Win32BaseWindow::DispatchMsgA(MSG *msg)
    926926{
    927927    return SendInternalMessageA(msg->message, msg->wParam, msg->lParam);
     928}
     929//******************************************************************************
     930//******************************************************************************
     931ULONG Win32BaseWindow::DispatchMsgW(MSG *msg)
     932{
     933    return SendInternalMessageW(msg->message, msg->wParam, msg->lParam);
    928934}
    929935//******************************************************************************
     
    18181824            Win32BaseWindow *window = GetTopParent();
    18191825            if(window && !(window->getClass()->getStyle() & CS_NOCLOSE))
    1820                 window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0);
     1826                PostMessageA(getWindowHandle(), WM_SYSCOMMAND, SC_CLOSE, 0);
    18211827        }
    18221828
     
    19771983LRESULT Win32BaseWindow::SendMessageA(ULONG Msg, WPARAM wParam, LPARAM lParam)
    19781984{
    1979  POSTMSG_PACKET *packet;
    1980 
    19811985    //if the destination window is created by this process & thread, call window proc directly
    19821986    if(dwProcessId == currentProcessId && dwThreadId == GetCurrentThreadId()) {
     
    19841988    }
    19851989    //otherwise use WinSendMsg to send it to the right process/thread
    1986     packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    1987     packet->Msg = Msg;
    1988     packet->wParam = wParam;
    1989     packet->lParam = lParam;
    1990     packet->fUnicode = FALSE;
    1991     return OSLibSendMessage(getOS2WindowHandle(), WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
     1990    return OSLibSendMessage(getOS2WindowHandle(), Msg, wParam, lParam, FALSE);
    19921991}
    19931992//******************************************************************************
     
    19951994LRESULT Win32BaseWindow::SendMessageW(ULONG Msg, WPARAM wParam, LPARAM lParam)
    19961995{
    1997  POSTMSG_PACKET *packet;
    1998 
    19991996    //if the destination window is created by this process & thread, call window proc directly
    20001997    if(dwProcessId == currentProcessId && dwThreadId == GetCurrentThreadId()) {
     
    20021999    }
    20032000    //otherwise use WinSendMsg to send it to the right process/thread
    2004     packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    2005     packet->Msg = Msg;
    2006     packet->wParam = wParam;
    2007     packet->lParam = lParam;
    2008     packet->fUnicode = TRUE;
    2009     return OSLibSendMessage(getOS2WindowHandle(), WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
     2001    return OSLibSendMessage(getOS2WindowHandle(), Msg, wParam, lParam, TRUE);
    20102002}
    20112003//******************************************************************************
     
    21272119//******************************************************************************
    21282120//******************************************************************************
    2129 BOOL Win32BaseWindow::PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam)
    2130 {
    2131  POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    2132 
    2133     packet->Msg = msg;
    2134     packet->wParam = wParam;
    2135     packet->lParam = lParam;
    2136     packet->fUnicode = FALSE;
    2137     return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
    2138 }
    2139 //******************************************************************************
    2140 //******************************************************************************
    2141 BOOL Win32BaseWindow::PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam)
    2142 {
    2143  POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    2144 
    2145     packet->Msg = msg;
    2146     packet->wParam = wParam;
    2147     packet->lParam = lParam;
    2148     packet->fUnicode = TRUE;
    2149     return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
    2150 }
    2151 //******************************************************************************
    2152 //******************************************************************************
    2153 BOOL Win32BaseWindow::PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
    2154 {
    2155  POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    2156 
    2157     dprintf(("PostThreadMessageA %x %x %x %x", threadid, msg, wParam, lParam));
    2158     packet->Msg = msg;
    2159     packet->wParam = wParam;
    2160     packet->lParam = lParam;
    2161     packet->fUnicode = FALSE;
    2162     return OSLibPostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (LPARAM)packet);
    2163 }
    2164 //******************************************************************************
    2165 //******************************************************************************
    2166 BOOL Win32BaseWindow::PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
    2167 {
    2168  POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
    2169 
    2170     dprintf(("PostThreadMessageW %x %x %x %x", threadid, msg, wParam, lParam));
    2171     packet->Msg = msg;
    2172     packet->wParam = wParam;
    2173     packet->lParam = lParam;
    2174     packet->fUnicode = TRUE;
    2175     return OSLibPostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (LPARAM)packet);
    2176 }
    2177 //******************************************************************************
    2178 //******************************************************************************
    2179 ULONG Win32BaseWindow::PostMessage(POSTMSG_PACKET *packet)
    2180 {
    2181  ULONG rc;
    2182 
    2183     if(packet == NULL)
    2184         return 0;
    2185 
    2186     if(packet->fUnicode) {
    2187             rc = SendInternalMessageW(packet->Msg, packet->wParam, packet->lParam);
    2188     }
    2189     else    rc = SendInternalMessageA(packet->Msg, packet->wParam, packet->lParam);
    2190 
    2191     free(packet);
    2192     return rc;
    2193 }
    21942121//******************************************************************************
    21952122//TODO: Do this more efficiently
     
    22112138                        window->SendInternalMessageA(msg, wParam, lParam);
    22122139                }
    2213                 else    window->PostMessageA(msg, wParam, lParam);
     2140                else    PostMessageA(window->getWindowHandle(), msg, wParam, lParam);
    22142141            }
    22152142        }
     
    22242151 Win32BaseWindow *window;
    22252152 HWND hwnd = WNDHANDLE_MAGIC_HIGHWORD;
    2226 
    22272153
    22282154    dprintf(("BroadCastMessageW %x %x %x", msg, wParam, lParam));
     
    22372163                        window->SendInternalMessageW(msg, wParam, lParam);
    22382164                }
    2239                 else    window->PostMessageW(msg, wParam, lParam);
     2165                else    PostMessageW(window->getWindowHandle(), msg, wParam, lParam);
    22402166            }
    22412167        }
  • trunk/src/user32/win32wbase.h

    r2204 r2250  
    1 /* $Id: win32wbase.h,v 1.58 1999-12-26 17:30:19 cbratschi Exp $ */
     1/* $Id: win32wbase.h,v 1.59 1999-12-29 14:37:18 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    4141#define WIN32APP_USERMSGBASE      0x1000
    4242#define WIN32APP_POSTMSG          0x1000
     43#define WIN32MSG_MAGICA           0x12345678
     44#define WIN32MSG_MAGICW           0x12345679
    4345
    4446typedef struct
     
    4749        ULONG           wParam;
    4850        ULONG           lParam;
    49         ULONG           fUnicode;
    5051} POSTMSG_PACKET;
    5152
     
    8283         ULONG  MsgHitTest(MSG *msg);
    8384         ULONG  MsgNCPaint();
    84          ULONG  DispatchMsg(MSG *msg);
     85         ULONG  DispatchMsgA(MSG *msg);
     86         ULONG  DispatchMsgW(MSG *msg);
    8587
    8688         ULONG  MsgSetText(LPSTR lpsz, LONG cch);
     
    205207       LRESULT  SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
    206208       LRESULT  SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
    207        BOOL     PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
    208        BOOL     PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
    209        ULONG    PostMessage(POSTMSG_PACKET *packet);
    210 static BOOL     PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
    211 static BOOL     PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
    212209static LRESULT  BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam);
    213210static LRESULT  BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
  • trunk/src/user32/win32wmdichild.cpp

    r2185 r2250  
    1 /* $Id: win32wmdichild.cpp,v 1.16 1999-12-21 17:03:45 cbratschi Exp $ */
     1/* $Id: win32wmdichild.cpp,v 1.17 1999-12-29 14:37:18 sandervl Exp $ */
    22/*
    33 * Win32 MDI Child Window Class for OS/2
     
    112112    case WM_MENUCHAR:
    113113        /* MDI children don't have menu bars */
    114         client->PostMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
     114        PostMessageA(client->getWindowHandle(), WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
    115115        return 0x00010000L;
    116116
  • trunk/src/user32/win32wmdiclient.cpp

    r2189 r2250  
    1 /* $Id: win32wmdiclient.cpp,v 1.18 1999-12-22 18:09:32 cbratschi Exp $ */
     1/* $Id: win32wmdiclient.cpp,v 1.19 1999-12-29 14:37:18 sandervl Exp $ */
    22/*
    33 * Win32 MDI Client Window Class for OS/2
     
    12261226    {
    12271227        mdiFlags |= MDIF_NEEDUPDATE;
    1228         PostMessageA(WM_MDICALCCHILDSCROLL, 0, 0);
     1228        PostMessageA(getWindowHandle(), WM_MDICALCCHILDSCROLL, 0, 0);
    12291229    }
    12301230    sbRecalc = recalc;
  • trunk/src/user32/windowmsg.cpp

    r2246 r2250  
    1 /* $Id: windowmsg.cpp,v 1.14 1999-12-29 12:39:45 sandervl Exp $ */
     1/* $Id: windowmsg.cpp,v 1.15 1999-12-29 14:37:19 sandervl Exp $ */
    22/*
    33 * Win32 window message APIs for OS/2
     
    175175    }
    176176    dprintf(("PostMessageA, %x %x %x %x", hwnd, msg, wParam, lParam));
    177     return window->PostMessageA(msg, wParam, lParam);
     177    return OSLibPostMessage(window->getOS2WindowHandle(), msg, wParam, lParam, FALSE);
    178178}
    179179//******************************************************************************
     
    198198    }
    199199    dprintf(("PostMessageW, %x %x %x %x", hwnd, msg, wParam, lParam));
    200     return window->PostMessageW(msg, wParam, lParam);
     200    return OSLibPostMessage(window->getOS2WindowHandle(), msg, wParam, lParam, TRUE);
     201}
     202//******************************************************************************
     203//******************************************************************************
     204BOOL WIN32API PostThreadMessageA( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
     205{
     206    return OSLibPostThreadMessage(threadid, msg, wParam, lParam, FALSE);
     207}
     208//******************************************************************************
     209//******************************************************************************
     210BOOL WIN32API PostThreadMessageW( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
     211{
     212    return OSLibPostThreadMessage(threadid, msg, wParam, lParam, TRUE);
    201213}
    202214//******************************************************************************
     
    221233    dprintf(("USER32: ReplyMessage %x", result));
    222234    return OSLibWinReplyMessage(result);
    223 }
    224 //******************************************************************************
    225 //******************************************************************************
    226 BOOL WIN32API PostThreadMessageA( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
    227 {
    228     return Win32BaseWindow::PostThreadMessageA(threadid, msg, wParam, lParam);
    229 }
    230 //******************************************************************************
    231 //******************************************************************************
    232 BOOL WIN32API PostThreadMessageW( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
    233 {
    234     return Win32BaseWindow::PostThreadMessageW(threadid, msg, wParam, lParam);
    235235}
    236236//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.