Index: trunk/src/user32/USER32.DEF
===================================================================
--- trunk/src/user32/USER32.DEF	(revision 56)
+++ trunk/src/user32/USER32.DEF	(revision 57)
@@ -120,5 +120,5 @@
     DdeReconnect               = _DdeReconnect@4             @115
     DdeSetQualityOfService     = _DdeSetQualityOfService@12  @116
-    DdeSetUserHandle           = _DdeSetUserHandle@12         @117
+    DdeSetUserHandle           = _DdeSetUserHandle@12        @117
     DdeUnaccessData            = _DdeUnaccessData@4          @118
     DdeUninitialize            = _DdeUninitialize@4          @119
@@ -156,7 +156,7 @@
     DragObject                 = _DragObject@20              @151
     DrawAnimatedRects          = _DrawAnimatedRects@16       @152
-    DrawCaption                = _DrawCaption@16              @153
-;    DrawCaptionTempA           = _DrawCaptionTempA@??        @154
-;    DrawCaptionTempW           = _DrawCaptionTempW@??        @155
+    DrawCaption                = _DrawCaption@16             @153
+    DrawCaptionTempA           = _DrawCaptionTempA@28        @154
+    DrawCaptionTempW           = _DrawCaptionTempW@28        @155
     DrawEdge                   = _DrawEdge@16                @156
     DrawFocusRect              = _DrawFocusRect@8            @157
@@ -245,5 +245,5 @@
 ;    GetInputDesktop            = _GetInputDesktop@??         @240
     GetInputState              = _GetInputState@0            @241
-;    GetInternalWindowPos       = _GetInternalWindowPos@??    @242
+    GetInternalWindowPos       = _GetInternalWindowPos@12    @242
     GetKBCodePage              = _GetKBCodePage@0            @243
     GetKeyNameTextA            = _GetKeyNameTextA@12         @244
@@ -329,5 +329,5 @@
     InsertMenuItemW            = _InsertMenuItemW@16         @324
     InsertMenuW                = _InsertMenuW@20             @325
-;    InternalGetWindowText      = _InternalGetWindowText@??   @326
+    InternalGetWindowText      = _InternalGetWindowText@12   @326
     IntersectRect              = _IntersectRect@12           @327
     InvalidateRect             = _InvalidateRect@12          @328
@@ -436,5 +436,5 @@
     RegisterNetworkCapabilities  = _RegisterNetworkCapabilities@8 @431
     RegisterSystemThread       = _RegisterSystemThread@8     @432
-;    RegisterTasklist           = _RegisterTasklist@??        @433
+    RegisterTasklist           = _RegisterTasklist@4         @433
     RegisterWindowMessageA     = _RegisterWindowMessageA@4   @434
     RegisterWindowMessageW     = _RegisterWindowMessageW@4   @435
Index: trunk/src/user32/user32.cpp
===================================================================
--- trunk/src/user32/user32.cpp	(revision 56)
+++ trunk/src/user32/user32.cpp	(revision 57)
@@ -1,3 +1,3 @@
-/* $Id: user32.cpp,v 1.4 1999-06-06 12:25:49 cbratschi Exp $ */
+/* $Id: user32.cpp,v 1.5 1999-06-08 18:59:07 phaller Exp $ */
 
 /*
@@ -39,16 +39,12 @@
 // WIN32API ClientThreadConnect
 // WIN32API DragObject
-// WIN32API DrawCaptionTempA
-// WIN32API DrawCaptionTempW
 // WIN32API DrawFrame
 // WIN32API EditWndProc
 // WIN32API EndTask
 // WIN32API GetInputDesktop
-// WIN32API GetInternalWindowPos
 // WIN32API GetNextQueueWindow
 // WIN32API GetShellWindow
 // WIN32API InitSharedTable
 // WIN32API InitTask
-// WIN32API InternalGetWindowText
 // WIN32API IsHungThread
 // WIN32API LockWindowStation
@@ -58,5 +54,4 @@
 // WIN32API RegisterNetworkCapabilities
 // WIN32API RegisterSystemThread
-// WIN32API RegisterTasklist
 // WIN32API SetDeskWallpaper
 // WIN32API SetDesktopBitmap
@@ -250,8 +245,25 @@
 int WIN32API GetWindowTextA( HWND arg1, LPSTR arg2, int  arg3)
 {
-    dprintf(("USER32:  GetWindowText\n"));
+    dprintf(("USER32:  GetWindowTextA\n"));
     return O32_GetWindowText(arg1, arg2, arg3);
 }
 //******************************************************************************
+
+/*******************************************************************
+ *      InternalGetWindowText    (USER32.326)
+ */
+int WIN32API InternalGetWindowText(HWND   hwnd,
+                                   LPWSTR lpString,
+                                   INT    nMaxCount )
+{
+    dprintf(("USER32: InternalGetWindowText(%08xh,%08xh,%08xh) not properly implemented.\n",
+             hwnd,
+             lpString,
+             nMaxCount));
+
+    return GetWindowTextW(hwnd,lpString,nMaxCount);
+}
+
+
 //******************************************************************************
 BOOL WIN32API GetWindowRect( HWND arg1, PRECT  arg2)
