Commit in reactos/lib/comctl32 on MAIN
comctl32.h+11.7 -> 1.8
comctl32.spec+1-11.2 -> 1.3
comctl_Cn.rc+11.2 -> 1.3
comctl_De.rc+11.2 -> 1.3
comctl_En.rc+11.2 -> 1.3
comctl_Es.rc+11.2 -> 1.3
comctl_Fr.rc+11.2 -> 1.3
comctl_It.rc+2-11.2 -> 1.3
comctl_Ja.rc+11.2 -> 1.3
comctl_Ko.rc+11.2 -> 1.3
comctl_Nl.rc+11.2 -> 1.3
comctl_Pl.rc+11.2 -> 1.3
comctl_Pt.rc+11.2 -> 1.3
comctl_Ru.rc+11.2 -> 1.3
comctl_Si.rc+11.2 -> 1.3
comctl_Th.rc+11.2 -> 1.3
comctl_Uk.rc+26-251.1 -> 1.2
commctrl.c+1-21.11 -> 1.12
listview.c+17-131.10 -> 1.11
propsheet.c+239-171.7 -> 1.8
string.c+1-131.1 -> 1.2
tab.c+63-361.7 -> 1.8
toolbar.c+98-331.14 -> 1.15
winehq2ros.patch+13-841.7 -> 1.8
+475-225
24 modified files
Sync to Wine-20040615:
Maxime Bellenge <maxime.bellenge@laposte.net>
- Implemented PSH_WIZARD97_OLD and PSH_WIZARD97_NEW property sheet
  styles.
- Add DT_END_ELLIPSIS as defaut style for text.
Ilya Korniyko <k_ilya@ukr.net>
- Encoding fixes in Ukrainian translation.
Filip Navara <xnavara@volny.cz>
- Let the subclassing stack grow the opposite way to make the code
  more transparent.
- Remove SubclassWndProc and move its logic to DefSubclassProc.
Dimitrie O. Paun <dpaun@rogers.com>
- Clear the state image bits only if LVS_EX_CHECKBOXES is set.
- Fix obvious logical error in focus handling.
- Indentation and formatting fixes.
- (based on a patch by Krishna Murthy).
Ulrich Czekalla <ulrich@codeweavers.com>
- Handle case where iterator range contains 0 elements.
- Handle case when item text is empty.
  According to MSDN, length should be returned when lParam is NULL.
Patrik Stridvall <ps@leissner.se>
- StrSpnW doesn't exist in comctl32.dll but StrCSpnW does.
Jon Griffiths <jon_p_griffiths@yahoo.com>
- Implemented TCM_SETITEMEXTRA.
Robert Shearman <R.J.Shearman@warwick.ac.uk>
- Don't draw whole button pressed when separate dropdown pressed, just
  the separate dropdown itself.
- TBN_DRAGOUT and NM_RDBLCLK notifications.
- Remove unneeded member of private toolbar struct.

reactos/lib/comctl32
comctl32.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- comctl32.h	13 May 2004 20:34:24 -0000	1.7
+++ comctl32.h	16 Jun 2004 06:46:13 -0000	1.8
@@ -48,6 +48,7 @@
 #define IDC_NEXT_BUTTON  12324
 #define IDC_FINISH_BUTTON 12325
 #define IDC_SUNKEN_LINE   12326
+#define IDC_SUNKEN_LINEHEADER 12327
 
 #define IDS_CLOSE	  4160
 

reactos/lib/comctl32
comctl32.spec 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl32.spec	11 Mar 2004 11:13:28 -0000	1.2
+++ comctl32.spec	16 Jun 2004 06:46:13 -0000	1.3
@@ -75,7 +75,7 @@
 361 stdcall -noname StrCmpNIW(wstr wstr long)
 362 stdcall -noname StrStrW(wstr wstr)
 363 stdcall -noname StrStrIW(wstr wstr)
-364 stdcall -noname StrSpnW(wstr wstr)
+364 stdcall -noname StrCSpnW(wstr wstr)
 365 stdcall -noname StrToIntW(wstr)
 366 stdcall -noname StrChrIA(str long)
 367 stdcall -noname StrChrIW(wstr long)

reactos/lib/comctl32
comctl_Cn.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Cn.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Cn.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -44,6 +44,7 @@
   PUSHBUTTON    "����",    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
 
 

reactos/lib/comctl32
comctl_De.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_De.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_De.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -59,6 +59,7 @@
   PUSHBUTTON    "&Hilfe",     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
 
 

reactos/lib/comctl32
comctl_En.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_En.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_En.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "Help",    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
 
 

reactos/lib/comctl32
comctl_Es.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Es.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Es.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "Ayuda",        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
 
 

reactos/lib/comctl32
comctl_Fr.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Fr.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Fr.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -47,6 +47,7 @@
   PUSHBUTTON    "Aide",    IDHELP,235,138,50,14,WS_GROUP
   LTEXT         "",        IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
   CONTROL       "Onglet",  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
 
 

