[ros-diffs] [dchapyshev] 39850: - Sync comctl32 with Wine head

dchapyshev at svn.reactos.org dchapyshev at svn.reactos.org
Tue Mar 3 10:10:00 CET 2009


Author: dchapyshev
Date: Tue Mar  3 12:09:59 2009
New Revision: 39850

URL: http://svn.reactos.org/svn/reactos?rev=39850&view=rev
Log:
- Sync comctl32 with Wine head

Added:
    trunk/reactos/dll/win32/comctl32/comctl_Lt.rc   (with props)
Modified:
    trunk/reactos/dll/win32/comctl32/animate.c
    trunk/reactos/dll/win32/comctl32/comctl32undoc.c
    trunk/reactos/dll/win32/comctl32/commctrl.c
    trunk/reactos/dll/win32/comctl32/flatsb.c
    trunk/reactos/dll/win32/comctl32/header.c
    trunk/reactos/dll/win32/comctl32/imagelist.c
    trunk/reactos/dll/win32/comctl32/listview.c
    trunk/reactos/dll/win32/comctl32/propsheet.c
    trunk/reactos/dll/win32/comctl32/rebar.c
    trunk/reactos/dll/win32/comctl32/rsrc.rc
    trunk/reactos/dll/win32/comctl32/status.c
    trunk/reactos/dll/win32/comctl32/syslink.c
    trunk/reactos/dll/win32/comctl32/tab.c
    trunk/reactos/dll/win32/comctl32/toolbar.c
    trunk/reactos/dll/win32/comctl32/tooltips.c
    trunk/reactos/dll/win32/comctl32/treeview.c
    trunk/reactos/dll/win32/comctl32/updown.c

Modified: trunk/reactos/dll/win32/comctl32/animate.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/animate.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/animate.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/animate.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -121,7 +121,7 @@
 
     memset(&mminfo, 0, sizeof(mminfo));
     mminfo.fccIOProc = FOURCC_MEM;
-    mminfo.pchBuffer = (LPSTR)lpAvi;
+    mminfo.pchBuffer = lpAvi;
     mminfo.cchBuffer = SizeofResource(hInst, hrsrc);
     infoPtr->hMMio = mmioOpenW(NULL, &mminfo, MMIO_READ);
     if (!infoPtr->hMMio) 
@@ -391,7 +391,7 @@
 
 static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
 {
-    ANIMATE_INFO *infoPtr = (ANIMATE_INFO *)ptr_;
+    ANIMATE_INFO *infoPtr = ptr_;
     HANDLE event;
     DWORD timeout;
 
@@ -472,7 +472,7 @@
 	TRACE("Using an animation thread\n");
         infoPtr->hStopEvent = CreateEventW( NULL, TRUE, FALSE, NULL );
         infoPtr->hThread = CreateThread(0, 0, ANIMATE_AnimationThread,
-                                        (LPVOID)infoPtr, 0, &infoPtr->threadId);
+                                        infoPtr, 0, &infoPtr->threadId);
         if(!infoPtr->hThread) return FALSE;
 
     }

Modified: trunk/reactos/dll/win32/comctl32/comctl32undoc.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl32undoc.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32undoc.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32undoc.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -339,7 +339,7 @@
  */
 void WINAPI FreeMRUList (HANDLE hMRUList)
 {
-    LPWINEMRULIST mp = (LPWINEMRULIST)hMRUList;
+    LPWINEMRULIST mp = hMRUList;
     UINT i;
 
     TRACE("(%p)\n", hMRUList);
@@ -380,7 +380,7 @@
 INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData,
                         LPINT lpRegNum)
 {
-    const WINEMRULIST *mp = (LPWINEMRULIST)hList;
+    const WINEMRULIST *mp = hList;
     INT ret;
     UINT i;
     LPSTR dataA = NULL;
@@ -454,7 +454,7 @@
  */
 INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
 {
-    LPWINEMRULIST mp = (LPWINEMRULIST)hList;
+    LPWINEMRULIST mp = hList;
     LPWINEMRUITEM witem;
     INT i, replace;
 
@@ -718,7 +718,7 @@
 	  mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags,
 	  mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
 	  mp->extview.lpfnCompare, mp->cursize);
-    return (HANDLE)mp;
+    return mp;
 }
 
 /**************************************************************************
@@ -830,7 +830,7 @@
 INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
                          DWORD nBufferSize)
 {
-    const WINEMRULIST *mp = (LPWINEMRULIST) hList;
+    const WINEMRULIST *mp = hList;
     const WINEMRUITEM *witem;
     INT desired, datasize;
 
@@ -855,7 +855,7 @@
 INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
                          DWORD nBufferSize)
 {
-    const WINEMRULIST *mp = (LPWINEMRULIST) hList;
+    const WINEMRULIST *mp = hList;
     LPWINEMRUITEM witem;
     INT desired, datasize;
     DWORD lenA;

Added: trunk/reactos/dll/win32/comctl32/comctl_Lt.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_Lt.rc?rev=39850&view=auto
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl_Lt.rc (added)
+++ trunk/reactos/dll/win32/comctl32/comctl_Lt.rc [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -1,0 +1,92 @@
+/*
+ * Copyright 2009 Aurimas Fišeras <aurimas at gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/* UTF-8 */
+#pragma code_page(65001)
+
+LANGUAGE LANG_LITHUANIAN, SUBLANG_NEUTRAL
+
+IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
+STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+CAPTION "%s savybÄ—s"
+FONT 8, "MS Shell Dlg"
+BEGIN
+  DEFPUSHBUTTON "Gerai",      IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
+  PUSHBUTTON    "Atsisakyti", IDCANCEL,58,122,50,14
+  PUSHBUTTON    "&Vykdyti",   IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
+  PUSHBUTTON    "Žinynas",    IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
+  CONTROL       "Tab",    IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
+END
+
+
+IDD_WIZARD DIALOG DISCARDABLE 0, 0, 290, 159
+STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
+CAPTION "Vediklis"
+FONT 8, "MS Shell Dlg"
+BEGIN
+  PUSHBUTTON    "< &Atgal",   IDC_BACK_BUTTON,71,138,50,14
+  DEFPUSHBUTTON "&Toliau >",  IDC_NEXT_BUTTON,121,138,50,14
+  DEFPUSHBUTTON "Baigti",     IDC_FINISH_BUTTON,121,138,50,14
+  PUSHBUTTON    "Atsisakyti", IDCANCEL,178,138,50,14
+  PUSHBUTTON    "Žinynas",    IDHELP,235,138,50,14,WS_GROUP
+  LTEXT         "",        IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
+  CONTROL       "Tab",     IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5
+  LTEXT	        "",        IDC_SUNKEN_LINEHEADER,0,35,290,1,SS_LEFT | SS_SUNKEN | WS_CHILD | WS_VISIBLE
+END
+
+
+IDD_TBCUSTOMIZE DIALOG DISCARDABLE 10, 20, 357, 125
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Tinkinti mygtukų juostÄ
"
+FONT 8, "MS Shell Dlg"
+BEGIN
+  DEFPUSHBUTTON "&Užverti",   IDCANCEL,308,6,44,14
+  PUSHBUTTON    "A&tstatyti", IDC_RESET_BTN,308,23,44,14
+  PUSHBUTTON    "&Žinynas",   IDC_HELP_BTN,308,40,44,14
+  PUSHBUTTON    "P&akelti",   IDC_MOVEUP_BTN,308,74,44,14
+  PUSHBUTTON    "&Nuleisti",  IDC_MOVEDN_BTN,308,91,44,14
+  LTEXT         "P&rieinami mygtukai:", -1,4,5,84,10
+  LISTBOX       IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+  PUSHBUTTON    "&PridÄ—ti ->", IDOK, 131, 42, 44, 14
+  PUSHBUTTON    "<- Å a&linti", IDC_REMOVE_BTN,131,62,44,14
+  LTEXT         "&Mygtukų juostos turinys:", -1,182,5,84,10
+  LISTBOX       IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+END
+
+STRINGTABLE DISCARDABLE
+{
+    IDS_CLOSE    "Užverti"
+}
+
+STRINGTABLE DISCARDABLE
+{
+    IDM_TODAY    "Å iandien:"
+    IDM_GOTODAY  "Eiti į šiandien"
+}
+
+STRINGTABLE DISCARDABLE
+{
+    IDS_SEPARATOR "Skirtukas"
+}
+
+STRINGTABLE DISCARDABLE
+{
+    HKY_NONE "Joks"
+}
+
+#pragma code_page(default)

Propchange: trunk/reactos/dll/win32/comctl32/comctl_Lt.rc
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: trunk/reactos/dll/win32/comctl32/commctrl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/commctrl.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/commctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/commctrl.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -869,7 +869,7 @@
 	internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
 	internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
 	iMaps = 4;
-	sysColorMap = (LPCOLORMAP)internalColorMap;
+	sysColorMap = internalColorMap;
     }
 
     hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP);
@@ -1125,7 +1125,7 @@
          ERR ("Failed to allocate our Subclassing stack\n");
          return FALSE;
       }
