Index: trunk/src/user32/oslibmsg.cpp
===================================================================
--- trunk/src/user32/oslibmsg.cpp	(revision 2249)
+++ trunk/src/user32/oslibmsg.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: oslibmsg.cpp,v 1.17 1999-12-29 12:39:44 sandervl Exp $ */
+/* $Id: oslibmsg.cpp,v 1.18 1999-12-29 14:37:16 sandervl Exp $ */
 /*
  * Window message translation functions for OS/2
@@ -124,6 +124,4 @@
 ULONG TranslateWinMsg(ULONG msg, BOOL fMinFilter)
 {
- POSTMSG_PACKET *packet;
-
     if(msg == 0)
         return 0;
@@ -235,5 +233,5 @@
     } while (eaten);
   }
-  OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode);
+  OS2ToWinMsgTranslate((PVOID)thdb, MsgThreadPtr, pMsg, isUnicode, MSG_REMOVE);
   return rc;
 }
@@ -287,5 +285,5 @@
   }
 
-  OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode);
+  OS2ToWinMsgTranslate((PVOID)thdb, &os2msg, pMsg, isUnicode, (fRemove & PM_REMOVE_W) ? MSG_REMOVE : MSG_NOREMOVE);
   //TODO: This is not safe! There's no guarantee this message will be dispatched and it might overwrite a previous message
   if(fRemove & PM_REMOVE_W) {
@@ -366,13 +364,13 @@
 //******************************************************************************
 //******************************************************************************
-BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
-{
-  return WinPostMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
-}
-//******************************************************************************
-//******************************************************************************
-ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam)
-{
-  return (ULONG)WinSendMsg(hwnd, msg, (MPARAM)wParam, (MPARAM)lParam);
+ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode)
+{
+ POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
+
+    packet->Msg    = msg;
+    packet->wParam = wParam;
+    packet->lParam = lParam;
+
+    return (ULONG)WinSendMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
 }
 //******************************************************************************
@@ -380,12 +378,24 @@
 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend)
 {
-  return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam,
-                         (fSend) ? BMSG_SEND : BMSG_POST);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
+    return WinBroadcastMsg(HWND_DESKTOP, msg, (MPARAM)wParam, (MPARAM)lParam,
+                           (fSend) ? BMSG_SEND : BMSG_POST);
+}
+//******************************************************************************
+//******************************************************************************
+BOOL OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode)
+{
+ POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
+
+    packet->Msg = msg;
+    packet->wParam = wParam;
+    packet->lParam = lParam;
+    return WinPostMsg(hwnd, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
+}
+//******************************************************************************
+//******************************************************************************
+BOOL OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
 {
  THDB *thdb = GetTHDBFromThreadId(threadid);
+ POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
 
     if(thdb == NULL) {
@@ -393,7 +403,11 @@
         return FALSE;
     }
-    return WinPostQueueMsg(thdb->hmq, msg, (MPARAM)wParam, (MPARAM)lParam);
-}
-//******************************************************************************
-//******************************************************************************
-
+    dprintf(("PostThreadMessageA %x %x %x %x", threadid, msg, wParam, lParam));
+    packet->Msg = msg;
+    packet->wParam = wParam;
+    packet->lParam = lParam;
+    return WinPostQueueMsg(thdb->hmq, WIN32APP_POSTMSG, (MPARAM)((fUnicode) ? WIN32MSG_MAGICW : WIN32MSG_MAGICA), (MPARAM)packet);
+}
+//******************************************************************************
+//******************************************************************************
+
Index: trunk/src/user32/oslibmsg.h
===================================================================
--- trunk/src/user32/oslibmsg.h	(revision 2249)
+++ trunk/src/user32/oslibmsg.h	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: oslibmsg.h,v 1.9 1999-12-29 12:39:44 sandervl Exp $ */
+/* $Id: oslibmsg.h,v 1.10 1999-12-29 14:37:16 sandervl Exp $ */
 /*
  * Window message translation functions for OS/2
@@ -15,9 +15,9 @@
 ULONG TranslateWinMsg(ULONG msg);
 
-#define ODINMSG_NOEXTRAMSGS	0
-#define ODINMSG_EXTRAMSGS	1
+#define MSG_NOREMOVE	0
+#define MSG_REMOVE	1
 
 #ifdef OS2DEF_INCLUDED
-BOOL  OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs = ODINMSG_EXTRAMSGS);
+BOOL  OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fMsgRemoved);
 void  WinToOS2MsgTranslate(MSG *winMsg, QMSG *os2Msg, BOOL isUnicode);
 
@@ -43,7 +43,7 @@
 ULONG OSLibWinQueryQueueStatus();
 
-BOOL  OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL  OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
-ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam);
+BOOL  OSLibPostThreadMessage(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam, BOOL fUnicode);
+BOOL  OSLibPostMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode);
+ULONG OSLibSendMessage(HWND hwnd, ULONG msg, ULONG wParam, ULONG lParam, BOOL fUnicode);
 ULONG OSLibWinBroadcastMsg(ULONG msg, ULONG wParam, ULONG lParam, BOOL fSend);
 
Index: trunk/src/user32/oslibmsgtranslate.cpp
===================================================================
--- trunk/src/user32/oslibmsgtranslate.cpp	(revision 2249)
+++ trunk/src/user32/oslibmsgtranslate.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: oslibmsgtranslate.cpp,v 1.4 1999-12-29 12:39:44 sandervl Exp $ */
+/* $Id: oslibmsgtranslate.cpp,v 1.5 1999-12-29 14:37:16 sandervl Exp $ */
 /*
  * Window message translation functions for OS/2
@@ -102,5 +102,5 @@
 //******************************************************************************
 //******************************************************************************
-BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fTranslateExtraMsgs)
+BOOL OS2ToWinMsgTranslate(void *pThdb, QMSG *os2Msg, MSG *winMsg, BOOL isUnicode, BOOL fMsgRemoved)
 {
   Win32BaseWindow *win32wnd = 0;
@@ -128,11 +128,9 @@
     {
         packet = (POSTMSG_PACKET *)os2Msg->mp2;
-        if(packet && (ULONG)os2Msg->mp1 == WIN32PM_MAGIC) {
+        if(packet && ((ULONG)os2Msg->mp1 == WIN32MSG_MAGICA || (ULONG)os2Msg->mp1 == WIN32MSG_MAGICW)) {
             winMsg->message = packet->Msg;
             winMsg->wParam  = packet->wParam;
             winMsg->lParam  = packet->lParam;
-            if(win32wnd == NULL) {
-                free(packet); //messages posted by PostThreadMessage are never dispatched, so free the memory here
-            }
+            if(fMsgRemoved == MSG_REMOVE) free(packet); //free the shared memory here
             break;
         }
Index: trunk/src/user32/pmwindow.cpp
===================================================================
--- trunk/src/user32/pmwindow.cpp	(revision 2249)
+++ trunk/src/user32/pmwindow.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: pmwindow.cpp,v 1.72 1999-12-27 18:43:42 sandervl Exp $ */
+/* $Id: pmwindow.cpp,v 1.73 1999-12-29 14:37:16 sandervl Exp $ */
 /*
  * Win32 Window Managment Code for OS/2
@@ -167,5 +167,5 @@
         qmsg.reserved = 0;
 
-        if(OS2ToWinMsgTranslate((PVOID)thdb, &qmsg, &winMsg, FALSE, ODINMSG_NOEXTRAMSGS) == FALSE)
+        if(OS2ToWinMsgTranslate((PVOID)thdb, &qmsg, &winMsg, FALSE, MSG_REMOVE) == FALSE)
         {//message was not translated
             memset(&winMsg, 0, sizeof(MSG));
@@ -178,7 +178,13 @@
   }
 
-  if(msg == WIN32APP_POSTMSG && (ULONG)mp1 == WIN32PM_MAGIC) {
-        //win32 app user message
-        return (MRESULT)win32wnd->PostMessage((POSTMSG_PACKET *)mp2);
+  if(msg == WIN32APP_POSTMSG) {
+        //probably win32 app user message
+        if((ULONG)mp1 == WIN32MSG_MAGICA) {
+            return (MRESULT)win32wnd->DispatchMsgA(pWinMsg);
+        }
+        else
+        if((ULONG)mp1 == WIN32MSG_MAGICW) {
+            return (MRESULT)win32wnd->DispatchMsgW(pWinMsg);
+        }
   }
   switch( msg )
@@ -403,13 +409,13 @@
     case WM_COMMAND:
         dprintf(("OS2: WM_COMMAND %x %x %x", hwnd, mp1, mp2));
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
         break;
 
     case WM_SYSCOMMAND:
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
         break;
 
     case WM_CHAR:
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
         break;
 
@@ -419,5 +425,5 @@
 
     case WM_TIMER:
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
         goto RunDefWndProc;
 
@@ -461,5 +467,5 @@
 
     case WM_PAINT:
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
         goto RunDefWndProc;
 
@@ -488,5 +494,5 @@
     case WM_CONTEXTMENU:
     {
-        win32wnd->DispatchMsg(pWinMsg);
+        win32wnd->DispatchMsgA(pWinMsg);
 
         RestoreOS2TIB();
Index: trunk/src/user32/win32dlg.cpp
===================================================================
--- trunk/src/user32/win32dlg.cpp	(revision 2249)
+++ trunk/src/user32/win32dlg.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: win32dlg.cpp,v 1.38 1999-12-24 18:39:11 sandervl Exp $ */
+/* $Id: win32dlg.cpp,v 1.39 1999-12-29 14:37:17 sandervl Exp $ */
 /*
  * Win32 Dialog Code for OS/2
@@ -806,5 +806,5 @@
 
     case WM_CLOSE:
-        PostMessageA(WM_COMMAND, IDCANCEL, (LPARAM)GetDlgItem( getWindowHandle(), IDCANCEL ) );
+        PostMessageA(getWindowHandle(), WM_COMMAND, IDCANCEL, (LPARAM)GetDlgItem( getWindowHandle(), IDCANCEL ) );
         return 0;
 
Index: trunk/src/user32/win32wbase.cpp
===================================================================
--- trunk/src/user32/win32wbase.cpp	(revision 2249)
+++ trunk/src/user32/win32wbase.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.cpp,v 1.123 1999-12-29 12:39:45 sandervl Exp $ */
+/* $Id: win32wbase.cpp,v 1.124 1999-12-29 14:37:17 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -923,7 +923,13 @@
 //******************************************************************************
 //******************************************************************************
-ULONG Win32BaseWindow::DispatchMsg(MSG *msg)
+ULONG Win32BaseWindow::DispatchMsgA(MSG *msg)
 {
     return SendInternalMessageA(msg->message, msg->wParam, msg->lParam);
+}
+//******************************************************************************
+//******************************************************************************
+ULONG Win32BaseWindow::DispatchMsgW(MSG *msg)
+{
+    return SendInternalMessageW(msg->message, msg->wParam, msg->lParam);
 }
 //******************************************************************************
@@ -1818,5 +1824,5 @@
             Win32BaseWindow *window = GetTopParent();
             if(window && !(window->getClass()->getStyle() & CS_NOCLOSE))
-                window->PostMessageA(WM_SYSCOMMAND, SC_CLOSE, 0);
+                PostMessageA(getWindowHandle(), WM_SYSCOMMAND, SC_CLOSE, 0);
         }
 
@@ -1977,6 +1983,4 @@
 LRESULT Win32BaseWindow::SendMessageA(ULONG Msg, WPARAM wParam, LPARAM lParam)
 {
- POSTMSG_PACKET *packet;
-
     //if the destination window is created by this process & thread, call window proc directly
     if(dwProcessId == currentProcessId && dwThreadId == GetCurrentThreadId()) {
@@ -1984,10 +1988,5 @@
     }
     //otherwise use WinSendMsg to send it to the right process/thread
-    packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-    packet->Msg = Msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = FALSE;
-    return OSLibSendMessage(getOS2WindowHandle(), WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
+    return OSLibSendMessage(getOS2WindowHandle(), Msg, wParam, lParam, FALSE);
 }
 //******************************************************************************
@@ -1995,6 +1994,4 @@
 LRESULT Win32BaseWindow::SendMessageW(ULONG Msg, WPARAM wParam, LPARAM lParam)
 {
- POSTMSG_PACKET *packet;
-
     //if the destination window is created by this process & thread, call window proc directly
     if(dwProcessId == currentProcessId && dwThreadId == GetCurrentThreadId()) {
@@ -2002,10 +1999,5 @@
     }
     //otherwise use WinSendMsg to send it to the right process/thread
-    packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-    packet->Msg = Msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = TRUE;
-    return OSLibSendMessage(getOS2WindowHandle(), WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
+    return OSLibSendMessage(getOS2WindowHandle(), Msg, wParam, lParam, TRUE);
 }
 //******************************************************************************
@@ -2127,69 +2119,4 @@
 //******************************************************************************
 //******************************************************************************
-BOOL Win32BaseWindow::PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam)
-{
- POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-
-    packet->Msg = msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = FALSE;
-    return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL Win32BaseWindow::PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam)
-{
- POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-
-    packet->Msg = msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = TRUE;
-    return OSLibPostMessage(OS2Hwnd, WIN32APP_POSTMSG, WIN32PM_MAGIC, (DWORD)packet);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL Win32BaseWindow::PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-
-    dprintf(("PostThreadMessageA %x %x %x %x", threadid, msg, wParam, lParam));
-    packet->Msg = msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = FALSE;
-    return OSLibPostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (LPARAM)packet);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL Win32BaseWindow::PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- POSTMSG_PACKET *packet = (POSTMSG_PACKET *)_smalloc(sizeof(POSTMSG_PACKET));
-
-    dprintf(("PostThreadMessageW %x %x %x %x", threadid, msg, wParam, lParam));
-    packet->Msg = msg;
-    packet->wParam = wParam;
-    packet->lParam = lParam;
-    packet->fUnicode = TRUE;
-    return OSLibPostThreadMessage(threadid, WIN32APP_POSTMSG, WIN32PM_MAGIC, (LPARAM)packet);
-}
-//******************************************************************************
-//******************************************************************************
-ULONG Win32BaseWindow::PostMessage(POSTMSG_PACKET *packet)
-{
- ULONG rc;
-
-    if(packet == NULL)
-        return 0;
-
-    if(packet->fUnicode) {
-            rc = SendInternalMessageW(packet->Msg, packet->wParam, packet->lParam);
-    }
-    else    rc = SendInternalMessageA(packet->Msg, packet->wParam, packet->lParam);
-
-    free(packet);
-    return rc;
-}
 //******************************************************************************
 //TODO: Do this more efficiently
@@ -2211,5 +2138,5 @@
                         window->SendInternalMessageA(msg, wParam, lParam);
                 }
-                else    window->PostMessageA(msg, wParam, lParam);
+                else    PostMessageA(window->getWindowHandle(), msg, wParam, lParam);
             }
         }
@@ -2224,5 +2151,4 @@
  Win32BaseWindow *window;
  HWND hwnd = WNDHANDLE_MAGIC_HIGHWORD;
-
 
     dprintf(("BroadCastMessageW %x %x %x", msg, wParam, lParam));
@@ -2237,5 +2163,5 @@
                         window->SendInternalMessageW(msg, wParam, lParam);
                 }
-                else    window->PostMessageW(msg, wParam, lParam);
+                else    PostMessageW(window->getWindowHandle(), msg, wParam, lParam);
             }
         }
Index: trunk/src/user32/win32wbase.h
===================================================================
--- trunk/src/user32/win32wbase.h	(revision 2249)
+++ trunk/src/user32/win32wbase.h	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: win32wbase.h,v 1.58 1999-12-26 17:30:19 cbratschi Exp $ */
+/* $Id: win32wbase.h,v 1.59 1999-12-29 14:37:18 sandervl Exp $ */
 /*
  * Win32 Window Base Class for OS/2
@@ -41,4 +41,6 @@
 #define WIN32APP_USERMSGBASE      0x1000
 #define WIN32APP_POSTMSG          0x1000
+#define WIN32MSG_MAGICA           0x12345678
+#define WIN32MSG_MAGICW           0x12345679
 
 typedef struct
@@ -47,5 +49,4 @@
         ULONG           wParam;
         ULONG           lParam;
-        ULONG           fUnicode;
 } POSTMSG_PACKET;
 
@@ -82,5 +83,6 @@
 	 ULONG  MsgHitTest(MSG *msg);
          ULONG  MsgNCPaint();
-	 ULONG  DispatchMsg(MSG *msg);
+	 ULONG  DispatchMsgA(MSG *msg);
+	 ULONG  DispatchMsgW(MSG *msg);
 
          ULONG  MsgSetText(LPSTR lpsz, LONG cch);
@@ -205,9 +207,4 @@
        LRESULT  SendMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
        LRESULT  SendMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
-       BOOL     PostMessageA(ULONG msg, WPARAM wParam, LPARAM lParam);
-       BOOL     PostMessageW(ULONG msg, WPARAM wParam, LPARAM lParam);
-       ULONG    PostMessage(POSTMSG_PACKET *packet);
-static BOOL     PostThreadMessageA(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
-static BOOL     PostThreadMessageW(ULONG threadid, UINT msg, WPARAM wParam, LPARAM lParam);
 static LRESULT  BroadcastMessageA(int type, UINT msg, WPARAM wParam, LPARAM lParam);
 static LRESULT  BroadcastMessageW(int type, UINT msg, WPARAM wParam, LPARAM lParam);
Index: trunk/src/user32/win32wmdichild.cpp
===================================================================
--- trunk/src/user32/win32wmdichild.cpp	(revision 2249)
+++ trunk/src/user32/win32wmdichild.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: win32wmdichild.cpp,v 1.16 1999-12-21 17:03:45 cbratschi Exp $ */
+/* $Id: win32wmdichild.cpp,v 1.17 1999-12-29 14:37:18 sandervl Exp $ */
 /*
  * Win32 MDI Child Window Class for OS/2
@@ -112,5 +112,5 @@
     case WM_MENUCHAR:
         /* MDI children don't have menu bars */