reactos/lib/comctl32
comctl_It.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_It.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_It.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -1,6 +1,6 @@
 /*
  * Copyright 1999 Eric Kohl
- * Copyright 2003 Ivan Leo Murray-Smith
+ * Copyright 2003 Ivan Leo Puoti
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -44,6 +44,7 @@
   PUSHBUTTON    "Aiuto",    IDHELP,235,138,50,14,WS_GROUP
   LTEXT         "",        IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
   CONTROL       "Linguetta",     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
 
 

reactos/lib/comctl32
comctl_Ja.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Ja.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Ja.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "�w���v",    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
 
 

reactos/lib/comctl32
comctl_Ko.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Ko.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Ko.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "������",    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
 
 

reactos/lib/comctl32
comctl_Nl.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Nl.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Nl.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -45,6 +45,7 @@
   PUSHBUTTON    "Help",        IDHELP,235,138,50,14,WS_GROUP
   LTEXT         "",            IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
   CONTROL       "Tabblad",     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
 
 

reactos/lib/comctl32
comctl_Pl.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Pl.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Pl.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -44,6 +44,7 @@
   PUSHBUTTON    "Pomoc",    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
 
 

reactos/lib/comctl32
comctl_Pt.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Pt.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Pt.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "Ajuda",    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
 
 

reactos/lib/comctl32
comctl_Ru.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Ru.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Ru.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -45,6 +45,7 @@
   PUSHBUTTON    "&�������",    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
 
 

reactos/lib/comctl32
comctl_Si.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Si.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Si.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "Pomo�",    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
 
 

reactos/lib/comctl32
comctl_Th.rc 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- comctl_Th.rc	28 Jan 2004 21:40:09 -0000	1.2
+++ comctl_Th.rc	16 Jun 2004 06:46:13 -0000	1.3
@@ -43,6 +43,7 @@
   PUSHBUTTON    "���������",    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
 
 

reactos/lib/comctl32
comctl_Uk.rc 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- comctl_Uk.rc	8 May 2004 11:41:04 -0000	1.1
+++ comctl_Uk.rc	16 Jun 2004 06:46:13 -0000	1.2
@@ -22,67 +22,68 @@
 
 IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
-CAPTION "����������&#1110; ��� "
+CAPTION "����������� ��� "
 FONT 8, "MS Sans Serif"
 BEGIN
   DEFPUSHBUTTON "OK",     IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
-  PUSHBUTTON    "&�&#1110;��&#1110;��", IDCANCEL,58,122,50,14
-  PUSHBUTTON    "&�����������", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
-  PUSHBUTTON    "&���&#1110;���",   IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
+  PUSHBUTTON    "&�������", IDCANCEL,58,122,50,14
+  PUSHBUTTON    "&�����������", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
+  PUSHBUTTON    "&�������",   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 "������"
+CAPTION "������"
 FONT 8, "MS Sans Serif"
 BEGIN
-  DEFPUSHBUTTON "&���������",  IDC_FINISH_BUTTON,121,138,50,14
-  DEFPUSHBUTTON "&���&#1110; >", IDC_NEXT_BUTTON,121,138,50,14
-  PUSHBUTTON    "< &�����", IDC_BACK_BUTTON,71,138,50,14
-  PUSHBUTTON    "&�&#1110;��&#1110;��",  IDCANCEL,178,138,50,14
-  PUSHBUTTON    "&���&#1110;���",    IDHELP,235,138,50,14,WS_GROUP
+  DEFPUSHBUTTON "&���������",  IDC_FINISH_BUTTON,121,138,50,14
+  DEFPUSHBUTTON "&���� >", IDC_NEXT_BUTTON,121,138,50,14
+  PUSHBUTTON    "< &�����", IDC_BACK_BUTTON,71,138,50,14
+  PUSHBUTTON    "&�������",  IDCANCEL,178,138,50,14
+  PUSHBUTTON    "&�������",    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 "��������� �����&#1110; &#1110;���������&#1110;�"
+CAPTION "��������� ������ ������������"
 FONT 8, "MS Sans Serif"
 BEGIN
-  DEFPUSHBUTTON "&�������",     IDCANCEL,308,6,44,14
-  PUSHBUTTON    "&�������",     IDC_RESET_BTN,308,23,44,14
-  PUSHBUTTON    "&���&#1110;���",      IDC_HELP_BTN,308,40,44,14
-  PUSHBUTTON    "���������� �&����",   IDC_MOVEUP_BTN,308,74,44,14
-  PUSHBUTTON    "���������� ��&����", IDC_MOVEDN_BTN,308,91,44,14
-  LTEXT         "��&���&#1110; ������:", -1,4,5,84,10
+  DEFPUSHBUTTON "&�������",     IDCANCEL,308,6,44,14
+  PUSHBUTTON    "&�������",     IDC_RESET_BTN,308,23,44,14
+  PUSHBUTTON    "&�������",      IDC_HELP_BTN,308,40,44,14
+  PUSHBUTTON    "���������� �&����",   IDC_MOVEUP_BTN,308,74,44,14
+  PUSHBUTTON    "���������� ��&����", IDC_MOVEDN_BTN,308,91,44,14
+  LTEXT         "��&���� ������:", -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    "&������ ->",    IDOK, 131, 42, 44, 14
-  PUSHBUTTON    "<- &��������", IDC_REMOVE_BTN,131,62,44,14
-  LTEXT         "&������ �����&#1110; &#1110;���������&#1110;�:", -1,182,5,78,10
+  PUSHBUTTON    "&������ ->",    IDOK, 131, 42, 44, 14
+  PUSHBUTTON    "<- &��������", IDC_REMOVE_BTN,131,62,44,14
+  LTEXT         "&������ ������ ������������:", -1,182,5,78,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    "�������"
+    IDS_CLOSE    "�������"
 }
 
 STRINGTABLE DISCARDABLE
 {
-    IDM_TODAY    "�������&#1110;:"
-    IDM_GOTODAY  "������� ����"
+    IDM_TODAY    "��������:"
+    IDM_GOTODAY  "������� ����"
 }
 
 STRINGTABLE DISCARDABLE
 {
-    IDS_SEPARATOR "����&#1110;�����"
+    IDS_SEPARATOR "����������"
 }
 
 STRINGTABLE DISCARDABLE
 {
-    HKY_NONE "����"
+    HKY_NONE "����"
 }

reactos/lib/comctl32
commctrl.c 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- commctrl.c	13 May 2004 20:34:24 -0000	1.11
+++ commctrl.c	16 Jun 2004 06:46:13 -0000	1.12
@@ -1084,7 +1084,7 @@
                         UINT_PTR uIDSubclass, DWORD_PTR dwRef)
 {
    LPSUBCLASS_INFO stack;
-   int newnum, n;
+   int n;
 
    TRACE ("(%p, %p, %x, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
 
@@ -1275,7 +1275,6 @@
 LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
    LPSUBCLASS_INFO stack;
-   int stackpos;
    LRESULT ret;
 
    /* retrieve our little stack from the Properties */

reactos/lib/comctl32
listview.c 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- listview.c	8 May 2004 11:41:04 -0000	1.10
+++ listview.c	16 Jun 2004 06:46:13 -0000	1.11
@@ -1114,8 +1114,13 @@
 
     if (!i->ranges) return i->range;
 
-    range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
-    range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
+    if (DPA_GetPtrCount(i->ranges->hdpa) > 0)
+    {
+        range.lower = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, 0)).lower;
+        range.upper = (*(RANGE*)DPA_GetPtr(i->ranges->hdpa, DPA_GetPtrCount(i->ranges->hdpa) - 1)).upper;
+    }
+    else range.lower = range.upper = 0;
+
     return range;
 }
 
@@ -3313,7 +3318,7 @@
 	    ranges_delitem(infoPtr->selectionRanges, lpLVItem->iItem);
 	
 	/* if we are asked to change focus, and we manage it, do it */
-	if (lpLVItem->state & lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED)
+	if (lpLVItem->stateMask & ~infoPtr->uCallbackMask & LVIS_FOCUSED)
 	{
 	    if (lpLVItem->state & LVIS_FOCUSED)
 	    {
@@ -6037,7 +6042,7 @@
 }
 
 /***
- * nESCRIPTION:
+ * DESCRIPTION:
  * Inserts a new item in the listview control.
  *
  * PARAMETER(S):
@@ -6068,8 +6073,7 @@
 
     if (!is_assignable_item(lpLVItem, infoPtr->dwStyle)) return -1;
 
-    if ( !(lpItem = (ITEM_INFO *)Alloc(sizeof(ITEM_INFO))) )
-	return -1;
+    if (!(lpItem = (ITEM_INFO *)Alloc(sizeof(ITEM_INFO)))) return -1;
     
     /* insert item in listview control data structure */
     if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail;
@@ -6090,21 +6094,21 @@
     /* set the item attributes */
     if (lpLVItem->mask & (LVIF_GROUPID|LVIF_COLUMNS))
     {
-       /* full size structure expected - _WIN32IE >= 0x560 */
-       item = *lpLVItem;
+        /* full size structure expected - _WIN32IE >= 0x560 */
+        item = *lpLVItem;
     }
     else if (lpLVItem->mask & LVIF_INDENT)
     {
-       /* indent member expected - _WIN32IE >= 0x300 */
-       memcpy(&item, lpLVItem, offsetof( LVITEMW, iGroupId ));
+        /* indent member expected - _WIN32IE >= 0x300 */
+        memcpy(&item, lpLVItem, offsetof( LVITEMW, iGroupId ));
     }
     else
     {
-       /* minimal structure expected */
-       memcpy(&item, lpLVItem, offsetof( LVITEMW, iIndent ));
+        /* minimal structure expected */
+        memcpy(&item, lpLVItem, offsetof( LVITEMW, iIndent ));
     }
     item.iItem = nItem;
-    item.state &= ~LVIS_STATEIMAGEMASK;
+    if (infoPtr->dwLvExStyle & LVS_EX_CHECKBOXES) item.state &= ~LVIS_STATEIMAGEMASK;
     if (!set_main_item(infoPtr, &item, TRUE, isW, &has_changed)) goto undo;
 
     /* if we're sorted, sort the list, and update the index */

reactos/lib/comctl32
propsheet.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- propsheet.c	8 May 2004 11:41:04 -0000	1.7
+++ propsheet.c	16 Jun 2004 06:46:13 -0000	1.8
@@ -3,6 +3,7 @@
  *
  * Copyright 1998 Francis Beaudet
  * Copyright 1999 Thuy Nguyen
+ * Copyright 2004 Maxime Bellenge
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -94,6 +95,8 @@
   BOOL rebootSystem;
   BOOL activeValid;
   PropPageInfo* proppage;
+  HFONT hFont;
+  HFONT hFontBold;
   int x;
   int y;
   int width;
@@ -217,15 +220,9 @@
     add_flag(PSH_RTLREADING);
     add_flag(PSH_WIZARDCONTEXTHELP);
     add_flag(PSH_WIZARD97_OLD);
-    add_flag(PSH_WATERMARK);
-    add_flag(PSH_USEHBMWATERMARK);
-    add_flag(PSH_USEHPLWATERMARK);
     add_flag(PSH_STRETCHWATERMARK);
-    add_flag(PSH_HEADER);
-    add_flag(PSH_USEHBMHEADER);
     add_flag(PSH_USEPAGELANG);
     add_flag(PSH_WIZARD_LITE);
-    add_flag(PSH_WIZARD97_NEW);
     add_flag(PSH_NOCONTEXTHELP);
     if (string[0] != '\0')
 	FIXME("%s\n", string);
@@ -886,7 +883,11 @@
 
   /* Make room */
   rc.right += (padding.x * 2);
-  rc.bottom += (buttonHeight + (5 * padding.y) + lineHeight);
+  rc.bottom += (buttonHeight + lineHeight);
+  if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW))
+      rc.bottom += (4 * padding.y);
+  else 
+      rc.bottom += (5 * padding.y);
 
   /*
    * Resize the property sheet.
@@ -1003,6 +1004,7 @@
 {
   HWND hwndButton = GetDlgItem(hwndParent, IDCANCEL);
   HWND hwndLine = GetDlgItem(hwndParent, IDC_SUNKEN_LINE);
+  HWND hwndLineHeader = GetDlgItem(hwndParent, IDC_SUNKEN_LINEHEADER);
   RECT rcSheet;
   int x, y;
   int num_buttons = 3;
@@ -1084,18 +1086,29 @@
   else
     ShowWindow(hwndButton, SW_HIDE);
 
+  if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) 
+      padding.x = 0;
+
   /*
    * Position and resize the sunken line.
    */
   x = padding.x;
   y = rcSheet.bottom - ((padding.y * 2) + buttonHeight + lineHeight);
 