-      SetPropW (hWnd, COMCTL32_wSubclass, (HANDLE)stack);
+      SetPropW (hWnd, COMCTL32_wSubclass, stack);
 
       /* set window procedure to our own and save the current one */
       if (IsWindowUnicode (hWnd))

Modified: trunk/reactos/dll/win32/comctl32/flatsb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/flatsb.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/flatsb.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/flatsb.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -46,8 +46,6 @@
     DWORD dwDummy;  /* just to keep the compiler happy ;-) */
 } FLATSB_INFO, *LPFLATSB_INFO;
 
-#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongPtrW (hwnd, 0))
-
 
 /***********************************************************************
  *		InitializeFlatSB (COMCTL32.@)
@@ -245,7 +243,7 @@
 static LRESULT WINAPI
 FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
-    if (!FlatSB_GetInfoPtr(hwnd) && (uMsg != WM_CREATE))
+    if (!GetWindowLongPtrW(hwnd, 0) && (uMsg != WM_CREATE))
 	return DefWindowProcW( hwnd, uMsg, wParam, lParam );
 
     switch (uMsg)

Modified: trunk/reactos/dll/win32/comctl32/header.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/header.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/header.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/header.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -405,7 +405,7 @@
 	}
 
 	if ((phdi->fmt & HDF_BITMAP) && (phdi->hbm)) {
-	    GetObjectW (phdi->hbm, sizeof(BITMAP), (LPVOID)&bmp);
+            GetObjectW (phdi->hbm, sizeof(BITMAP), &bmp);
 	    bw = bmp.bmWidth + 2 * infoPtr->iMargin;
 	    if (!iw) {
 		x = &bx;
@@ -903,7 +903,7 @@
         if (mask & HDI_TEXT)
             pvBuffer = Alloc(MAX_HEADER_TEXT_LEN * sizeof(CHAR));
     }
-    dispInfo.pszText      = (LPWSTR)pvBuffer;
+    dispInfo.pszText      = pvBuffer;
     dispInfo.cchTextMax   = (pvBuffer!=NULL?MAX_HEADER_TEXT_LEN:0);
     dispInfo.iItem        = iItem;
     dispInfo.mask         = mask;
@@ -923,7 +923,7 @@
     {
         if (infoPtr->nNotifyFormat == NFR_UNICODE)
         {
-            lpItem->pszText = (LPWSTR)pvBuffer;
+            lpItem->pszText = pvBuffer;
 
             /* the user might have used his own buffer */
             if (dispInfo.pszText != lpItem->pszText)

Modified: trunk/reactos/dll/win32/comctl32/imagelist.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imagelist.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/imagelist.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -243,7 +243,7 @@
     if (!is_valid(himl))
         return -1;
 
-    if (!GetObjectW(hbmImage, sizeof(BITMAP), (LPVOID)&bmp))
+    if (!GetObjectW(hbmImage, sizeof(BITMAP), &bmp))
         return -1;
 
     nImageCount = bmp.bmWidth / himl->cx;
@@ -1730,14 +1730,14 @@
             DeleteObject (handle);
             return NULL;
         }
-        ImageList_AddMasked (himl, (HBITMAP)handle, clrMask);
+        ImageList_AddMasked (himl, handle, clrMask);
     }
     else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) {
         ICONINFO ii;
         BITMAP bmp;
 
         GetIconInfo (handle, &ii);
-        GetObjectW (ii.hbmColor, sizeof(BITMAP), (LPVOID)&bmp);
+        GetObjectW (ii.hbmColor, sizeof(BITMAP), &bmp);
         himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
                                  ILC_MASK | ILC_COLOR, 1, cGrow);
         if (!himl) {
@@ -2196,7 +2196,7 @@
         return FALSE;
     }
 
-    if (!GetObjectW(hbmImage, sizeof(BITMAP), (LPVOID)&bmp))
+    if (!GetObjectW(hbmImage, sizeof(BITMAP), &bmp))
         return FALSE;
 
     hdcImage = CreateCompatibleDC (0);
@@ -2291,7 +2291,7 @@
         return -1;
     }
 
-    ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp);
+    ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), &bmp);
     if (!ret) {
         ERR("couldn't get mask bitmap info\n");
         if (ii.hbmColor)
@@ -2686,7 +2686,7 @@
     HDC xdc;
     BOOL result = FALSE;
 
-    if (!GetObjectW(hBitmap, sizeof(BITMAP), (LPVOID)&bm))
+    if (!GetObjectW(hBitmap, sizeof(BITMAP), &bm))
         return FALSE;
 
     bitCount = bm.bmBitsPixel == 1 ? 1 : 24;

Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listview.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -106,7 +106,6 @@
  *   -- LVN_GETINFOTIP
  *   -- LVN_HOTTRACK
  *   -- LVN_MARQUEEBEGIN
- *   -- LVN_ODFINDITEM
  *   -- LVN_SETDISPINFO
  *   -- NM_HOVER
  *   -- LVN_BEGINRDRAG
@@ -1373,7 +1372,7 @@
 
     if (nSubItem == 0 && DPA_GetPtrCount(infoPtr->hdpaColumns) == 0) return &mainItem;
     assert (nSubItem >= 0 && nSubItem < DPA_GetPtrCount(infoPtr->hdpaColumns));
-    return (COLUMN_INFO *)DPA_GetPtr(infoPtr->hdpaColumns, nSubItem);
+    return DPA_GetPtr(infoPtr->hdpaColumns, nSubItem);
 }
 	
 static inline void LISTVIEW_GetHeaderRect(const LISTVIEW_INFO *infoPtr, INT nSubItem, LPRECT lprc)
@@ -1530,7 +1529,7 @@
     if (!charCode || !keyData) return 0;
 
     /* only allow the valid WM_CHARs through */
-    if (!isalnum(charCode) &&
+    if (!isalnumW(charCode) &&
         charCode != '.' && charCode != '`' && charCode != '!' &&
         charCode != '@' && charCode != '#' && charCode != '$' &&
         charCode != '%' && charCode != '^' && charCode != '&' &&
@@ -1574,6 +1573,28 @@
         endidx=infoPtr->nItemCount;
         idx=0;
     }
+
+    /* Let application handle this for virtual listview */
+    if (infoPtr->dwStyle & LVS_OWNERDATA)
+    {
+        NMLVFINDITEMW nmlv;
+        LVFINDINFOW lvfi;
+
+        ZeroMemory(&lvfi, sizeof(lvfi));
+        lvfi.flags = (LVFI_WRAP | LVFI_PARTIAL);
+        infoPtr->szSearchParam[infoPtr->nSearchParamLength] = '\0';
+        lvfi.psz = infoPtr->szSearchParam;
+        nmlv.iStart = idx;
+        nmlv.lvfi = lvfi;
+
+        nItem = notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
+
+        if (nItem != -1)
+            LISTVIEW_KeySelection(infoPtr, nItem);
+
+        return 0;
+    }
+
     do {
         if (idx == infoPtr->nItemCount) {
             if (endidx == infoPtr->nItemCount || endidx == 0)
@@ -2584,8 +2605,8 @@
 	cmp = 1;
     else 
 	cmp = 0;
-    
-    TRACE("range1=%s, range2=%s, cmp=%d\n", debugrange((RANGE*)range1), debugrange((RANGE*)range2), cmp);
+
+    TRACE("range1=%s, range2=%s, cmp=%d\n", debugrange(range1), debugrange(range2), cmp);
 
     return cmp;
 }
@@ -4511,10 +4532,11 @@
 
     for (i = infoPtr->nItemCount - 1; i >= 0; i--)
     {
-        /* send LVN_DELETEITEM notification, if not suppressed */
-	if (!bSuppress) notify_deleteitem(infoPtr, i);
 	if (!(infoPtr->dwStyle & LVS_OWNERDATA))
 	{
+            /* send LVN_DELETEITEM notification, if not suppressed
+               and if it is not a virtual listview */
+            if (!bSuppress) notify_deleteitem(infoPtr, i);
             hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, i);
 	    for (j = 0; j < DPA_GetPtrCount(hdpaSubItems); j++)
 	    {
@@ -5074,6 +5096,17 @@
     ULONG xdist, ydist, dist, mindist = 0x7fffffff;
     POINT Position, Destination;
     LVITEMW lvItem;
+
+    /* Search in virtual listviews should be done by application, not by
+       listview control, so we just send LVN_ODFINDITEMW and return the result */
+    if (infoPtr->dwStyle & LVS_OWNERDATA)
+    {
+        NMLVFINDITEMW nmlv;
+
+        nmlv.iStart = nStart;
+        nmlv.lvfi = *lpFindInfo;
+        return notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
+    }
 
     if (!lpFindInfo || nItem < 0) return -1;
     
@@ -6473,8 +6506,8 @@
 */
 static INT WINAPI LISTVIEW_InsertCompare(  LPVOID first, LPVOID second,  LPARAM lParam)
 {
-    ITEM_INFO* lv_first = DPA_GetPtr( (HDPA)first, 0 );
-    ITEM_INFO* lv_second = DPA_GetPtr( (HDPA)second, 0 );
+    ITEM_INFO* lv_first = DPA_GetPtr( first, 0 );
+    ITEM_INFO* lv_second = DPA_GetPtr( second, 0 );
     INT cmpv = textcmpWT(lv_first->hdr.pszText, lv_second->hdr.pszText, TRUE); 
 
     /* if we're sorting descending, negate the return value */
@@ -7755,8 +7788,8 @@
 static INT WINAPI LISTVIEW_CallBackCompare(LPVOID first, LPVOID second, LPARAM lParam)
 {
   LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)lParam;
-  ITEM_INFO* lv_first = DPA_GetPtr( (HDPA)first, 0 );
-  ITEM_INFO* lv_second = DPA_GetPtr( (HDPA)second, 0 );
+  ITEM_INFO* lv_first = DPA_GetPtr( first, 0 );
+  ITEM_INFO* lv_second = DPA_GetPtr( second, 0 );
 
   /* Forward the call to the client defined callback */
   return (infoPtr->pfnCompare)( lv_first->lParam , lv_second->lParam, infoPtr->lParamSort );
@@ -8953,6 +8986,7 @@
             nmlv.iItem = -1;
             nmlv.iSubItem = lpnmh->iItem;
             notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv);
+            notify_forward_header(infoPtr, lpnmh);
         }
 	break;
 

Modified: trunk/reactos/dll/win32/comctl32/propsheet.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propsheet.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -673,19 +673,15 @@
   if( psInfo->unicode )
   {
     ret = (INT_PTR)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance,
-                                          (LPDLGTEMPLATEW) temp,
-                                          psInfo->ppshheader.hwndParent,
-                                          PROPSHEET_DialogProc,
-                                          (LPARAM)psInfo);
+                                          temp, psInfo->ppshheader.hwndParent,
+                                          PROPSHEET_DialogProc, (LPARAM)psInfo);
     if ( !ret ) ret = -1;
   }
   else
   {
     ret = (INT_PTR)CreateDialogIndirectParamA(psInfo->ppshheader.hInstance,
-                                          (LPDLGTEMPLATEA) temp,
-                                          psInfo->ppshheader.hwndParent,
-                                          PROPSHEET_DialogProc,
-                                          (LPARAM)psInfo);
+                                          temp, psInfo->ppshheader.hwndParent,
+                                          PROPSHEET_DialogProc, (LPARAM)psInfo);
     if ( !ret ) ret = -1;
   }
 
