Index: trunk/src/user32/clipboard.cpp
===================================================================
--- trunk/src/user32/clipboard.cpp	(revision 3214)
+++ trunk/src/user32/clipboard.cpp	(revision 3215)
@@ -1,3 +1,3 @@
-/* $Id: clipboard.cpp,v 1.5 2000-02-16 14:34:06 sandervl Exp $ */
+/* $Id: clipboard.cpp,v 1.6 2000-03-24 17:12:19 cbratschi Exp $ */
 
 /*
@@ -18,5 +18,5 @@
 #include "win32wbase.h"
 
-#define DBG_LOCALLOG	DBG_clipboard
+#define DBG_LOCALLOG    DBG_clipboard
 #include "dbglocal.h"
 
@@ -30,5 +30,5 @@
     if(!wndRemove) {
         dprintf(("ChangeClipboardChain, window %x not found", hwndRemove));
-	SetLastError(ERROR_INVALID_WINDOW_HANDLE);
+        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
         return 0;
     }
@@ -36,9 +36,9 @@
     if(!wndNext) {
         dprintf(("ChangeClipboardChain, window %x not found", hwndNext));
-	SetLastError(ERROR_INVALID_WINDOW_HANDLE);
+        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
         return 0;
     }
     dprintf(("USER32:  ChangeClipboardChain\n"));
-    return O32_ChangeClipboardChain(wndRemove->getOS2FrameWindowHandle(), 
+    return O32_ChangeClipboardChain(wndRemove->getOS2FrameWindowHandle(),
                                     wndNext->getOS2FrameWindowHandle());
 }
@@ -80,20 +80,21 @@
 //******************************************************************************
 //******************************************************************************
-int WIN32API GetClipboardFormatNameA( UINT arg1, LPSTR arg2, int  arg3)
-{
-    dprintf(("USER32:  GetClipboardFormatNameA %s\n", arg2));
-    return O32_GetClipboardFormatName(arg1, arg2, arg3);
-}
-//******************************************************************************
-//******************************************************************************
-int WIN32API GetClipboardFormatNameW(UINT arg1, LPWSTR arg2, int arg3)
-{
- int   rc;
- char *astring = UnicodeToAsciiString(arg2);
-
-    dprintf(("USER32:  GetClipboardFormatNameW %s\n", astring));
-    rc = O32_GetClipboardFormatName(arg1, astring, arg3);
-    FreeAsciiString(astring);
-    return(rc);
+int WIN32API GetClipboardFormatNameA(UINT format,LPSTR lpszFormatName,int cchMaxCount)
+{
+  dprintf(("USER32:  GetClipboardFormatNameA %d\n",format));
+  return O32_GetClipboardFormatName(format,lpszFormatName,cchMaxCount);
+}
+//******************************************************************************
+//******************************************************************************
+int WIN32API GetClipboardFormatNameW(UINT format,LPWSTR lpszFormatName,int cchMaxCount)
+{
+  int   rc;
+  char *astring = (CHAR*)malloc(cchMaxCount);
+
+  dprintf(("USER32:  GetClipboardFormatNameW %d\n",format));
+  rc = O32_GetClipboardFormatName(format,astring,cchMaxCount);
+  if (rc) AsciiToUnicode(astring,lpszFormatName);
+  free(astring);
+  return(rc);
 }
 //******************************************************************************
@@ -109,6 +110,6 @@
     window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndOwner);
     if(!window) {
-	//an OS/2 window probably owns the clipboard, we pretend nobody owns it
-	return NULL;
+        //an OS/2 window probably owns the clipboard, we pretend nobody owns it
+        return NULL;
     }
     return window->getWindowHandle();
@@ -126,6 +127,6 @@
     window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndViewer);
     if(!window) {
-	//probably an OS/2 window, we pretend it's nobody
-	return NULL;
+        //probably an OS/2 window, we pretend it's nobody
+        return NULL;
     }
     return window->getWindowHandle();
@@ -143,6 +144,6 @@
     window = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwnd);
     if(!window) {
-	//probably an OS/2 window, we pretend it's nobody
-	return NULL;
+        //probably an OS/2 window, we pretend it's nobody
+        return NULL;
     }
     return window->getWindowHandle();
@@ -171,5 +172,5 @@
     if(!window) {
         dprintf(("OpenClipboard, window %x not found", hwnd));
-	SetLastError(ERROR_INVALID_WINDOW_HANDLE);
+        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
         return 0;
     }
@@ -214,5 +215,5 @@
     if(!wndnew) {
         dprintf(("OpenClipboard, window %x not found", hwndNew));
-	SetLastError(ERROR_INVALID_WINDOW_HANDLE);
+        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
         return 0;
     }
@@ -222,5 +223,5 @@
     wndold = Win32BaseWindow::GetWindowFromOS2FrameHandle(hwndOld);
     if(!wndold) {
-	//probably an OS/2 window, so pretend it's nobody
+        //probably an OS/2 window, so pretend it's nobody
         return 0;
     }
Index: trunk/src/user32/scroll.cpp
===================================================================
--- trunk/src/user32/scroll.cpp	(revision 3214)
+++ trunk/src/user32/scroll.cpp	(revision 3215)
@@ -1,3 +1,3 @@
-/* $Id: scroll.cpp,v 1.35 2000-02-20 18:28:33 cbratschi Exp $ */
+/* $Id: scroll.cpp,v 1.36 2000-03-24 17:12:20 cbratschi Exp $ */
 /*
  * Scrollbar control
@@ -689,4 +689,13 @@
 }
 
+static LRESULT SCROLL_Destroy(HWND hwnd,WPARAM wParam,LPARAM lParam)
+{
+  SCROLLBAR_INFO* infoPtr = (SCROLLBAR_INFO*)GetInfoPtr(hwnd);
+
+  free(infoPtr);
+
+  return 0;
+}
+
 /***********************************************************************
  *           SCROLL_HandleScrollEvent
@@ -1105,4 +1114,7 @@
       return SCROLL_Create(hwnd,wParam,lParam);
 
+    case WM_DESTROY:
+      return SCROLL_Destroy(hwnd,wParam,lParam);
+
     case WM_LBUTTONDOWN:
     case WM_LBUTTONUP:
@@ -1480,7 +1492,8 @@
     if (!win32wnd) return FALSE;
 
+    //CB: does Win32 send a WM_STYLECHANGED message?
     switch(nBar)
     {
-     case SB_CTL:
+      case SB_CTL:
        ShowWindow(hwnd,fShow ? SW_SHOW:SW_HIDE);
        return TRUE;