-  GetClientRect(hwndParent, &rcSheet);
   lineWidth = rcSheet.right - (padding.x * 2);
 
   SetWindowPos(hwndLine, 0, x, y, lineWidth, 2,
                SWP_NOZORDER | SWP_NOACTIVATE);
 
+  /*
+   * Position and resize the header sunken line.
+   */
+  
+  SetWindowPos(hwndLineHeader, 0, 0, 0, rcSheet.right, 2,
+	       SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+  if (!(psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)))
+      ShowWindow(hwndLineHeader, SW_HIDE);
+
   return TRUE;
 }
 
@@ -1497,10 +1510,12 @@
 
   psInfo->proppage[index].hwndPage = hwndPage;
 
-  if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {
-      /* FIXME: This code may no longer be correct.
-       *        It was not for the non-wizard path.  (GLA 6/02)
-       */
+  if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) {     
+      int offsetx = 0;
+      int offsety = 0;
+      HWND hwndChild;
+      RECT r;
+
       rc.left = psInfo->x;
       rc.top = psInfo->y;
       rc.right = psInfo->width;
@@ -1515,10 +1530,58 @@
       TRACE("setting page %08lx, rc (%ld,%ld)-(%ld,%ld) w=%d, h=%d, padx=%d, pady=%d\n",
 	    (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom,
 	    pageWidth, pageHeight, padding.x, padding.y);
+
+      /* If there is a watermark, offset the dialog items */     
+      if ( (psInfo->ppshheader.dwFlags & (PSH_WATERMARK | PSH_WIZARD97_NEW | PSH_WIZARD97_OLD)) &&
+	   ((index == 0) || (index == psInfo->nPages - 1)) )
+      {
+	  BITMAP bm;
+
+	  /* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark 
+	     and put the HBITMAP in hbmWatermark. Thus all the rest of the code always 
+	     considers hbmWatermark as valid. */
+	  if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) 
+	  {
+	      ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = 
+		  CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
+	  }
+
+	  /* Compute the offset x */
+	  GetObjectA(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
+	  offsetx = bm.bmWidth;
+      }
+
+      if (psInfo->ppshheader.dwFlags & (PSH_HEADER | PSH_WIZARD97_NEW | PSH_WIZARD97_OLD))
+      {
+	  /* Same behavior as for watermarks */
+	  if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER))
+	  {
+	      ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = 
+		  CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
+	  }
+
+	  hwndChild = GetDlgItem(hwndParent, IDC_SUNKEN_LINEHEADER);
+
+	  GetClientRect(hwndChild, &r);
+	  MapWindowPoints(hwndChild, hwndParent, (LPPOINT) &r, 2);
+	  offsety = (ppshpage->dwFlags & PSP_HIDEHEADER)?0:r.bottom + 1;
+      }
+
+      hwndChild = GetWindow(hwndPage, GW_CHILD);
+      while((offsetx!=0) && (hwndChild)) {
+	  GetWindowRect(hwndChild, &r);
+	  MapWindowPoints(0, hwndPage, (LPPOINT)&r, 2);
+	  OffsetRect(&r, -offsetx, 0);
+	  SetWindowPos(hwndChild, 0, r.left, r.top, 
+		       0, 0, SWP_NOSIZE | SWP_NOZORDER);
+	  
+	  hwndChild = GetWindow(hwndChild, GW_HWNDNEXT);
+      }      
+
       SetWindowPos(hwndPage, HWND_TOP,
-		   rc.left + padding.x/2,
-		   rc.top + padding.y/2,
-		   pageWidth, pageHeight, 0);
+		   rc.left + padding.x/2 + offsetx,
+		   rc.top + padding.y/2 + offsety,
+		   pageWidth - offsetx, pageHeight - offsety, 0);
   }
   else {
       /*
@@ -1547,6 +1610,8 @@
 static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo)
 {
   HWND hwndTabCtrl;
+  HWND hwndLineHeader;
+  LPCPROPSHEETPAGEW ppshpage;
 
   TRACE("active_page %d, index %d\n", psInfo->active_page, index);
   if (index == psInfo->active_page)
@@ -1558,8 +1623,6 @@
 
   if (psInfo->proppage[index].hwndPage == 0)
   {
-     LPCPROPSHEETPAGEW ppshpage;
-
      ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
      PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage);
   }
@@ -1580,6 +1643,20 @@
   psInfo->active_page = index;
   psInfo->activeValid = TRUE;
 
+  if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW) )
+  {
+      hwndLineHeader = GetDlgItem(hwndDlg, IDC_SUNKEN_LINEHEADER);
+      ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[index].hpage;
+      
+      if ((ppshpage->dwFlags & PSP_HIDEHEADER) || (!(psInfo->ppshheader.dwFlags & PSH_HEADER)) )
+	  ShowWindow(hwndLineHeader, SW_HIDE);
+      else
+	  ShowWindow(hwndLineHeader, SW_SHOW);
+
+      InvalidateRgn(hwndDlg, NULL, TRUE);
+      UpdateWindow(hwndDlg);
+  }
+
   return TRUE;
 }
 
@@ -2469,6 +2546,16 @@
      }
   }
 
+  DeleteObject(psInfo->hFont);
+  DeleteObject(psInfo->hFontBold);
+  /* If we created the bitmaps, destroy them */
+  if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) &&
+      (!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) )
+      DeleteObject(psInfo->ppshheader.u4.hbmWatermark);
+  if ((psInfo->ppshheader.dwFlags & PSH_HEADER) &&
+      (!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) )
+      DeleteObject(psInfo->ppshheader.u5.hbmHeader);
+
   Free(psInfo->proppage);
   Free(psInfo->strPropertiesFor);
   ImageList_Destroy(psInfo->hImageList);