@@ -2298,4 +2310,29 @@
 }
 //******************************************************************************
+
+/***********************************************************************
+ *           GetInternalWindowPos   (USER32.245)
+ */
+UINT WIN32API GetInternalWindowPos(HWND    hwnd,
+                                   LPRECT  rectWnd,
+                                   LPPOINT ptIcon )
+{
+    WINDOWPLACEMENT wndpl;
+
+    dprintf(("USER32: GetInternalWindowPos(%08xh,%08xh,%08xh)\n",
+             hwnd,
+             rectWnd,
+             ptIcon));
+
+    if (O32_GetWindowPlacement( hwnd, &wndpl ))
+    {
+   if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
+   if (ptIcon)  *ptIcon = wndpl.ptMinPosition;
+   return wndpl.showCmd;
+    }
+    return 0;
+}
+
+
 //******************************************************************************
 int WIN32API GetWindowTextLengthW( HWND arg1)
@@ -6521,2 +6558,235 @@
   return (0); /* default */
 }
+
+
+/***********************************************************************
+ *           RegisterTasklist32                [USER32.436]
+ */
+DWORD WIN32API RegisterTasklist (DWORD x)
+{
+    dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
+             x));
+
+    return TRUE;
+}
+
+
+/***********************************************************************
+ * DrawCaptionTemp32A [USER32.599]
+ *
+ * PARAMS
+ *
+ * RETURNS
+ *     Success:
+ *     Failure:
+ */
+
+BOOL WIN32API DrawCaptionTempA(HWND       hwnd,
+                               HDC        hdc,
+                               const RECT *rect,
+                               HFONT      hFont,
+                               HICON      hIcon,
+                               LPCSTR     str,
+                               UINT       uFlags)
+{
+  RECT   rc = *rect;
+
+  dprintf(("USER32: DrawCaptionTempA(%08xh,%08xh,%08xh,%08xh,%08xh,%08xh,%08xh)\n",
+           hwnd,
+           hdc,
+           rect,
+           hFont,
+           hIcon,
+           str,
+           uFlags));
+
+  /* drawing background */
+  if (uFlags & DC_INBUTTON)
+  {
+    O32_FillRect (hdc,
+                  &rc,
+                  GetSysColorBrush (COLOR_3DFACE));
+
+    if (uFlags & DC_ACTIVE)
+    {
+      HBRUSH hbr = O32_SelectObject (hdc,
+                                     GetSysColorBrush (COLOR_ACTIVECAPTION));
+      O32_PatBlt (hdc,
+                  rc.left,
+                  rc.top,
+                  rc.right - rc.left,
+                  rc.bottom - rc.top,
+                  0xFA0089);
+
+      O32_SelectObject (hdc,
+                        hbr);
+    }
+  }
+  else
+  {
+    O32_FillRect (hdc,
+                  &rc,
+                  GetSysColorBrush ((uFlags & DC_ACTIVE) ?
+                    COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION));
+  }
+
+
+  /* drawing icon */
+  if ((uFlags & DC_ICON) && !(uFlags & DC_SMALLCAP))
+  {
+    POINT pt;
+
+    pt.x = rc.left + 2;
+    pt.y = (rc.bottom + rc.top - O32_GetSystemMetrics(SM_CYSMICON)) / 2;
+
+    if (hIcon)
+    {
+      DrawIconEx (hdc,
+                  pt.x,
+                  pt.y,
+                  hIcon,
+                  O32_GetSystemMetrics(SM_CXSMICON),
+                  O32_GetSystemMetrics(SM_CYSMICON),
+                  0,
+                  0,
+                  DI_NORMAL);
+    }
+    else
+    {
+    /* @@@PH 1999/06/08 not ported yet, just don't draw any icon
+      WND *wndPtr = WIN_FindWndPtr(hwnd);
+      HICON hAppIcon = 0;
+
+      if (wndPtr->class->hIconSm)
+        hAppIcon = wndPtr->class->hIconSm;
+      else
+        if (wndPtr->class->hIcon)
+          hAppIcon = wndPtr->class->hIcon;
+
+      DrawIconEx (hdc,
+                  pt.x,
+                  pt.y,
+                  hAppIcon,
+                  GetSystemMetrics(SM_CXSMICON),
+                  GetSystemMetrics(SM_CYSMICON),
+                  0,
+                  0,
+                  DI_NORMAL);
+
+      WIN_ReleaseWndPtr(wndPtr);
+      */
+    }
+
+    rc.left += (rc.bottom - rc.top);
+  }
+
+  /* drawing text */
+  if (uFlags & DC_TEXT)
+  {
+    HFONT hOldFont;
+
+    if (uFlags & DC_INBUTTON)
+      O32_SetTextColor (hdc,
+                        O32_GetSysColor (COLOR_BTNTEXT));
+    else
+      if (uFlags & DC_ACTIVE)
+        O32_SetTextColor (hdc,
+                          O32_GetSysColor (COLOR_CAPTIONTEXT));
+      else
+        O32_SetTextColor (hdc,
+                          O32_GetSysColor (COLOR_INACTIVECAPTIONTEXT));
+
+    O32_SetBkMode (hdc,
+                   TRANSPARENT);
+
+    if (hFont)
+      hOldFont = O32_SelectObject (hdc,
+                                   hFont);
+    else
+    {
+      NONCLIENTMETRICSA nclm;
+      HFONT             hNewFont;
+
+      nclm.cbSize = sizeof(NONCLIENTMETRICSA);
+      O32_SystemParametersInfo (SPI_GETNONCLIENTMETRICS,
+                                0,
+                                &nclm,
+                                0);
+      hNewFont = O32_CreateFontIndirect ((uFlags & DC_SMALLCAP) ?
+                                 &nclm.lfSmCaptionFont : &nclm.lfCaptionFont);
+      hOldFont = O32_SelectObject (hdc,
+                                   hNewFont);
+    }
+
+    if (str)
+      O32_DrawText (hdc,
+                    str,
+                    -1,
+                    &rc,
+                    DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
+    else
+    {
+      CHAR szText[128];
+      INT  nLen;
+
+      nLen = O32_GetWindowText (hwnd,
+                                szText,
+                                128);
+
+      O32_DrawText (hdc,
+                    szText,
+                    nLen,
+                    &rc,
+                    DT_SINGLELINE | DT_VCENTER | DT_NOPREFIX | DT_LEFT);
+    }
+
+    if (hFont)
+      O32_SelectObject (hdc,
+                        hOldFont);
+    else
+      O32_DeleteObject (O32_SelectObject (hdc,
+                                          hOldFont));
+  }
+
+  /* drawing focus ??? */
+  if (uFlags & 0x2000)
+  {
+    dprintf(("USER32: DrawCaptionTempA undocumented flag (0x2000)!\n"));
+  }
+
+  return 0;
+}
+
+
+/***********************************************************************
+ * DrawCaptionTemp32W [USER32.602]
+ *
+ * PARAMS
+ *
+ * RETURNS
+ *     Success:
+ *     Failure:
+ */
+
+BOOL WIN32API DrawCaptionTempW (HWND       hwnd,
+                                HDC        hdc,
+                                const RECT *rect,
+                                HFONT      hFont,
+                                HICON      hIcon,
+                                LPCWSTR    str,
+                                UINT       uFlags)
+{
+  LPSTR strAscii = UnicodeToAsciiString((LPWSTR)str);
+
+  BOOL res = DrawCaptionTempA (hwnd,
+                               hdc,
+                               rect,
+                               hFont,
+                               hIcon,
+                               strAscii,
+                               uFlags);
+
+  FreeAsciiString(strAscii);
+
+  return res;
+}