-        client->PostMessageA(WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
+        PostMessageA(client->getWindowHandle(), WM_SYSCOMMAND, (WPARAM)SC_KEYMENU, (LPARAM)LOWORD(wParam) );
         return 0x00010000L;
 
Index: trunk/src/user32/win32wmdiclient.cpp
===================================================================
--- trunk/src/user32/win32wmdiclient.cpp	(revision 2249)
+++ trunk/src/user32/win32wmdiclient.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: win32wmdiclient.cpp,v 1.18 1999-12-22 18:09:32 cbratschi Exp $ */
+/* $Id: win32wmdiclient.cpp,v 1.19 1999-12-29 14:37:18 sandervl Exp $ */
 /*
  * Win32 MDI Client Window Class for OS/2
@@ -1226,5 +1226,5 @@
     {
         mdiFlags |= MDIF_NEEDUPDATE;
-        PostMessageA(WM_MDICALCCHILDSCROLL, 0, 0);
+        PostMessageA(getWindowHandle(), WM_MDICALCCHILDSCROLL, 0, 0);
     }
     sbRecalc = recalc;
Index: trunk/src/user32/windowmsg.cpp
===================================================================
--- trunk/src/user32/windowmsg.cpp	(revision 2249)
+++ trunk/src/user32/windowmsg.cpp	(revision 2250)
@@ -1,3 +1,3 @@
-/* $Id: windowmsg.cpp,v 1.14 1999-12-29 12:39:45 sandervl Exp $ */
+/* $Id: windowmsg.cpp,v 1.15 1999-12-29 14:37:19 sandervl Exp $ */
 /*
  * Win32 window message APIs for OS/2
@@ -175,5 +175,5 @@
     }
     dprintf(("PostMessageA, %x %x %x %x", hwnd, msg, wParam, lParam));
-    return window->PostMessageA(msg, wParam, lParam);
+    return OSLibPostMessage(window->getOS2WindowHandle(), msg, wParam, lParam, FALSE);
 }
 //******************************************************************************
@@ -198,5 +198,17 @@
     }
     dprintf(("PostMessageW, %x %x %x %x", hwnd, msg, wParam, lParam));
-    return window->PostMessageW(msg, wParam, lParam);
+    return OSLibPostMessage(window->getOS2WindowHandle(), msg, wParam, lParam, TRUE);
+}
+//******************************************************************************
+//******************************************************************************
+BOOL WIN32API PostThreadMessageA( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+    return OSLibPostThreadMessage(threadid, msg, wParam, lParam, FALSE);
+}
+//******************************************************************************
+//******************************************************************************
+BOOL WIN32API PostThreadMessageW( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+    return OSLibPostThreadMessage(threadid, msg, wParam, lParam, TRUE);
 }
 //******************************************************************************
@@ -221,16 +233,4 @@
     dprintf(("USER32: ReplyMessage %x", result));
     return OSLibWinReplyMessage(result);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API PostThreadMessageA( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-    return Win32BaseWindow::PostThreadMessageA(threadid, msg, wParam, lParam);
-}
-//******************************************************************************
-//******************************************************************************
-BOOL WIN32API PostThreadMessageW( DWORD threadid, UINT msg, WPARAM wParam, LPARAM lParam)
-{
-    return Win32BaseWindow::PostThreadMessageW(threadid, msg, wParam, lParam);
 }
 //******************************************************************************