@@ -2814,6 +2901,129 @@
 }
 
 /******************************************************************************
+ *            PROPSHEET_Paint
+ */
+static LRESULT PROPSHEET_Paint(HWND hwnd)
+{
+    PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
+    PAINTSTRUCT ps;
+    HDC hdc, hdcSrc;
+    BITMAP bm;
+    HBITMAP hbmp;
+    HPALETTE hOldPal = 0;
+    int offsety = 0;
+    HBRUSH hbr;
+    RECT r;
+    LPCPROPSHEETPAGEW ppshpage;
+
+    hdc = BeginPaint(hwnd, &ps);
+    if (!hdc) return 1;
+
+    hdcSrc = CreateCompatibleDC(0);
+    ppshpage = (LPCPROPSHEETPAGEW)psInfo->proppage[psInfo->active_page].hpage;
+
+    if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) 
+	hOldPal = SelectPalette(hdc, psInfo->ppshheader.hplWatermark, FALSE);
+
+    if ( (!(ppshpage->dwFlags & PSP_HIDEHEADER)) &&
+	 (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_HEADER)) ) 
+    {
+	RECT rzone;
+	HWND hwndLineHeader = GetDlgItem(hwnd, IDC_SUNKEN_LINEHEADER);
+	HFONT hOldFont;
+	COLORREF clrOld = 0;
+	int oldBkMode = 0;
+
+	hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u5.hbmHeader);
+	hOldFont = SelectObject(hdc, psInfo->hFontBold);		
+
+	GetClientRect(hwndLineHeader, &r);
+	MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
+	SetRect(&rzone, 0, 0, r.right, r.top - 1);
+	hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0));
+	FillRect(hdc, &rzone, hbr);
+	DeleteObject(hbr);
+
+	GetObjectA(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm);		
+
+	clrOld = SetTextColor (hdc, 0x00000000);
+	oldBkMode = SetBkMode (hdc, TRANSPARENT); 
+
+	if (ppshpage->dwFlags & PSP_USEHEADERTITLE) {	    
+	    SetRect(&r, 20, 10, rzone.right - bm.bmWidth, 18);
+	    if (psInfo->unicode)
+		DrawTextW(hdc, (LPWSTR)ppshpage->pszHeaderTitle, 
+			  -1, &r, DT_LEFT | DT_SINGLELINE | DT_NOCLIP);
+	    else
+		DrawTextA(hdc, (LPCSTR)ppshpage->pszHeaderTitle, 
+			  -1, &r, DT_LEFT | DT_SINGLELINE | DT_NOCLIP);	
+	}
+
+	if (ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) {
+	    SelectObject(hdc, psInfo->hFont);
+	    SetRect(&r, 40, 25, rzone.right - bm.bmWidth, 43);
+	    if (psInfo->unicode)
+		DrawTextW(hdc, (LPWSTR)ppshpage->pszHeaderSubTitle, 
+		      -1, &r, DT_LEFT | DT_SINGLELINE);
+	    else
+		DrawTextA(hdc, (LPCSTR)ppshpage->pszHeaderSubTitle, 
+		      -1, &r, DT_LEFT | DT_SINGLELINE);	
+	}
+
+	BitBlt(hdc, rzone.right - bm.bmWidth, (rzone.bottom - bm.bmHeight)/2,
+	       bm.bmWidth, bm.bmHeight, 
+	       hdcSrc, 0, 0, SRCCOPY);
+	offsety = rzone.bottom + 2;
+
+	SetTextColor(hdc, clrOld);
+	SetBkMode(hdc, oldBkMode);
+	SelectObject(hdc, hOldFont);
+	SelectObject(hdcSrc, hbmp);
+    }
+
+    if ( ((psInfo->active_page == 0) || (psInfo->active_page == psInfo->nPages - 1)) &&
+	 (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WATERMARK)) ) 
+    {
+	if (psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK ) 
+	{
+	    HWND hwndLine = GetDlgItem(hwnd, IDC_SUNKEN_LINE);	    
+
+	    GetClientRect(hwndLine, &r);
+	    MapWindowPoints(hwndLine, hwnd, (LPPOINT) &r, 2);
+
+	    GetObjectA(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm);
+	    hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
+
+	    BitBlt(hdc, 0, offsety, bm.bmWidth, bm.bmHeight, 
+		   hdcSrc, 0, 0, SRCCOPY);
+
+	    /* If the bitmap is not big enough, fill the remaining area
+	       with the color of pixel (0,0) of bitmap - see MSDN */
+	    if (r.top > bm.bmHeight) {
+		r.bottom = r.top - 1;
+		r.top = bm.bmHeight;
+		r.left = 0;
+		r.right = bm.bmWidth;
+		hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0));
+		FillRect(hdc, &r, hbr);
+		DeleteObject(hbr);
+	    }
+
+	    SelectObject(hdcSrc, hbmp);	    
+	}
+    }
+
+    if (psInfo->ppshheader.dwFlags & PSH_USEHPLWATERMARK) 
+	SelectPalette(hdc, hOldPal, FALSE);
+
+    DeleteDC(hdcSrc);
+
+    EndPaint(hwnd, &ps);
+
+    return 0;
+}
+
+/******************************************************************************
  *            PROPSHEET_DialogProc
  */
 INT_PTR CALLBACK
@@ -2831,6 +3041,7 @@
       HWND hwndTabCtrl = GetDlgItem(hwnd, IDC_TABCONTROL);
       LPCPROPSHEETPAGEW ppshpage;
       int idx;
+      LOGFONTA logFont;
 
       /* Using PropSheetInfoStr to store extra data doesn't match the native
        * common control: native uses TCM_[GS]ETITEM
@@ -2849,6 +3060,12 @@
       /* set up the Next and Back buttons by default */
       PROPSHEET_SetWizButtons(hwnd, PSWIZB_BACK|PSWIZB_NEXT);
 
+      /* Set up fonts */
+      SystemParametersInfoA (SPI_GETICONTITLELOGFONT, 0, &logFont, 0);
+      psInfo->hFont = CreateFontIndirectA (&logFont);
+      logFont.lfWeight = FW_BOLD;
+      psInfo->hFontBold = CreateFontIndirectA (&logFont);
+      
       /*
        * Small icon in the title bar.
        */
@@ -2882,6 +3099,7 @@
 
       if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD)
       {
+        ShowWindow(hwndTabCtrl, SW_HIDE);
         if (PROPSHEET_IsTooSmallWizard(hwnd, psInfo))
         {
           PROPSHEET_AdjustSizeWizard(hwnd, psInfo);
@@ -2930,6 +3148,10 @@
       return TRUE;
     }
 
+    case WM_PAINT:
+      PROPSHEET_Paint(hwnd);
+      return TRUE;
+
     case WM_DESTROY:
       PROPSHEET_CleanUp(hwnd);
       return TRUE;

reactos/lib/comctl32
string.c 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- string.c	11 Mar 2004 11:13:28 -0000	1.1
+++ string.c	16 Jun 2004 06:46:13 -0000	1.2
@@ -763,19 +763,7 @@
 }
 
 /*************************************************************************
- * StrSpnW	[COMCTL32.364]
- *
- * See StrSpnA.
- */
-int WINAPI StrSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
-{
-  TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
-
-  return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, FALSE);
-}
-
-/*************************************************************************
- * StrCSpnW	[COMCTL32.@]
+ * StrCSpnW	[COMCTL32.364]
  *
  * See StrCSpnA.
  */

reactos/lib/comctl32
tab.c 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- tab.c	11 Mar 2004 11:13:28 -0000	1.7
+++ tab.c	16 Jun 2004 06:46:13 -0000	1.8
@@ -27,7 +27,6 @@
  *   TCIF_RTLREADING
  *
  *  Messages:
- *   TCM_SETITEMEXTRA
  *   TCM_REMOVEIMAGE
  *   TCM_DESELECTALL
  *   TCM_GETEXTENDEDSTYLE