@@ -740,9 +736,10 @@
   HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
   HWND hwndButton = GetDlgItem(hwndDlg, IDOK);
   RECT rc,tabRect;
-  int tabOffsetX, tabOffsetY, buttonHeight;
+  int buttonHeight;
   PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg);
   RECT units;
+  LONG style;
 
   /* Get the height of buttons */
   GetClientRect(hwndButton, &rc);
@@ -783,9 +780,6 @@
   }
 
   SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, TRUE, (LPARAM)&rc);
-
-  tabOffsetX = -(rc.left);
-  tabOffsetY = -(rc.top);
 
   rc.right -= rc.left;
   rc.bottom -= rc.top;
@@ -798,8 +792,15 @@
 
   TRACE("tab client rc %s\n", wine_dbgstr_rect(&rc));
 
-  rc.right += ((padding.x * 2) + tabOffsetX);
-  rc.bottom += (buttonHeight + (3 * padding.y) + tabOffsetY);
+  rc.right += (padding.x * 2);
+  rc.bottom += buttonHeight + (3 * padding.y);
+
+  style = GetWindowLongW(hwndDlg, GWL_STYLE);
+  if (!(style & WS_CHILD))
+    AdjustWindowRect(&rc, style, FALSE);
+
+  rc.right -= rc.left;
+  rc.bottom -= rc.top;
 
   /*
    * Resize the property sheet.
@@ -2439,7 +2440,6 @@
     return TRUE;
 }
 
-
 /******************************************************************************
  *            PROPSHEET_SetWizButtons
  *
@@ -2756,7 +2756,7 @@
   Free(psInfo->strPropertiesFor);
   ImageList_Destroy(psInfo->hImageList);
 
-  GlobalFree((HGLOBAL)psInfo);
+  GlobalFree(psInfo);
 }
 
 static INT do_loop(const PropSheetInfo *psInfo)
@@ -3268,7 +3268,7 @@
 	MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
 	SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
 
-	GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm);		
+	GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), &bm);
 
  	if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
  	{
@@ -3376,7 +3376,7 @@
 	hbr = GetSysColorBrush(COLOR_WINDOW);
 	FillRect(hdc, &rzone, hbr);
 
-	GetObjectW(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
+	GetObjectW(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), &bm);
 	hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
 
         /* The watermark is truncated to a width of 164 pixels */
@@ -3431,7 +3431,7 @@
       /* Using PropSheetInfoStr to store extra data doesn't match the native
        * common control: native uses TCM_[GS]ETITEM
        */
-      SetPropW(hwnd, PropSheetInfoStr, (HANDLE)psInfo);
+      SetPropW(hwnd, PropSheetInfoStr, psInfo);
 
       /*
        * psInfo->hwnd is not being used by WINE code - it exists

Modified: trunk/reactos/dll/win32/comctl32/rebar.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/rebar.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -3469,19 +3469,19 @@
 
 
 static LRESULT
-REBAR_StyleChanged (REBAR_INFO *infoPtr, LPARAM lParam)
-{
-    STYLESTRUCT *ss = (STYLESTRUCT *)lParam;
-
+REBAR_StyleChanged (REBAR_INFO *infoPtr, INT nType, const STYLESTRUCT *lpStyle)
+{
     TRACE("current style=%08x, styleOld=%08x, style being set to=%08x\n",
-	  infoPtr->dwStyle, ss->styleOld, ss->styleNew);
-    infoPtr->orgStyle = infoPtr->dwStyle = ss->styleNew;
-    if (GetWindowTheme (infoPtr->hwndSelf))
-        infoPtr->dwStyle &= ~WS_BORDER;
-    /* maybe it should be COMMON_STYLES like in toolbar */
-    if ((ss->styleNew ^ ss->styleOld) & CCS_VERT)
-        REBAR_Layout(infoPtr);
-
+	  infoPtr->dwStyle, lpStyle->styleOld, lpStyle->styleNew);
+    if (nType == GWL_STYLE)
+    {
+        infoPtr->orgStyle = infoPtr->dwStyle = lpStyle->styleNew;
+        if (GetWindowTheme (infoPtr->hwndSelf))
+            infoPtr->dwStyle &= ~WS_BORDER;
+        /* maybe it should be COMMON_STYLES like in toolbar */
+        if ((lpStyle->styleNew ^ lpStyle->styleOld) & CCS_VERT)
+            REBAR_Layout(infoPtr);
+    }
     return FALSE;
 }
 
@@ -3715,7 +3715,7 @@
 	    return REBAR_Size (infoPtr, wParam, lParam);
 
         case WM_STYLECHANGED:
-	    return REBAR_StyleChanged (infoPtr, lParam);
+	    return REBAR_StyleChanged (infoPtr, wParam, (LPSTYLESTRUCT)lParam);
 
         case WM_THEMECHANGED:
             return theme_changed (infoPtr);

Modified: trunk/reactos/dll/win32/comctl32/rsrc.rc
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rsrc.rc?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/rsrc.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/rsrc.rc [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -102,6 +102,7 @@
 #include "comctl_It.rc"
 #include "comctl_Ja.rc"
 #include "comctl_Ko.rc"
+#include "comctl_Lt.rc"
 #include "comctl_Nl.rc"
 #include "comctl_No.rc"
 #include "comctl_Pl.rc"
@@ -109,6 +110,7 @@
 #include "comctl_Ro.rc"
 #include "comctl_Ru.rc"
 #include "comctl_Si.rc"
+#include "comctl_Sk.rc"
 #include "comctl_Sv.rc"
 #include "comctl_Th.rc"
 #include "comctl_Tr.rc"

Modified: trunk/reactos/dll/win32/comctl32/status.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/status.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -95,7 +95,6 @@
 #define HORZ_BORDER 0
 #define VERT_BORDER 2
 #define HORZ_GAP    2
-#define MIN_PANE_HEIGHT 18
 
 static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 };
 