@@ -56,15 +55,18 @@
   DWORD  dwState;
   LPWSTR pszText;
   INT    iImage;
-  LPARAM lParam;
-  RECT   rect;    /* bounding rectangle of the item relative to the
-		   * leftmost item (the leftmost item, 0, would have a
-		   * "left" member of 0 in this rectangle)
-                   *
-                   * additionally the top member hold the row number
-                   * and bottom is unused and should be 0 */
+  RECT   rect;      /* bounding rectangle of the item relative to the
+                     * leftmost item (the leftmost item, 0, would have a
+                     * "left" member of 0 in this rectangle)
+                     *
+                     * additionally the top member hold the row number
+                     * and bottom is unused and should be 0 */
+  BYTE   extra[1];  /* Space for caller supplied info, variable size */
 } TAB_ITEM;
 
+/* The size of a tab item depends on how much extra data is requested */
+#define TAB_ITEM_SIZE(infoPtr) (sizeof(TAB_ITEM) - sizeof(BYTE) + infoPtr->cbInfo)
+
 typedef struct
 {
   HWND       hwndNotify;      /* notification window (parent) */
@@ -82,17 +84,18 @@
   HIMAGELIST himl;            /* handle to a image list (may be 0) */
   HWND       hwndToolTip;     /* handle to tab's tooltip */
   INT        leftmostVisible; /* Used for scrolling, this member contains
-			       * the index of the first visible item */
+                               * the index of the first visible item */
   INT        iSelected;       /* the currently selected item */
   INT        iHotTracked;     /* the highlighted item under the mouse */
   INT        uFocus;          /* item which has the focus */
   TAB_ITEM*  items;           /* pointer to an array of TAB_ITEM's */
   BOOL       DoRedraw;        /* flag for redrawing when tab contents is changed*/
   BOOL       needsScrolling;  /* TRUE if the size of the tabs is greater than
-			       * the size of the control */
+                               * the size of the control */
   BOOL       fHeightSet;      /* was the height of the tabs explicitly set? */
   BOOL       bUnicode;        /* Unicode control? */
   HWND       hwndUpDown;      /* Updown control used for scrolling */
+  INT        cbInfo;          /* Number of bytes of caller supplied info per tab */
 } TAB_INFO;
 
 /******************************************************************************
@@ -190,8 +193,8 @@
 	TRACE("tab %d, mask=0x%08x, dwState=0x%08lx, pszText=%s, iImage=%d\n",
 	      iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
 	      ti->iImage);
-	TRACE("tab %d, lParam=0x%08lx, rect.left=%ld, rect.top(row)=%ld\n",
-	      iItem, ti->lParam, ti->rect.left, ti->rect.top);
+	TRACE("tab %d, rect.left=%ld, rect.top(row)=%ld\n",
+	      iItem, ti->rect.left, ti->rect.top);
     }
 }
 
@@ -1654,7 +1657,8 @@
     dis.hwndItem = hwnd;		/* */
     dis.hDC      = hdc;
     CopyRect(&dis.rcItem,drawRect);
-    dis.itemData = infoPtr->items[iItem].lParam;
+    dis.itemData = 0;
+    memcpy( &dis.itemData, infoPtr->items[iItem].extra, min(sizeof(dis.itemData),infoPtr->cbInfo) );
 
     /*
      * send the draw message
@@ -2520,7 +2524,7 @@
 
 
   if (infoPtr->uNumItem == 0) {
-    infoPtr->items = Alloc (sizeof (TAB_ITEM));
+    infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr));
     infoPtr->uNumItem++;
     infoPtr->iSelected = 0;
   }
@@ -2528,18 +2532,18 @@
     TAB_ITEM *oldItems = infoPtr->items;
 
     infoPtr->uNumItem++;
-    infoPtr->items = Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
+    infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
 
     /* pre insert copy */
     if (iItem > 0) {
       memcpy (&infoPtr->items[0], &oldItems[0],
-	      iItem * sizeof(TAB_ITEM));
+              iItem * TAB_ITEM_SIZE(infoPtr));
     }
 
     /* post insert copy */
     if (iItem < infoPtr->uNumItem - 1) {
       memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
-	      (infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
+              (infoPtr->uNumItem - iItem - 1) * TAB_ITEM_SIZE(infoPtr));
 
     }
 
@@ -2557,8 +2561,10 @@
     infoPtr->items[iItem].iImage = pti->iImage;
 
   if (pti->mask & TCIF_PARAM)
-    infoPtr->items[iItem].lParam = pti->lParam;
-
+    memcpy(infoPtr->items[iItem].extra, &pti->lParam, infoPtr->cbInfo);
+  else
+    memset(infoPtr->items[iItem].extra, 0, infoPtr->cbInfo);
+  
   TAB_SetItemBounds(hwnd);
   if (infoPtr->uNumItem > 1)
     TAB_InvalidateTabArea(hwnd, infoPtr);
@@ -2566,7 +2572,7 @@
     InvalidateRect(hwnd, NULL, TRUE);
 
   TRACE("[%p]: added item %d %s\n",
-	hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
+        hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
 
   return iItem;
 }
@@ -2594,7 +2600,7 @@
   TAB_DumpItemExternalW(pti, iItem);
 
   if (infoPtr->uNumItem == 0) {
-    infoPtr->items = Alloc (sizeof (TAB_ITEM));
+    infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr));
     infoPtr->uNumItem++;
     infoPtr->iSelected = 0;
   }
@@ -2602,18 +2608,18 @@
     TAB_ITEM *oldItems = infoPtr->items;
 
     infoPtr->uNumItem++;
-    infoPtr->items = Alloc (sizeof (TAB_ITEM) * infoPtr->uNumItem);
+    infoPtr->items = Alloc (TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
 
     /* pre insert copy */
     if (iItem > 0) {
       memcpy (&infoPtr->items[0], &oldItems[0],
-	      iItem * sizeof(TAB_ITEM));
+              iItem * TAB_ITEM_SIZE(infoPtr));
     }
 
     /* post insert copy */
     if (iItem < infoPtr->uNumItem - 1) {
       memcpy (&infoPtr->items[iItem+1], &oldItems[iItem],
-	      (infoPtr->uNumItem - iItem - 1) * sizeof(TAB_ITEM));
+              (infoPtr->uNumItem - iItem - 1) * TAB_ITEM_SIZE(infoPtr));
 
   }
 
@@ -2631,7 +2637,9 @@
     infoPtr->items[iItem].iImage = pti->iImage;
 
   if (pti->mask & TCIF_PARAM)
-    infoPtr->items[iItem].lParam = pti->lParam;
+    memcpy(infoPtr->items[iItem].extra, &pti->lParam, infoPtr->cbInfo);
+  else
+    memset(infoPtr->items[iItem].extra, 0, infoPtr->cbInfo);
 
   TAB_SetItemBounds(hwnd);
   if (infoPtr->uNumItem > 1)
@@ -2640,7 +2648,7 @@
     InvalidateRect(hwnd, NULL, TRUE);
 
   TRACE("[%p]: added item %d %s\n",
-	hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
+        hwnd, iItem, debugstr_w(infoPtr->items[iItem].pszText));
 
   return iItem;
 }
@@ -2739,7 +2747,7 @@
     wineItem->iImage = tabItem->iImage;
 
   if (tabItem->mask & TCIF_PARAM)
-    wineItem->lParam = tabItem->lParam;
+    memcpy(wineItem->extra, &tabItem->lParam, infoPtr->cbInfo);
 
   if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
@@ -2780,7 +2788,7 @@
     wineItem->iImage = tabItem->iImage;
 
   if (tabItem->mask & TCIF_PARAM)
-    wineItem->lParam = tabItem->lParam;
+    memcpy(wineItem->extra, &tabItem->lParam, infoPtr->cbInfo);
 
   if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
@@ -2828,7 +2836,7 @@
     tabItem->iImage = wineItem->iImage;
 
   if (tabItem->mask & TCIF_PARAM)
-    tabItem->lParam = wineItem->lParam;
+    memcpy(&tabItem->lParam, wineItem->extra, infoPtr->cbInfo);
 
   if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
@@ -2865,7 +2873,7 @@
     tabItem->iImage = wineItem->iImage;
 
   if (tabItem->mask & TCIF_PARAM)
-    tabItem->lParam = wineItem->lParam;
+    memcpy(&tabItem->lParam, wineItem->extra, infoPtr->cbInfo);
 
   if (tabItem->mask & TCIF_RTLREADING)
     FIXME("TCIF_RTLREADING\n");
@@ -2896,14 +2904,14 @@
 	TAB_InvalidateTabArea(hwnd, infoPtr);
 
 	infoPtr->uNumItem--;
-	infoPtr->items = Alloc(sizeof (TAB_ITEM) * infoPtr->uNumItem);
+	infoPtr->items = Alloc(TAB_ITEM_SIZE(infoPtr) * infoPtr->uNumItem);
 
 	if (iItem > 0)
-	    memcpy(&infoPtr->items[0], &oldItems[0], iItem * sizeof(TAB_ITEM));
+	    memcpy(&infoPtr->items[0], &oldItems[0], iItem * TAB_ITEM_SIZE(infoPtr));
 
 	if (iItem < infoPtr->uNumItem)
 	    memcpy(&infoPtr->items[iItem], &oldItems[iItem + 1],
-		   (infoPtr->uNumItem - iItem) * sizeof(TAB_ITEM));
+		   (infoPtr->uNumItem - iItem) * TAB_ITEM_SIZE(infoPtr));
 
 	Free(oldItems);
 
@@ -3081,7 +3089,8 @@
   infoPtr->hwndUpDown      = 0;
   infoPtr->leftmostVisible = 0;
   infoPtr->fHeightSet      = FALSE;
-  infoPtr->bUnicode	   = IsWindowUnicode (hwnd);
+  infoPtr->bUnicode        = IsWindowUnicode (hwnd);
+  infoPtr->cbInfo          = sizeof(LPARAM);
 
   TRACE("Created tab control, hwnd [%p]\n", hwnd);
 
@@ -3174,6 +3183,25 @@
   return 0;
 }
 
+static LRESULT
+TAB_SetItemExtra (HWND hwnd, WPARAM wParam, LPARAM lParam)
+{
+  TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
+  INT cbInfo = wParam;
+   
+  if (!infoPtr || cbInfo <= 0)
+    return FALSE;
+
+  if (infoPtr->uNumItem)
+  {
+    /* FIXME: MSDN says this is not allowed, but this hasn't been verified */
+    return FALSE;
+  }
+    
+  infoPtr->cbInfo = cbInfo;
+  return TRUE;
+}
+
 static LRESULT WINAPI
 TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
@@ -3231,8 +3259,7 @@
       return TAB_InsertItemW (hwnd, wParam, lParam);
 
     case TCM_SETITEMEXTRA:
-      FIXME("Unimplemented msg TCM_SETITEMEXTRA\n");
-      return 0;
+      return TAB_SetItemExtra (hwnd, wParam, lParam);
 
     case TCM_ADJUSTRECT:
       return TAB_AdjustRect (hwnd, (BOOL)wParam, (LPRECT)lParam);

reactos/lib/comctl32
toolbar.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- toolbar.c	8 May 2004 11:41:04 -0000	1.14
+++ toolbar.c	16 Jun 2004 06:46:13 -0000	1.15
@@ -52,8 +52,6 @@
  *   - Notifications:
  *     - NM_CHAR
  *     - NM_KEYDOWN
- *     - NM_RDBLCLICK
- *     - TBN_DRAGOUT
  *     - TBN_GETOBJECT
  *     - TBN_RESTORE
  *     - TBN_SAVE
@@ -100,9 +98,10 @@
     INT idCommand;
     BYTE  fsState;
     BYTE  fsStyle;
+    BYTE  bHot;
+    BYTE  bDropDownPressed;
     DWORD dwData;
     INT iString;
-    BOOL bHot;
     INT nRow;
     RECT rect;
     INT cx; /* manually set size */
@@ -163,12 +162,12 @@
     HWND     hwndToolTip;     /* handle to tool tip control */
     HWND     hwndNotify;      /* handle to the window that gets notifications */
     HWND     hwndSelf;        /* my own handle */
-    BOOL     bTransparent;    /* background transparency flag */
     BOOL     bBtnTranspnt;    /* button transparency flag */
     BOOL     bAutoSize;       /* auto size deadlock indicator */
     BOOL     bAnchor;         /* anchor highlight enabled */
     BOOL     bNtfUnicode;     /* TRUE if NOTIFYs use {W} */
     BOOL     bDoRedraw;       /* Redraw status */
+    BOOL     bDragOutSent;    /* has TBN_DRAGOUT notification been sent for this drag? */
     DWORD      dwStyle;         /* regular toolbar style */
     DWORD      dwExStyle;       /* extended toolbar style */
     DWORD      dwDTFlags;       /* DrawText flags */
@@ -788,14 +787,16 @@
 }
 
 static void
-TOOLBAR_DrawSepDDArrow(const TOOLBAR_INFO *infoPtr, BOOL flat, const NMTBCUSTOMDRAW *tbcd, RECT *rcArrow)
+TOOLBAR_DrawSepDDArrow(const TOOLBAR_INFO *infoPtr, const NMTBCUSTOMDRAW *tbcd, RECT *rcArrow, BOOL bDropDownPressed)
 {
     HDC hdc = tbcd->nmcd.hdc;
     int offset = 0;
+    BOOL pressed = bDropDownPressed ||
+        (tbcd->nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED));
 
-    if (flat)
+    if (infoPtr->dwStyle & TBSTYLE_FLAT)
     {
-        if ((tbcd->nmcd.uItemState & CDIS_SELECTED) || (tbcd->nmcd.uItemState & CDIS_CHECKED))
+        if (pressed)
             DrawEdge (hdc, rcArrow, BDR_SUNKENOUTER, BF_RECT);
         else if ( (tbcd->nmcd.uItemState & CDIS_HOT) &&
                  !(tbcd->nmcd.uItemState & CDIS_DISABLED) &&
@@ -804,14 +805,14 @@
     }
     else
     {
-        if ((tbcd->nmcd.uItemState & CDIS_SELECTED) || (tbcd->nmcd.uItemState & CDIS_CHECKED))
+        if (pressed)
             DrawEdge (hdc, rcArrow, EDGE_SUNKEN, BF_RECT | BF_MIDDLE);
         else
             DrawEdge (hdc, rcArrow, EDGE_RAISED,
               BF_SOFT | BF_RECT | BF_MIDDLE);
     }
 
-    if (tbcd->nmcd.uItemState & (CDIS_SELECTED | CDIS_CHECKED))
+    if (pressed)
         offset = (infoPtr->dwItemCDFlag & TBCDRF_NOOFFSET) ? 0 : 1;
 
     if (tbcd->nmcd.uItemState & (CDIS_DISABLED | CDIS_INDETERMINATE))
@@ -997,7 +998,7 @@
     TOOLBAR_DrawFrame(infoPtr, dwStyle & TBSTYLE_FLAT, &tbcd);
 
     if (drawSepDropDownArrow)
-        TOOLBAR_DrawSepDDArrow(infoPtr, dwStyle & TBSTYLE_FLAT, &tbcd, &rcArrow);
+        TOOLBAR_DrawSepDDArrow(infoPtr, &tbcd, &rcArrow, btnPtr->bDropDownPressed);
 
     if (!(infoPtr->dwExStyle & TBSTYLE_EX_MIXEDBUTTONS) || (btnPtr->fsStyle & BTNS_SHOWTEXT))
         TOOLBAR_DrawString (infoPtr, &rcText, lpText, &tbcd);
@@ -3296,9 +3297,7 @@
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
     INT nIndex;
     LPWSTR lpText;
-
-    if (lParam == 0)
-	return -1;
+    LRESULT ret = 0;
 
     nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
     if (nIndex == -1)
@@ -3306,9 +3305,15 @@
 
     lpText = TOOLBAR_GetText(infoPtr,&infoPtr->buttons[nIndex]);
 
-    strcpyW ((LPWSTR)lParam, lpText);
+    if (lpText)
+    {
+        ret = strlenW (lpText);
 
-    return strlenW (lpText);
+        if (lParam)
+            strcpyW ((LPWSTR)lParam, lpText);
+    }
+
+    return ret;
 }
 
 