@@ -649,7 +648,9 @@
 static BOOL
 STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height)
 {
-    infoPtr->minHeight = max(height, MIN_PANE_HEIGHT);
+    DWORD ysize = GetSystemMetrics(SM_CYSIZE);
+    if (ysize & 1) ysize--;
+    infoPtr->minHeight = max(height, ysize);
     infoPtr->height = STATUSBAR_ComputeHeight(infoPtr);
     /* like native, don't resize the control */
     return TRUE;
@@ -758,8 +759,6 @@
     if (style & SBT_OWNERDRAW) {
         if (!(oldStyle & SBT_OWNERDRAW))
             Free (part->text);
-        else if (part->text == text)
-            return TRUE;
         part->text = (LPWSTR)text;
     } else {
 	LPWSTR ntext;
@@ -921,7 +920,8 @@
     infoPtr->horizontalBorder = HORZ_BORDER;
     infoPtr->verticalBorder = VERT_BORDER;
     infoPtr->horizontalGap = HORZ_GAP;
-    infoPtr->minHeight = MIN_PANE_HEIGHT;
+    infoPtr->minHeight = GetSystemMetrics(SM_CYSIZE);
+    if (infoPtr->minHeight & 1) infoPtr->minHeight--;
 
     STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY);
 

Modified: trunk/reactos/dll/win32/comctl32/syslink.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/syslink.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/syslink.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/syslink.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -602,8 +602,8 @@
  * SYSLINK_WrapLine
  * Tries to wrap a line.
  */
-static BOOL SYSLINK_WrapLine (HDC hdc, LPWSTR Text, WCHAR BreakChar, int *LineLen,
-                             int nFit, LPSIZE Extent, int Width)
+static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen,
+                             int nFit, LPSIZE Extent)
 {
     WCHAR *Current;
 
@@ -720,7 +720,7 @@
                 
                 if(n != 0)
                 {
-                    Wrap = SYSLINK_WrapLine(hdc, tx, infoPtr->BreakChar, &LineLen, nFit, &szDim, rc.right - x);
+                    Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, &LineLen, nFit, &szDim);
 
                     if(LineLen == 0)
                     {
@@ -1317,7 +1317,7 @@
  *           SYSLINK_SetFocus
  * Handles receiving the input focus.
  */
-static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow)
+static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr)
 {
     PDOC_ITEM Focus;
     
@@ -1340,7 +1340,7 @@
  *           SYSLINK_KillFocus
  * Handles losing the input focus.
  */
-static LRESULT SYSLINK_KillFocus (SYSLINK_INFO *infoPtr, HWND NewFocusWindow)
+static LRESULT SYSLINK_KillFocus (SYSLINK_INFO *infoPtr)
 {
     PDOC_ITEM Focus;
     
@@ -1385,7 +1385,7 @@
  *           SYSLINK_LButtonDown
  * Handles mouse clicks
  */
-static LRESULT SYSLINK_LButtonDown (SYSLINK_INFO *infoPtr, DWORD Buttons, const POINT *pt)
+static LRESULT SYSLINK_LButtonDown (SYSLINK_INFO *infoPtr, const POINT *pt)
 {
     PDOC_ITEM Current, Old;
     int id;
@@ -1411,7 +1411,7 @@
  *           SYSLINK_LButtonUp
  * Handles mouse clicks
  */
-static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, DWORD Buttons, const POINT *pt)
+static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, const POINT *pt)
 {
     if(infoPtr->MouseDownID > -1)
     {
@@ -1601,14 +1601,14 @@
         POINT pt;
         pt.x = (short)LOWORD(lParam);
         pt.y = (short)HIWORD(lParam);
-        return SYSLINK_LButtonDown(infoPtr, wParam, &pt);
+        return SYSLINK_LButtonDown(infoPtr, &pt);
     }
     case WM_LBUTTONUP:
     {
         POINT pt;
         pt.x = (short)LOWORD(lParam);
         pt.y = (short)HIWORD(lParam);
-        return SYSLINK_LButtonUp(infoPtr, wParam, &pt);
+        return SYSLINK_LButtonUp(infoPtr, &pt);
     }
     
     case WM_KEYDOWN:
@@ -1694,10 +1694,10 @@
         return SYSLINK_GetIdealHeight(infoPtr);
 
     case WM_SETFOCUS:
-        return SYSLINK_SetFocus(infoPtr, (HWND)wParam);
+        return SYSLINK_SetFocus(infoPtr);
 
     case WM_KILLFOCUS:
-        return SYSLINK_KillFocus(infoPtr, (HWND)wParam);
+        return SYSLINK_KillFocus(infoPtr);
 
     case WM_ENABLE:
         infoPtr->Style &= ~WS_DISABLED;

Modified: trunk/reactos/dll/win32/comctl32/tab.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/tab.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -916,7 +916,7 @@
  * This method will handle the notification from the scroll control and
  * perform the scrolling operation on the tab control.
  */
-static LRESULT TAB_OnHScroll(TAB_INFO *infoPtr, int nScrollCode, int nPos, HWND hwndScroll)
+static LRESULT TAB_OnHScroll(TAB_INFO *infoPtr, int nScrollCode, int nPos)
 {
   if(nScrollCode == SB_THUMBPOSITION && nPos != infoPtr->leftmostVisible)
   {
@@ -2936,7 +2936,7 @@
 }
 
 
-static LRESULT TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
+static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
 {
   TAB_INFO *infoPtr;
   TEXTMETRICW fontMetrics;
@@ -3076,7 +3076,7 @@
     return 0;
 }
 
-static LRESULT TAB_NCCalcSize(HWND hwnd, WPARAM wParam, LPARAM lParam)
+static LRESULT TAB_NCCalcSize(WPARAM wParam)
 {
   if (!wParam)
     return 0;
@@ -3211,7 +3211,7 @@
       return TAB_SetFont (infoPtr, (HFONT)wParam);
 
     case WM_CREATE:
-      return TAB_Create (hwnd, wParam, lParam);
+      return TAB_Create (hwnd, lParam);
 
     case WM_NCDESTROY:
       return TAB_Destroy (infoPtr);
@@ -3245,7 +3245,7 @@
       return TAB_SetRedraw (infoPtr, (BOOL)wParam);
 
     case WM_HSCROLL:
-      return TAB_OnHScroll(infoPtr, (int)LOWORD(wParam), (int)HIWORD(wParam), (HWND)lParam);
+      return TAB_OnHScroll(infoPtr, (int)LOWORD(wParam), (int)HIWORD(wParam));
 
     case WM_STYLECHANGED:
       TAB_SetItemBounds (infoPtr);
@@ -3270,7 +3270,7 @@
       return TAB_NCHitTest(infoPtr, lParam);
 
     case WM_NCCALCSIZE:
-      return TAB_NCCalcSize(hwnd, wParam, lParam);
+      return TAB_NCCalcSize(wParam);
 
     default:
       if (uMsg >= WM_USER && uMsg < WM_APP && !COMCTL32_IsReflectedMessage(uMsg))

Modified: trunk/reactos/dll/win32/comctl32/toolbar.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -225,6 +225,7 @@
 #define TBSTYLE_EX_ALL (TBSTYLE_EX_DRAWDDARROWS | \
                         TBSTYLE_EX_UNDOC1 | \
                         TBSTYLE_EX_MIXEDBUTTONS | \
+                        TBSTYLE_EX_DOUBLEBUFFER | \
                         TBSTYLE_EX_HIDECLIPPEDBUTTONS)
 
 /* all of the CCS_ styles */
@@ -250,6 +251,7 @@
 static void TOOLBAR_LayoutToolbar(HWND hwnd);
 static LRESULT TOOLBAR_AutoSize(HWND hwnd);
 static void TOOLBAR_CheckImageListIconSize(TOOLBAR_INFO *infoPtr);
+static void TOOLBAR_TooltipAddTool(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *button);
 static void TOOLBAR_TooltipSetRect(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *button);
 
 static LRESULT
@@ -275,18 +277,24 @@
 }
 
 static void
-TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_num, BOOL internal)
+TOOLBAR_DumpTBButton(const TBBUTTON *tbb, BOOL fUnicode)
+{
+    TRACE("TBBUTTON: id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx, stringid=0x%08lx (%s)\n",
+          tbb->idCommand,tbb->iBitmap, tbb->fsState, tbb->fsStyle, tbb->dwData, tbb->iString,
+          (fUnicode ? wine_dbgstr_w((LPWSTR)tbb->iString) : wine_dbgstr_a((LPSTR)tbb->iString)));
+}
+
+static void
+TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_num)
 {
     if (TRACE_ON(toolbar)){
         TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx, stringid=0x%08lx\n",
               btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap), 
               bP->fsState, bP->fsStyle, bP->dwData, bP->iString);
 	TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP)));
-	if (internal)
-            TRACE("button %d id %d, hot=%s, row=%d, rect=(%s)\n",
-		  btn_num, bP->idCommand,
-		  (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
-                  wine_dbgstr_rect(&bP->rect));
+        TRACE("button %d id %d, hot=%s, row=%d, rect=(%s)\n",
+              btn_num, bP->idCommand, (bP->bHot) ? "TRUE":"FALSE", bP->nRow,
+              wine_dbgstr_rect(&bP->rect));
     }
 }
 
@@ -306,7 +314,7 @@
 	      iP->himlInt, iP->himlDef, iP->himlHot, iP->himlDis,
 	      (iP->bDoRedraw) ? "TRUE" : "FALSE");
  	for(i=0; i<iP->nNumButtons; i++) {
-	    TOOLBAR_DumpButton(iP, &iP->buttons[i], i, TRUE);
+            TOOLBAR_DumpButton(iP, &iP->buttons[i], i);
 	}
     }
 }
@@ -1813,6 +1821,62 @@
 }
 
 