@@ -5106,10 +5111,10 @@
     infoPtr->nOldHit = -1;
     infoPtr->nHotItem = -1;
     infoPtr->hwndNotify = ((LPCREATESTRUCTW)lParam)->hwndParent;
-    infoPtr->bTransparent = (dwStyle & TBSTYLE_TRANSPARENT);
     infoPtr->bBtnTranspnt = (dwStyle & (TBSTYLE_FLAT | TBSTYLE_LIST));
-    infoPtr->dwDTFlags = (dwStyle & TBSTYLE_LIST) ? DT_LEFT | DT_VCENTER | DT_SINGLELINE : DT_CENTER;
+    infoPtr->dwDTFlags = (dwStyle & TBSTYLE_LIST) ? DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS: DT_CENTER | DT_END_ELLIPSIS;
     infoPtr->bAnchor = FALSE; /* no anchor highlighting */
+    infoPtr->bDragOutSent = FALSE;
     infoPtr->iVersion = 0;
     infoPtr->hwndSelf = hwnd;
     infoPtr->bDoRedraw = TRUE;
@@ -5232,7 +5237,7 @@
     /* If the toolbar is "transparent" then pass the WM_ERASEBKGND up
      * to my parent for processing.
      */
-    if (infoPtr->bTransparent) {
+    if (infoPtr->dwStyle & TBSTYLE_TRANSPARENT) {
 	POINT pt, ptorig;
 	HDC hdc = (HDC)wParam;
 	HWND parent;
@@ -5352,7 +5357,10 @@
 	    LRESULT res;
 
 	    /* draw in pressed state */
-	    btnPtr->fsState |= TBSTATE_PRESSED;
+	    if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN)
+	        btnPtr->fsState |= TBSTATE_PRESSED;
+	    else
+	        btnPtr->bDropDownPressed = TRUE;
 	    RedrawWindow(hwnd,&btnPtr->rect,0,
 			RDW_ERASE|RDW_INVALIDATE|RDW_UPDATENOW);
 
@@ -5370,7 +5378,10 @@
                 MSG msg;
 
                 /* redraw button in unpressed state */
-       	        btnPtr->fsState &= ~TBSTATE_PRESSED;
+	        if (btnPtr->fsStyle & BTNS_WHOLEDROPDOWN)
+       	            btnPtr->fsState &= ~TBSTATE_PRESSED;
+       	        else
+       	            btnPtr->bDropDownPressed = FALSE;
        	        InvalidateRect(hwnd, &btnPtr->rect, TRUE);
 
                 /* find and set hot item
@@ -5380,9 +5391,10 @@
                 nHit = TOOLBAR_InternalHitTest(hwnd, &pt);
                 TOOLBAR_SetHotItemEx(infoPtr, nHit, HICF_MOUSE | HICF_LMOUSE);
                 
-                /* remove any left mouse button down messages so that we can
-                 * get a toggle effect on the button */
-                while (PeekMessageW(&msg, hwnd, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE))
+                /* remove any left mouse button down or double-click messages
+                 * so that we can get a toggle effect on the button */
+                while (PeekMessageW(&msg, hwnd, WM_LBUTTONDOWN, WM_LBUTTONDOWN, PM_REMOVE) ||
+                       PeekMessageW(&msg, hwnd, WM_LBUTTONDBLCLK, WM_LBUTTONDBLCLK, PM_REMOVE))
                     ;
 
 		return 0;
@@ -5391,6 +5403,7 @@
        	}
 	infoPtr->bCaptured = TRUE;
 	infoPtr->nButtonDown = nHit;
+	infoPtr->bDragOutSent = FALSE;
 
 	btnPtr->fsState |= TBSTATE_PRESSED;
 
@@ -5565,7 +5578,7 @@
 	      MAKEWPARAM(infoPtr->buttons[nHit].idCommand, 0), (LPARAM)hwnd);
 
 	    /* !!! Undocumented - toolbar at 4.71 level and above sends
-	    * either NMRCLICK or NM_CLICK with the NMMOUSE structure.
+	    * either NM_RCLICK or NM_CLICK with the NMMOUSE structure.
 	    * Only NM_RCLICK is documented.
 	    */
 	    nmmouse.dwItemSpec = btnPtr->idCommand;
@@ -5586,7 +5599,7 @@
 
     pt.x = LOWORD(lParam);
     pt.y = HIWORD(lParam);
-    
+
     nmmouse.dwHitInfo = TOOLBAR_InternalHitTest(hwnd, &pt);
 
     if (nmmouse.dwHitInfo < 0) {
@@ -5605,6 +5618,34 @@
 }
 
 static LRESULT
+TOOLBAR_RButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam)
+{
+    TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
+
+    NMMOUSE nmmouse;
+    POINT pt;
+
+    pt.x = LOWORD(lParam);
+    pt.y = HIWORD(lParam);
+
+    nmmouse.dwHitInfo = TOOLBAR_InternalHitTest(hwnd, &pt);
+
+    if (nmmouse.dwHitInfo < 0)
+	nmmouse.dwItemSpec = -1;
+    else {
+	nmmouse.dwItemSpec = infoPtr->buttons[nmmouse.dwHitInfo].idCommand;
+	nmmouse.dwItemData = infoPtr->buttons[nmmouse.dwHitInfo].dwData;
+    }
+
+    ClientToScreen(hwnd, &pt); 
+    memcpy(&nmmouse.pt, &pt, sizeof(POINT));
+
+    TOOLBAR_SendNotify((LPNMHDR)&nmmouse, infoPtr, NM_RDBLCLK);
+
+    return 0;
+}
+
+static LRESULT
 TOOLBAR_CaptureChanged(HWND hwnd)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
@@ -5629,20 +5670,24 @@
 TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
-    TBUTTON_INFO *hotBtnPtr, *btnPtr;
-    RECT rc1;
+    TBUTTON_INFO *hotBtnPtr;
 
-    TOOLBAR_SetHotItemEx(infoPtr, -1, HICF_MOUSE);
+    hotBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
+
+    /* don't remove hot effects when in drop-down */
+    if (infoPtr->nOldHit < 0 || !hotBtnPtr->bDropDownPressed)
+        TOOLBAR_SetHotItemEx(infoPtr, -1, HICF_MOUSE);
 
     if (infoPtr->nOldHit < 0)
       return TRUE;
 
-    hotBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
-
     /* If the last button we were over is depressed then make it not */
     /* depressed and redraw it */
     if(infoPtr->nOldHit == infoPtr->nButtonDown)
     {
+      TBUTTON_INFO *btnPtr;
+      RECT rc1;
+
       btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
 
       btnPtr->fsState &= ~TBSTATE_PRESSED;
@@ -5652,6 +5697,15 @@
       InvalidateRect (hwnd, &rc1, TRUE);
     }
 
+    if (infoPtr->bCaptured && !infoPtr->bDragOutSent)
+    {
+        NMTOOLBARW nmt;
+        ZeroMemory(&nmt, sizeof(nmt));
+        nmt.iItem = infoPtr->buttons[infoPtr->nButtonDown].idCommand;
+        TOOLBAR_SendNotify(&nmt.hdr, infoPtr, TBN_DRAGOUT);
+        infoPtr->bDragOutSent = TRUE;
+    }
+
     infoPtr->nOldHit = -1; /* reset the old hit index as we've left the toolbar */
 
     return TRUE;