+/* worker for TB_ADDBUTTONS and TB_INSERTBUTTON */
+static BOOL
+TOOLBAR_InternalInsertButtonsT(TOOLBAR_INFO *infoPtr, INT iIndex, UINT nAddButtons, TBBUTTON *lpTbb, BOOL fUnicode)
+{
+    INT nOldButtons, nNewButtons, iButton;
+    BOOL fHasString = FALSE;
+
+    if (iIndex < 0)  /* iIndex can be negative, what means adding at the end */
+        iIndex = infoPtr->nNumButtons;
+
+    nOldButtons = infoPtr->nNumButtons;
+    nNewButtons = nOldButtons + nAddButtons;
+
+    infoPtr->buttons = ReAlloc(infoPtr->buttons, sizeof(TBUTTON_INFO)*nNewButtons);
+    memmove(&infoPtr->buttons[iIndex + nAddButtons], &infoPtr->buttons[iIndex],
+            (nOldButtons - iIndex) * sizeof(TBUTTON_INFO));
+    infoPtr->nNumButtons += nAddButtons;
+
+    /* insert new buttons data */
+    for (iButton = 0; iButton < nAddButtons; iButton++) {
+        TBUTTON_INFO *btnPtr = &infoPtr->buttons[iIndex + iButton];
+
+        TOOLBAR_DumpTBButton(lpTbb, fUnicode);
+
+        ZeroMemory(btnPtr, sizeof(*btnPtr));
+        btnPtr->iBitmap   = lpTbb[iButton].iBitmap;
+        btnPtr->idCommand = lpTbb[iButton].idCommand;
+        btnPtr->fsState   = lpTbb[iButton].fsState;
+        btnPtr->fsStyle   = lpTbb[iButton].fsStyle;
+        btnPtr->dwData    = lpTbb[iButton].dwData;
+        if(HIWORD(lpTbb[iButton].iString) && lpTbb[iButton].iString != -1)
+        {
+            if (fUnicode)
+                Str_SetPtrW((LPWSTR*)&btnPtr->iString, (LPWSTR)lpTbb[iButton].iString );
+            else
+                Str_SetPtrAtoW((LPWSTR*)&btnPtr->iString, (LPSTR)lpTbb[iButton].iString);
+            fHasString = TRUE;
+        }
+        else
+            btnPtr->iString   = lpTbb[iButton].iString;
+
+        TOOLBAR_TooltipAddTool(infoPtr, btnPtr);
+    }
+
+    if (infoPtr->nNumStrings > 0 || fHasString)
+        TOOLBAR_CalcToolbar(infoPtr->hwndSelf);
+    else
+        TOOLBAR_LayoutToolbar(infoPtr->hwndSelf);
+    TOOLBAR_AutoSize(infoPtr->hwndSelf);
+
+    TOOLBAR_DumpToolbar(infoPtr, __LINE__);
+    InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+    return TRUE;
+}
+
+
 static INT
 TOOLBAR_GetButtonIndex (const TOOLBAR_INFO *infoPtr, INT idCommand, BOOL CommandIsIndex)
 {
@@ -2838,52 +2902,11 @@
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     LPTBBUTTON lpTbb = (LPTBBUTTON)lParam;
-    INT nOldButtons, nNewButtons, nAddButtons, nCount;
-    BOOL fHasString = FALSE;
+    INT nAddButtons = (UINT)wParam;
 
     TRACE("adding %ld buttons (unicode=%d)!\n", wParam, fUnicode);
 
-    nAddButtons = (UINT)wParam;
-    nOldButtons = infoPtr->nNumButtons;
-    nNewButtons = nOldButtons + nAddButtons;
-
-    infoPtr->buttons = ReAlloc(infoPtr->buttons, sizeof(TBUTTON_INFO)*nNewButtons);
-    infoPtr->nNumButtons = nNewButtons;
-
-    /* insert new button data */
-    for (nCount = 0; nCount < nAddButtons; nCount++) {
-	TBUTTON_INFO *btnPtr = &infoPtr->buttons[nOldButtons+nCount];
-	btnPtr->iBitmap   = lpTbb[nCount].iBitmap;
-	btnPtr->idCommand = lpTbb[nCount].idCommand;
-	btnPtr->fsState   = lpTbb[nCount].fsState;
-	btnPtr->fsStyle   = lpTbb[nCount].fsStyle;
-	btnPtr->dwData    = lpTbb[nCount].dwData;
-	btnPtr->bHot      = FALSE;
-        if(HIWORD(lpTbb[nCount].iString) && lpTbb[nCount].iString != -1)
-        {
-            if (fUnicode)
-                Str_SetPtrW ((LPWSTR*)&btnPtr->iString, (LPWSTR)lpTbb[nCount].iString );
-            else
-                Str_SetPtrAtoW((LPWSTR*)&btnPtr->iString, (LPSTR)lpTbb[nCount].iString);
-            fHasString = TRUE;
-        }
-        else
-            btnPtr->iString   = lpTbb[nCount].iString;
-
-        TOOLBAR_TooltipAddTool(infoPtr, btnPtr);
-    }
-
-    if (infoPtr->nNumStrings > 0 || fHasString)
-        TOOLBAR_CalcToolbar(hwnd);
-    else
-        TOOLBAR_LayoutToolbar(hwnd);
-    TOOLBAR_AutoSize (hwnd);
-
-    TOOLBAR_DumpToolbar (infoPtr, __LINE__);
-
-    InvalidateRect(hwnd, NULL, TRUE);
-
-    return TRUE;
+    return TOOLBAR_InternalInsertButtonsT(infoPtr, -1, nAddButtons, lpTbb, fUnicode);
 }
 
 
@@ -3184,9 +3207,7 @@
 	return FALSE;
 
     ret = DialogBoxIndirectParamW ((HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE),
-                                   (LPCDLGTEMPLATEW)template,
-                                   hwnd,
-                                   TOOLBAR_CustomizeDialogProc,
+                                   template, hwnd, TOOLBAR_CustomizeDialogProc,
                                    (LPARAM)&custInfo);
 
     /* send TBN_ENDADJUST notification */
@@ -3310,7 +3331,7 @@
 
 
 static inline LRESULT
-TOOLBAR_GetBitmapFlags (HWND hwnd)
+TOOLBAR_GetBitmapFlags (void)
 {
     return (GetDeviceCaps (0, LOGPIXELSX) >= 120) ? TBBF_LARGE : 0;
 }
@@ -3720,7 +3741,7 @@
 
 
 static inline LRESULT
-TOOLBAR_HitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_HitTest (HWND hwnd, LPARAM lParam)
 {
     return TOOLBAR_InternalHitTest (hwnd, (LPPOINT)lParam);
 }
@@ -3761,8 +3782,6 @@
 
     if (lpTbb == NULL)
 	return FALSE;
-
-    TOOLBAR_DumpButton(infoPtr, (TBUTTON_INFO *)lpTbb, nIndex, FALSE);
 
     if (nIndex == -1) {
        /* EPP: this seems to be an undocumented call (from my IE4)
@@ -3782,45 +3801,14 @@
 	TRACE("adjust index=%d\n", nIndex);
     }
 
-    infoPtr->nNumButtons++;
-    infoPtr->buttons = ReAlloc(infoPtr->buttons, sizeof(TBUTTON_INFO) * infoPtr->nNumButtons);
-    memmove(&infoPtr->buttons[nIndex+1], &infoPtr->buttons[nIndex],
-	    (infoPtr->nNumButtons - nIndex - 1) * sizeof(TBUTTON_INFO));
-
-    /* insert new button */
-    infoPtr->buttons[nIndex].iBitmap   = lpTbb->iBitmap;
-    infoPtr->buttons[nIndex].idCommand = lpTbb->idCommand;
-    infoPtr->buttons[nIndex].fsState   = lpTbb->fsState;
-    infoPtr->buttons[nIndex].fsStyle   = lpTbb->fsStyle;
-    infoPtr->buttons[nIndex].dwData    = lpTbb->dwData;
-    /* if passed string and not index, then add string */
-    if(HIWORD(lpTbb->iString) && lpTbb->iString!=-1) {
-        if (fUnicode)
-            Str_SetPtrW((LPWSTR *)&infoPtr->buttons[nIndex].iString, (LPWSTR)lpTbb->iString);
-        else
-            Str_SetPtrAtoW((LPWSTR *)&infoPtr->buttons[nIndex].iString, (LPCSTR )lpTbb->iString);
-    }
-    else
-        infoPtr->buttons[nIndex].iString   = lpTbb->iString;
-
-    TOOLBAR_TooltipAddTool(infoPtr, &infoPtr->buttons[nIndex]);
-
-    if (infoPtr->nNumStrings > 0)
-        TOOLBAR_CalcToolbar(hwnd);
-    else
-        TOOLBAR_LayoutToolbar(hwnd);
-    TOOLBAR_AutoSize (hwnd);
-
-    InvalidateRect (hwnd, NULL, TRUE);
-
-    return TRUE;
+    return TOOLBAR_InternalInsertButtonsT(infoPtr, nIndex, 1, lpTbb, fUnicode);
 }
 
 /* << TOOLBAR_InsertMarkHitTest >> */
 
 
 static LRESULT