@@ -5699,6 +5753,15 @@
     {
         if (infoPtr->bCaptured)
         {
+            if (!infoPtr->bDragOutSent)
+            {
+                NMTOOLBARW nmt;
+                ZeroMemory(&nmt, sizeof(nmt));
+                nmt.iItem = infoPtr->buttons[infoPtr->nButtonDown].idCommand;
+                TOOLBAR_SendNotify(&nmt.hdr, infoPtr, TBN_DRAGOUT);
+                infoPtr->bDragOutSent = TRUE;
+            }
+
             btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
             if (infoPtr->nOldHit == infoPtr->nButtonDown) {
                 btnPtr->fsState &= ~TBSTATE_PRESSED;
@@ -6251,12 +6314,11 @@
 
     if (nType == GWL_STYLE) {
 	if (lpStyle->styleNew & TBSTYLE_LIST) {
-	    infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE;
+	    infoPtr->dwDTFlags = DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS;
 	}
 	else {
-	    infoPtr->dwDTFlags = DT_CENTER;
+	    infoPtr->dwDTFlags = DT_CENTER | DT_END_ELLIPSIS;
 	}
-	infoPtr->bTransparent = (lpStyle->styleNew & TBSTYLE_TRANSPARENT);
 	infoPtr->bBtnTranspnt = (lpStyle->styleNew &
 				 (TBSTYLE_FLAT | TBSTYLE_LIST));
 	TOOLBAR_CheckStyle (hwnd, lpStyle->styleNew);
@@ -6619,6 +6681,9 @@
 	case WM_RBUTTONUP:
 	    return TOOLBAR_RButtonUp (hwnd, wParam, lParam);
 
+	case WM_RBUTTONDBLCLK:
+	    return TOOLBAR_RButtonDblClk (hwnd, wParam, lParam);
+
 	case WM_MOUSEMOVE:
 	    return TOOLBAR_MouseMove (hwnd, wParam, lParam);
 

reactos/lib/comctl32
winehq2ros.patch 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- winehq2ros.patch	8 May 2004 11:41:05 -0000	1.7
+++ winehq2ros.patch	16 Jun 2004 06:46:13 -0000	1.8
@@ -1,10 +1,10 @@
 Index: comctl32.spec
 ===================================================================
 RCS file: /home/wine/wine/dlls/comctl32/comctl32.spec,v
-retrieving revision 1.43
-diff -u -r1.43 comctl32.spec
---- comctl32.spec	20 Feb 2004 05:16:37 -0000	1.43
-+++ comctl32.spec	8 May 2004 11:49:39 -0000
+retrieving revision 1.44
+diff -u -r1.44 comctl32.spec
+--- comctl32.spec	17 May 2004 20:51:27 -0000	1.44
++++ comctl32.spec	16 Jun 2004 06:51:02 -0000
 @@ -106,13 +106,13 @@
  412 stdcall RemoveWindowSubclass(long ptr long)
  413 stdcall DefSubclassProc(long long long long)
@@ -26,84 +26,13 @@
  
  # Functions imported by name
  
-Index: commctrl.c
-===================================================================
-RCS file: /home/wine/wine/dlls/comctl32/commctrl.c,v
-retrieving revision 1.76
-diff -u -r1.76 commctrl.c
---- commctrl.c	11 Mar 2004 22:38:22 -0000	1.76
-+++ commctrl.c	8 May 2004 11:49:41 -0000
-@@ -114,7 +114,6 @@
- extern void UPDOWN_Register(void);
- extern void UPDOWN_Unregister(void);
- 
--static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
- 
- LPSTR    COMCTL32_aSubclass = NULL;
- HMODULE COMCTL32_hModule = 0;
-@@ -1109,10 +1108,10 @@
-       /* set window procedure to our own and save the current one */
-       if (IsWindowUnicode (hWnd))
-          stack->origproc = (WNDPROC)SetWindowLongW (hWnd, GWL_WNDPROC,
--                                                   (LONG)SubclassWndProc);
-+                                                   (LONG)DefSubclassProc);
-       else
-          stack->origproc = (WNDPROC)SetWindowLongA (hWnd, GWL_WNDPROC,
--                                                   (LONG)SubclassWndProc);
-+                                                   (LONG)DefSubclassProc);
-    } else {
-       WNDPROC current;
-       if (IsWindowUnicode (hWnd))
-@@ -1120,7 +1119,7 @@
-       else
-          current = (WNDPROC)GetWindowLongA (hWnd, GWL_WNDPROC);
- 
--      if (current != SubclassWndProc) {
-+      if (current != DefSubclassProc) {
-          ERR ("Application has subclassed with our procedure, then manually, then with us again.  The current implementation can't handle this.\n");
-          return FALSE;
-       }
-@@ -1260,33 +1259,6 @@
-       }
- 
-    return FALSE;
--}
--
--
--/***********************************************************************
-- * SubclassWndProc (internal)
-- *
-- * Window procedure for all subclassed windows. 
-- * Saves the current subclassing stack position to support nested messages
-- */
--
--static LRESULT WINAPI SubclassWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
--{
--   LPSUBCLASS_INFO stack;
--   int stackpos;
--   LRESULT ret;
--
--   /* retrieve our little stack from the Properties */
--   stack = (LPSUBCLASS_INFO)GetPropA (hWnd, COMCTL32_aSubclass);
--   if (!stack) {
--      ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
--      return 0;
--   }
--   stackpos = stack->stackpos;
--   stack->stackpos = stack->stacknum;
--   ret = DefSubclassProc(hWnd,uMsg,wParam,lParam);
--   stack->stackpos = stackpos;
--   return ret;
- }
- 
- 
 Index: imagelist.c
 ===================================================================
 RCS file: /home/wine/wine/dlls/comctl32/imagelist.c,v
 retrieving revision 1.85
 diff -u -r1.85 imagelist.c
 --- imagelist.c	27 Feb 2004 04:40:08 -0000	1.85
-+++ imagelist.c	8 May 2004 11:49:43 -0000
++++ imagelist.c	16 Jun 2004 06:51:02 -0000
 @@ -1146,11 +1146,13 @@
      	PatBlt(hBlendMaskDC, 0, 0, cx, cy, PATCOPY);
      	SelectObject(hBlendMaskDC, hOldBrush);
@@ -121,10 +50,10 @@
 Index: listview.c
 ===================================================================
 RCS file: /home/wine/wine/dlls/comctl32/listview.c,v
-retrieving revision 1.387
-diff -u -r1.387 listview.c
---- listview.c	21 Apr 2004 22:25:04 -0000	1.387
-+++ listview.c	8 May 2004 11:49:47 -0000
+retrieving revision 1.389
+diff -u -r1.389 listview.c
+--- listview.c	4 Jun 2004 17:58:29 -0000	1.389
++++ listview.c	16 Jun 2004 06:51:06 -0000
 @@ -147,6 +147,7 @@
  #include <assert.h>
  #include <ctype.h>
@@ -136,10 +65,10 @@
 Index: string.c
 ===================================================================
 RCS file: /home/wine/wine/dlls/comctl32/string.c,v
-retrieving revision 1.3
-diff -u -r1.3 string.c
---- string.c	20 Feb 2004 19:58:39 -0000	1.3
-+++ string.c	8 May 2004 11:49:52 -0000
+retrieving revision 1.4
+diff -u -r1.4 string.c
+--- string.c	17 May 2004 20:51:27 -0000	1.4
++++ string.c	16 Jun 2004 06:51:06 -0000
 @@ -254,7 +254,7 @@
  {
    TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
CVSspam 0.2.8