-TOOLBAR_IsButtonChecked (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonChecked (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -3834,7 +3822,7 @@
 
 
 static LRESULT
-TOOLBAR_IsButtonEnabled (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonEnabled (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -3848,7 +3836,7 @@
 
 
 static LRESULT
-TOOLBAR_IsButtonHidden (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonHidden (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -3862,7 +3850,7 @@
 
 
 static LRESULT
-TOOLBAR_IsButtonHighlighted (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonHighlighted (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -3876,7 +3864,7 @@
 
 
 static LRESULT
-TOOLBAR_IsButtonIndeterminate (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonIndeterminate (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -3890,7 +3878,7 @@
 
 
 static LRESULT
-TOOLBAR_IsButtonPressed (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_IsButtonPressed (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
@@ -4089,7 +4077,7 @@
 /* FIXME: there might still be some confusion her between number of buttons
  * and number of bitmaps */
 static LRESULT
-TOOLBAR_ReplaceBitmap (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_ReplaceBitmap (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     LPTBREPLACEBITMAP lpReplace = (LPTBREPLACEBITMAP) lParam;
@@ -4168,7 +4156,7 @@
 
 /* helper for TOOLBAR_SaveRestoreW */
 static BOOL
-TOOLBAR_Save(const TOOLBAR_INFO *infoPtr, const TBSAVEPARAMSW *lpSave)
+TOOLBAR_Save(const TBSAVEPARAMSW *lpSave)
 {
     FIXME("save to %s %s\n", debugstr_w(lpSave->pszSubKey),
         debugstr_w(lpSave->pszValueName));
@@ -4308,7 +4296,7 @@
     if (lpSave == NULL) return 0;
 
     if (wParam)
-        return TOOLBAR_Save(infoPtr, lpSave);
+        return TOOLBAR_Save(lpSave);
     else
         return TOOLBAR_Restore(infoPtr, lpSave);
 }
@@ -4457,7 +4445,7 @@
 
     /* save the button rect to see if we need to redraw the whole toolbar */
     oldBtnRect = btnPtr->rect;
-    TOOLBAR_CalcToolbar(hwnd);
+    TOOLBAR_LayoutToolbar(hwnd);
 
     if (!EqualRect(&oldBtnRect, &btnPtr->rect))
         InvalidateRect(hwnd, NULL, TRUE);
@@ -4510,7 +4498,7 @@
 
     /* save the button rect to see if we need to redraw the whole toolbar */
     oldBtnRect = btnPtr->rect;
-    TOOLBAR_CalcToolbar(hwnd);
+    TOOLBAR_LayoutToolbar(hwnd);
 
     if (!EqualRect(&oldBtnRect, &btnPtr->rect))
         InvalidateRect(hwnd, NULL, TRUE);
@@ -4522,7 +4510,7 @@
 
 
 static LRESULT
-TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetButtonSize (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT cx = (short)LOWORD(lParam), cy = (short)HIWORD(lParam);
@@ -4562,7 +4550,7 @@
 
 
 static LRESULT
-TOOLBAR_SetButtonWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetButtonWidth (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -4655,14 +4643,13 @@
  *  (MSDN says that this parameter is reserved)
  */
 static LRESULT
-TOOLBAR_SetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
-{
-    TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
-    DWORD dwTemp;
-
-    dwTemp = infoPtr->dwExStyle;
-    infoPtr->dwExStyle &= ~wParam;
-    infoPtr->dwExStyle |= (DWORD)lParam;
+TOOLBAR_SetExtendedStyle (HWND hwnd, LPARAM lParam)
+{
+    TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
+    DWORD dwOldStyle;
+
+    dwOldStyle = infoPtr->dwExStyle;
+    infoPtr->dwExStyle = (DWORD)lParam;
 
     TRACE("new style 0x%08x\n", infoPtr->dwExStyle);
 
@@ -4670,13 +4657,15 @@
 	FIXME("Unknown Toolbar Extended Style 0x%08x. Please report.\n",
 	      (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL));
 
-    TOOLBAR_CalcToolbar (hwnd);
+    if ((dwOldStyle ^ infoPtr->dwExStyle) & TBSTYLE_EX_MIXEDBUTTONS)
+        TOOLBAR_CalcToolbar(hwnd);
+    else
+        TOOLBAR_LayoutToolbar(hwnd);
 
     TOOLBAR_AutoSize(hwnd);
-
     InvalidateRect(hwnd, NULL, TRUE);
 
-    return (LRESULT)dwTemp;
+    return (LRESULT)dwOldStyle;
 }
 
 
@@ -4812,7 +4801,7 @@
     }
     TOOLBAR_CalcToolbar(hwnd);
     if (infoPtr->nButtonWidth < oldButtonWidth)
-        TOOLBAR_SetButtonSize(hwnd, 0, MAKELONG(oldButtonWidth, infoPtr->nButtonHeight));
+        TOOLBAR_SetButtonSize(hwnd, MAKELONG(oldButtonWidth, infoPtr->nButtonHeight));
 
     TRACE("hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d\n",
 	  hwnd, infoPtr->himlDef, id, infoPtr->nNumBitmaps,
@@ -4825,7 +4814,7 @@
 
 
 static LRESULT
-TOOLBAR_SetIndent (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetIndent (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -4846,7 +4835,7 @@
 
 
 static LRESULT
-TOOLBAR_SetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetInsertMark (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam;
@@ -4875,7 +4864,7 @@
 
 
 static LRESULT
-TOOLBAR_SetInsertMarkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetInsertMarkColor (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -4889,7 +4878,7 @@
 
 
 static LRESULT
-TOOLBAR_SetMaxTextRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetMaxTextRows (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -4912,7 +4901,7 @@
  * See blueprints in comments above TOOLBAR_MeasureButton for more info.
  */
 static LRESULT
-TOOLBAR_SetPadding (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetPadding (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     DWORD  oldPad;
@@ -4927,7 +4916,7 @@
 
 
 static LRESULT
-TOOLBAR_SetParent (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetParent (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     HWND hwndOldNotify;
@@ -5096,7 +5085,7 @@
 
 
 static LRESULT
-TOOLBAR_SetStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetStyle (HWND hwnd, LPARAM lParam)
 {
     SetWindowLongW(hwnd, GWL_STYLE, lParam);
 
@@ -5117,7 +5106,7 @@
 
 
 static LRESULT
-TOOLBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetUnicodeFormat (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     BOOL bTemp;
@@ -5171,7 +5160,7 @@
     infoPtr->iVersion = iVersion;
 
     if (infoPtr->iVersion >= 5)
-        TOOLBAR_SetUnicodeFormat(hwnd, TRUE, 0);
+        TOOLBAR_SetUnicodeFormat(hwnd, TRUE);
 
     return iOldVersion;
 }
@@ -5270,7 +5259,7 @@
 /* Sets the toolbar global iListGap parameter which controls the amount of
  * spacing between the image and the text of buttons for TBSTYLE_LIST
  * toolbars. */
-static LRESULT TOOLBAR_SetListGap(HWND hwnd, WPARAM wParam, LPARAM lParam)
+static LRESULT TOOLBAR_SetListGap(HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
 
@@ -5355,7 +5344,7 @@
 
 
 static LRESULT
-TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_Create (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
@@ -5412,7 +5401,7 @@
 
 
 static LRESULT
-TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_Destroy (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -5532,7 +5521,7 @@
 
 
 static LRESULT
-TOOLBAR_GetFont (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_GetFont (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -5998,7 +5987,7 @@
 }
 
 static LRESULT
-TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_MouseLeave (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -6377,7 +6366,7 @@
 
 
 static inline LRESULT
-TOOLBAR_Notify (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_Notify (HWND hwnd, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     LPNMHDR lpnmh = (LPNMHDR)lParam;
@@ -6471,7 +6460,7 @@
 
 
 static LRESULT
-TOOLBAR_SetFocus (HWND hwnd, WPARAM wParam)
+TOOLBAR_SetFocus (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -6504,7 +6493,7 @@
 }
 
 static LRESULT
-TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam)
      /*****************************************************
       *
       * Function;
@@ -6533,7 +6522,7 @@
 
 
 static LRESULT
-TOOLBAR_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLBAR_Size (HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
 
@@ -6621,7 +6610,7 @@
 
 
 static LRESULT
-TOOLBAR_SysColorChange (HWND hwnd)
+TOOLBAR_SysColorChange ()
 {
     COMCTL32_RefreshSysColors();
 
@@ -6701,7 +6690,7 @@
 	    return TOOLBAR_GetBitmap (hwnd, wParam);
 
 	case TB_GETBITMAPFLAGS:
-	    return TOOLBAR_GetBitmapFlags (hwnd);
+	    return TOOLBAR_GetBitmapFlags ();
 
 	case TB_GETBUTTON:
 	    return TOOLBAR_GetButton (hwnd, wParam, lParam);
@@ -6784,7 +6773,7 @@
 	    return TOOLBAR_HideButton (hwnd, wParam, lParam);
 
 	case TB_HITTEST:
-	    return TOOLBAR_HitTest (hwnd, wParam, lParam);
+	    return TOOLBAR_HitTest (hwnd, lParam);
 
 	case TB_INDETERMINATE:
 	    return TOOLBAR_Indeterminate (hwnd, wParam, lParam);
@@ -6798,22 +6787,22 @@
 /*	case TB_INSERTMARKHITTEST:		*/ /* 4.71 */
 
 	case TB_ISBUTTONCHECKED:
-	    return TOOLBAR_IsButtonChecked (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonChecked (hwnd, wParam);
 
 	case TB_ISBUTTONENABLED:
-	    return TOOLBAR_IsButtonEnabled (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonEnabled (hwnd, wParam);
 
 	case TB_ISBUTTONHIDDEN:
-	    return TOOLBAR_IsButtonHidden (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonHidden (hwnd, wParam);
 
 	case TB_ISBUTTONHIGHLIGHTED:
-	    return TOOLBAR_IsButtonHighlighted (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonHighlighted (hwnd, wParam);
 
 	case TB_ISBUTTONINDETERMINATE:
-	    return TOOLBAR_IsButtonIndeterminate (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonIndeterminate (hwnd, wParam);
 
 	case TB_ISBUTTONPRESSED:
-	    return TOOLBAR_IsButtonPressed (hwnd, wParam, lParam);
+	    return TOOLBAR_IsButtonPressed (hwnd, wParam);
 
 	case TB_LOADIMAGES:
 	    return TOOLBAR_LoadImages (hwnd, wParam, lParam);
@@ -6832,7 +6821,7 @@
 	    return TOOLBAR_PressButton (hwnd, wParam, lParam);
 
 	case TB_REPLACEBITMAP:
-            return TOOLBAR_ReplaceBitmap (hwnd, wParam, lParam);
+            return TOOLBAR_ReplaceBitmap (hwnd, lParam);
 
 	case TB_SAVERESTOREA:
 	    return TOOLBAR_SaveRestoreA (hwnd, wParam, (LPTBSAVEPARAMSA)lParam);
@@ -6853,10 +6842,10 @@
 	    return TOOLBAR_SetButtonInfoW (hwnd, wParam, lParam);
 
 	case TB_SETBUTTONSIZE:
-	    return TOOLBAR_SetButtonSize (hwnd, wParam, lParam);
+	    return TOOLBAR_SetButtonSize (hwnd, lParam);
 
 	case TB_SETBUTTONWIDTH:
-	    return TOOLBAR_SetButtonWidth (hwnd, wParam, lParam);
+	    return TOOLBAR_SetButtonWidth (hwnd, lParam);
 
 	case TB_SETCMDID:
 	    return TOOLBAR_SetCmdId (hwnd, wParam, lParam);
@@ -6868,7 +6857,7 @@
 	    return TOOLBAR_SetDrawTextFlags (hwnd, wParam, lParam);
 
 	case TB_SETEXTENDEDSTYLE:
-	    return TOOLBAR_SetExtendedStyle (hwnd, wParam, lParam);
+	    return TOOLBAR_SetExtendedStyle (hwnd, lParam);
 
 	case TB_SETHOTIMAGELIST:
 	    return TOOLBAR_SetHotImageList (hwnd, wParam, lParam);
@@ -6880,22 +6869,22 @@
 	    return TOOLBAR_SetImageList (hwnd, wParam, lParam);
 
 	case TB_SETINDENT:
-	    return TOOLBAR_SetIndent (hwnd, wParam, lParam);
+	    return TOOLBAR_SetIndent (hwnd, wParam);
 
 	case TB_SETINSERTMARK:
-	    return TOOLBAR_SetInsertMark (hwnd, wParam, lParam);
+	    return TOOLBAR_SetInsertMark (hwnd, lParam);
 
 	case TB_SETINSERTMARKCOLOR:
-	    return TOOLBAR_SetInsertMarkColor (hwnd, wParam, lParam);
+	    return TOOLBAR_SetInsertMarkColor (hwnd, lParam);
 
 	case TB_SETMAXTEXTROWS:
-	    return TOOLBAR_SetMaxTextRows (hwnd, wParam, lParam);
+	    return TOOLBAR_SetMaxTextRows (hwnd, wParam);
 
 	case TB_SETPADDING:
-	    return TOOLBAR_SetPadding (hwnd, wParam, lParam);
+	    return TOOLBAR_SetPadding (hwnd, lParam);
 
 	case TB_SETPARENT:
-	    return TOOLBAR_SetParent (hwnd, wParam, lParam);
+	    return TOOLBAR_SetParent (hwnd, wParam);
 
 	case TB_SETROWS:
 	    return TOOLBAR_SetRows (hwnd, wParam, lParam);
@@ -6904,13 +6893,13 @@
 	    return TOOLBAR_SetState (hwnd, wParam, lParam);
 
 	case TB_SETSTYLE:
-	    return TOOLBAR_SetStyle (hwnd, wParam, lParam);
+	    return TOOLBAR_SetStyle (hwnd, lParam);
 
 	case TB_SETTOOLTIPS:
 	    return TOOLBAR_SetToolTips (hwnd, wParam, lParam);
 
 	case TB_SETUNICODEFORMAT:
-	    return TOOLBAR_SetUnicodeFormat (hwnd, wParam, lParam);
+	    return TOOLBAR_SetUnicodeFormat (hwnd, wParam);
 
 	case TB_UNKWN45D:
 	    return TOOLBAR_Unkwn45D(hwnd, wParam, lParam);
@@ -6919,7 +6908,7 @@
 	    return TOOLBAR_SetHotItem2 (hwnd, wParam, lParam);
 
 	case TB_SETLISTGAP:
-	    return TOOLBAR_SetListGap(hwnd, wParam, lParam);
+	    return TOOLBAR_SetListGap(hwnd, wParam);
 
 	case TB_GETIMAGELISTCOUNT:
 	    return TOOLBAR_GetImageListCount(hwnd, wParam, lParam);
@@ -6950,16 +6939,16 @@
 /*	case WM_CHAR: */
 
 	case WM_CREATE:
-	    return TOOLBAR_Create (hwnd, wParam, lParam);
+	    return TOOLBAR_Create (hwnd, lParam);
 
 	case WM_DESTROY:
-	  return TOOLBAR_Destroy (hwnd, wParam, lParam);
+	  return TOOLBAR_Destroy (hwnd);
 
 	case WM_ERASEBKGND:
 	    return TOOLBAR_EraseBackground (hwnd, wParam, lParam);
 
 	case WM_GETFONT:
-		return TOOLBAR_GetFont (hwnd, wParam, lParam);
+		return TOOLBAR_GetFont (hwnd);
 
 	case WM_KEYDOWN:
 	    return TOOLBAR_KeyDown (hwnd, wParam, lParam);
@@ -6985,7 +6974,7 @@
 	    return TOOLBAR_MouseMove (hwnd, wParam, lParam);
 
 	case WM_MOUSELEAVE:
-	    return TOOLBAR_MouseLeave (hwnd, wParam, lParam);
+	    return TOOLBAR_MouseLeave (hwnd);
 
 	case WM_CAPTURECHANGED:
 	    return TOOLBAR_CaptureChanged(hwnd);
@@ -7003,7 +6992,7 @@
 	    return TOOLBAR_NCPaint (hwnd, wParam, lParam);
 
 	case WM_NOTIFY:
-	    return TOOLBAR_Notify (hwnd, wParam, lParam);
+	    return TOOLBAR_Notify (hwnd, lParam);
 
 	case WM_NOTIFYFORMAT:
 	    return TOOLBAR_NotifyFormat (infoPtr, wParam, lParam);
@@ -7013,22 +7002,22 @@
 	    return TOOLBAR_Paint (hwnd, wParam);
 
 	case WM_SETFOCUS:
-	    return TOOLBAR_SetFocus (hwnd, wParam);
+	    return TOOLBAR_SetFocus (hwnd);
 
 	case WM_SETFONT:
             return TOOLBAR_SetFont(hwnd, wParam, lParam);
 
 	case WM_SETREDRAW:
-	    return TOOLBAR_SetRedraw (hwnd, wParam, lParam);
+	    return TOOLBAR_SetRedraw (hwnd, wParam);
 
 	case WM_SIZE:
-	    return TOOLBAR_Size (hwnd, wParam, lParam);
+	    return TOOLBAR_Size (hwnd);
 
 	case WM_STYLECHANGED:
 	    return TOOLBAR_StyleChanged (hwnd, (INT)wParam, (LPSTYLESTRUCT)lParam);
 
 	case WM_SYSCOLORCHANGE:
-	    return TOOLBAR_SysColorChange (hwnd);
+	    return TOOLBAR_SysColorChange ();
             
         case WM_THEMECHANGED:
             return theme_changed (hwnd);
@@ -7178,7 +7167,7 @@
         {
             int ccht = strlen(nmtba.pszText);
             if (ccht)
-               MultiByteToWideChar(CP_ACP, 0, (LPCSTR)nmtba.pszText, -1, 
+               MultiByteToWideChar(CP_ACP, 0, nmtba.pszText, -1,
                   nmtb->pszText, nmtb->cchText);
 
             nmtb->tbButton = nmtba.tbButton;

Modified: trunk/reactos/dll/win32/comctl32/tooltips.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltips.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/tooltips.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -368,7 +368,7 @@
     ttnmdi.hdr.hwndFrom = hwnd;
     ttnmdi.hdr.idFrom = toolPtr->uId;
     ttnmdi.hdr.code = TTN_GETDISPINFOA; /* == TTN_NEEDTEXTA */
-    ttnmdi.lpszText = (LPSTR)ttnmdi.szText;
+    ttnmdi.lpszText = ttnmdi.szText;
     ttnmdi.uFlags = toolPtr->uFlags;
     ttnmdi.lParam = toolPtr->lParam;
 
@@ -424,7 +424,7 @@
     ttnmdi.hdr.hwndFrom = hwnd;
     ttnmdi.hdr.idFrom = toolPtr->uId;
     ttnmdi.hdr.code = TTN_GETDISPINFOW; /* == TTN_NEEDTEXTW */
-    ttnmdi.lpszText = (LPWSTR)ttnmdi.szText;
+    ttnmdi.lpszText = ttnmdi.szText;
     ttnmdi.uFlags = toolPtr->uFlags;
     ttnmdi.lParam = toolPtr->lParam;
 
@@ -1006,7 +1006,7 @@
 
 
 static LRESULT
-TOOLTIPS_Activate (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_Activate (HWND hwnd, WPARAM wParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
 
@@ -1023,7 +1023,7 @@
 
 
 static LRESULT
-TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_AddToolA (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@@ -1114,7 +1114,7 @@
 
 
 static LRESULT
-TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_AddToolW (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@@ -1280,7 +1280,7 @@
 }
 
 static LRESULT
-TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_DelToolA (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@@ -1302,7 +1302,7 @@
 
 
 static LRESULT
-TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_DelToolW (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@@ -1451,7 +1451,7 @@
 
 
 static LRESULT
-TOOLTIPS_GetCurrentToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_GetCurrentToolW (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@@ -1485,7 +1485,7 @@
 
 
 static LRESULT
-TOOLTIPS_GetDelayTime (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_GetDelayTime (HWND hwnd, WPARAM wParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
 
@@ -1510,7 +1510,7 @@
 
 
 static LRESULT
-TOOLTIPS_GetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_GetMargin (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPRECT lpRect = (LPRECT)lParam;
@@ -1600,7 +1600,7 @@
 
 
 static inline LRESULT
-TOOLTIPS_GetToolCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_GetToolCount (HWND hwnd)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     return infoPtr->uNumTools;
@@ -1608,7 +1608,7 @@
 
 
 static LRESULT
-TOOLTIPS_GetToolInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_GetToolInfoA (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@@ -1717,7 +1717,7 @@
 
 
 static LRESULT
-TOOLTIPS_HitTestW (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_HitTestW (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTHITTESTINFOW lptthit = (LPTTHITTESTINFOW)lParam;
@@ -1800,7 +1800,7 @@
 
 
 static inline LRESULT
-TOOLTIPS_Pop (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_Pop (HWND hwnd)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     TOOLTIPS_Hide (hwnd, infoPtr);
@@ -1918,7 +1918,7 @@
 
 
 static LRESULT
-TOOLTIPS_SetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_SetMargin (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPRECT lpRect = (LPRECT)lParam;
@@ -1956,7 +1956,7 @@
 
 
 static inline LRESULT
-TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
 
@@ -2035,7 +2035,7 @@
 
 
 static LRESULT
-TOOLTIPS_SetToolInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam)
+TOOLTIPS_SetToolInfoA (HWND hwnd, LPARAM lParam)
 {
     TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
     LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@@ -2697,19 +2697,19 @@
     switch (uMsg)
     {
 	case TTM_ACTIVATE:
-	    return TOOLTIPS_Activate (hwnd, wParam, lParam);
+	    return TOOLTIPS_Activate (hwnd, wParam);
 
 	case TTM_ADDTOOLA:
-	    return TOOLTIPS_AddToolA (hwnd, wParam, lParam);
+	    return TOOLTIPS_AddToolA (hwnd, lParam);
 
 	case TTM_ADDTOOLW:
-	    return TOOLTIPS_AddToolW (hwnd, wParam, lParam);
+	    return TOOLTIPS_AddToolW (hwnd, lParam);
 
 	case TTM_DELTOOLA:
-	    return TOOLTIPS_DelToolA (hwnd, wParam, lParam);
+	    return TOOLTIPS_DelToolA (hwnd, lParam);
 
 	case TTM_DELTOOLW:
-	    return TOOLTIPS_DelToolW (hwnd, wParam, lParam);
+	    return TOOLTIPS_DelToolW (hwnd, lParam);
 
 	case TTM_ENUMTOOLSA:
 	    return TOOLTIPS_EnumToolsA (hwnd, wParam, lParam);
@@ -2724,13 +2724,13 @@
 	    return TOOLTIPS_GetCurrentToolA (hwnd, wParam, lParam);
 
 	case TTM_GETCURRENTTOOLW:
-	    return TOOLTIPS_GetCurrentToolW (hwnd, wParam, lParam);
+	    return TOOLTIPS_GetCurrentToolW (hwnd, lParam);
 
 	case TTM_GETDELAYTIME:
-	    return TOOLTIPS_GetDelayTime (hwnd, wParam, lParam);
+	    return TOOLTIPS_GetDelayTime (hwnd, wParam);
 
 	case TTM_GETMARGIN:
-	    return TOOLTIPS_GetMargin (hwnd, wParam, lParam);
+	    return TOOLTIPS_GetMargin (hwnd, lParam);
 
 	case TTM_GETMAXTIPWIDTH:
 	    return TOOLTIPS_GetMaxTipWidth (hwnd, wParam, lParam);
@@ -2748,10 +2748,10 @@
 	    return TOOLTIPS_GetTipTextColor (hwnd, wParam, lParam);
 
 	case TTM_GETTOOLCOUNT:
-	    return TOOLTIPS_GetToolCount (hwnd, wParam, lParam);
+	    return TOOLTIPS_GetToolCount (hwnd);
 
 	case TTM_GETTOOLINFOA:
-	    return TOOLTIPS_GetToolInfoA (hwnd, wParam, lParam);
+	    return TOOLTIPS_GetToolInfoA (hwnd, lParam);
 
 	case TTM_GETTOOLINFOW:
 	    return TOOLTIPS_GetToolInfoW (hwnd, wParam, lParam);
@@ -2760,7 +2760,7 @@
 	    return TOOLTIPS_HitTestA (hwnd, wParam, lParam);
 
 	case TTM_HITTESTW:
-	    return TOOLTIPS_HitTestW (hwnd, wParam, lParam);
+	    return TOOLTIPS_HitTestW (hwnd, lParam);
 
 	case TTM_NEWTOOLRECTA:
 	    return TOOLTIPS_NewToolRectA (hwnd, wParam, lParam);
@@ -2769,7 +2769,7 @@
 	    return TOOLTIPS_NewToolRectW (hwnd, wParam, lParam);
 
 	case TTM_POP:
-	    return TOOLTIPS_Pop (hwnd, wParam, lParam);
+	    return TOOLTIPS_Pop (hwnd);
 
 	case TTM_RELAYEVENT:
 	    return TOOLTIPS_RelayEvent (hwnd, wParam, lParam);
@@ -2778,7 +2778,7 @@
 	    return TOOLTIPS_SetDelayTime (hwnd, wParam, lParam);
 
 	case TTM_SETMARGIN:
-	    return TOOLTIPS_SetMargin (hwnd, wParam, lParam);
+	    return TOOLTIPS_SetMargin (hwnd, lParam);
 
 	case TTM_SETMAXTIPWIDTH:
 	    return TOOLTIPS_SetMaxTipWidth (hwnd, wParam, lParam);
@@ -2787,7 +2787,7 @@
 	    return TOOLTIPS_SetTipBkColor (hwnd, wParam, lParam);
 
 	case TTM_SETTIPTEXTCOLOR:
-	    return TOOLTIPS_SetTipTextColor (hwnd, wParam, lParam);
+	    return TOOLTIPS_SetTipTextColor (hwnd, wParam);
 
 	case TTM_SETTITLEA:
 	    return TOOLTIPS_SetTitleA (hwnd, wParam, lParam);
@@ -2796,7 +2796,7 @@
 	    return TOOLTIPS_SetTitleW (hwnd, wParam, lParam);
 
 	case TTM_SETTOOLINFOA:
-	    return TOOLTIPS_SetToolInfoA (hwnd, wParam, lParam);
+	    return TOOLTIPS_SetToolInfoA (hwnd, lParam);
 
 	case TTM_SETTOOLINFOW:
 	    return TOOLTIPS_SetToolInfoW (hwnd, wParam, lParam);

Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treeview.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -1112,7 +1112,7 @@
     if (tvItem->mask & TVIF_TEXT)
     {
         wineItem->textWidth = 0; /* force width recalculation */
-	if (tvItem->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */
+	if (tvItem->pszText != LPSTR_TEXTCALLBACKW && tvItem->pszText != NULL) /* covers != TEXTCALLBACKA too, and undocumented: pszText of NULL also means TEXTCALLBACK */
 	{
             int len;
             LPWSTR newText;

Modified: trunk/reactos/dll/win32/comctl32/updown.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/updown.c?rev=39850&r1=39849&r2=39850&view=diff
==============================================================================
--- trunk/reactos/dll/win32/comctl32/updown.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/comctl32/updown.c [iso-8859-1] Tue Mar  3 12:09:59 2009
@@ -570,7 +570,7 @@
                good to break the window proc chain. */
             if (!GetPropW(bud, BUDDY_SUPERCLASS_WNDPROC)) {
                 baseWndProc = (WNDPROC)SetWindowLongPtrW(bud, GWLP_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
-                SetPropW(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc);
+                SetPropW(bud, BUDDY_SUPERCLASS_WNDPROC, baseWndProc);
             }
         }
 



More information about the Ros-diffs mailing list