Sync to Wine-20050830:
Vitaliy Margolen <wine-patch(a)kievinfo.com>
- Fix handling of minimum tab width.
Add more tests to test it.
Filip Navara <xnavara(a)volny.cz>
- Use ReleaseDC instead of DeleteDC on DC handle.
Phil Krylov <phil(a)newstar.rinet.ru>
- Improved header control performance by maintaining an internal order
array.
- Draw header control items only within the header client area.
Felix Nawothnig <felix.nawothnig(a)t-online.de>
- Fix DPA_Search for sorted arrays.
Michael Kaufmann <hallo(a)michael-kaufmann.ch>
- Handle WM_GETFONT and WM_SETFONT.
- Redraw immediately upon PBM_SETPOS, PBM_DELTAPOS, PBM_STEPIT.
- New tests.
Thomas Weidenmueller <wine-patches(a)reactsoft.com>
- It should be allowed to pass NULL handles in the phpage array of the
PROPSHEETHEADER structure to PropertySheet(), just ignore them.
Aric Stewart <aric(a)codeweavers.com>
- Fix for dreamweaver site definition dialog. Need to initialize the
rect for a tab control to an empty rect if it is not visible.
Alexandre Julliard <julliard(a)winehq.org>
- Don't prefix the functions DllCanUnloadNow, DllGetClassObject and
Dll(Un)RegisterServer with the dll name so that the compiler can check
the prototypes.
- Fixed regression in DPA_Search.
Yuri Kozlov <kozlov.y(a)gmail.com>
- Set default size for toolbar bitmap if not specified.
Mike McCormack <mike(a)codeweavers.com>
- Fix gcc 4.0 warnings.
Vitaly Lipatov <lav(a)etersoft.ru>
- Use STATEIMAGEINDEX / INDEXTOSTATEIMAGEMASK instead of bit
operations.
Steven Edwards <steven_ed4153(a)yahoo.com>
- Correct RegCreateKeyEx[A/W] prototype to match the PSDK.
Frank Richter <frank.richter(a)gmail.com>
- Only draw a themed border when edit control has WS_EX_CLIENTEDGE
style.
- Merge subclass stubs and subclass proc. Having the stub set the window
proc to the subclass proc was not a good idea since that breaks
subclasses of themed standard controls (e.g. what Delphi does a lot).
- Determining the superclass for a window subclassed for theming doesn't
work - e.g. Delphi buttons have the classname "TButton" for which no
superclass will be found. Instead, use initial subclass window procs
that have the subclass hardcoded and store it for the "real" subclass
window proc.
- Add theming for toolbar control.
- Improved trackbar theming.
- Add initial theming support for trackbars.
- Add theming for treeview control.
- Add theming support for dialogs (to support tab page background).
- Add theming for listbox (and combo listbox) controls.
- Add theming for combo boxes.
- Subclass edit control to draw themed border.
- Added some generic code to allow subclassing (for the purpose of
theming) of standard controls.
- Fix warnings in 64bit.
- Add hottracking support for the header control.
- Since OpenThemeData() should return 0 in case theming is disabled
globally or for the application we don't need to check that when
calling OpenThemeData().
- Remove unneeded theming check.
- Add theming for the monthcal control.
- Instead of adding the border via WM_NCPAINT and WM_NCCALCSIZE, do what
native does: just clear WS_EX_STATICEDGE when themed and reduce the
area the actual bar is painted in to the progress bar theme part
content rect.
- Add theming for the progress control.
- Split up the drawing code into a set of smaller functions and also
moved some common computations into helper functions. All that to
facilitate the implementation of the forthcoming theming support.
- Add theming for the rebar control.
- Add theming for status bar control.
- Fix text color for "button" style tabs when theming is enabled.
- Add theming support for the tab control.
- Forward WM_DESTROY to superclass in edit & listbox theming.
- Add WM_CTLCOLORSTATIC handler to dialog theming subclass so static
text can appear transparent (for e.g. tab pages which commonly have a
"fancy" background).
Modified: trunk/reactos/lib/comctl32/animate.c
Modified: trunk/reactos/lib/comctl32/comboex.c
Modified: trunk/reactos/lib/comctl32/comctl32.h
Modified: trunk/reactos/lib/comctl32/comctl32.spec
Modified: trunk/reactos/lib/comctl32/comctl32.xml
Modified: trunk/reactos/lib/comctl32/comctl32undoc.c
Modified: trunk/reactos/lib/comctl32/commctrl.c
Modified: trunk/reactos/lib/comctl32/datetime.c
Modified: trunk/reactos/lib/comctl32/dpa.c
Modified: trunk/reactos/lib/comctl32/header.c
Modified: trunk/reactos/lib/comctl32/imagelist.c
Modified: trunk/reactos/lib/comctl32/ipaddress.c
Modified: trunk/reactos/lib/comctl32/listview.c
Modified: trunk/reactos/lib/comctl32/monthcal.c
Modified: trunk/reactos/lib/comctl32/progress.c
Modified: trunk/reactos/lib/comctl32/propsheet.c
Modified: trunk/reactos/lib/comctl32/rebar.c
Modified: trunk/reactos/lib/comctl32/status.c
Modified: trunk/reactos/lib/comctl32/tab.c
Added: trunk/reactos/lib/comctl32/theme_combo.c
Added: trunk/reactos/lib/comctl32/theme_dialog.c
Added: trunk/reactos/lib/comctl32/theme_edit.c
Added: trunk/reactos/lib/comctl32/theme_listbox.c
Added: trunk/reactos/lib/comctl32/theming.c
Modified: trunk/reactos/lib/comctl32/toolbar.c
Modified: trunk/reactos/lib/comctl32/tooltips.c
Modified: trunk/reactos/lib/comctl32/trackbar.c
Modified: trunk/reactos/lib/comctl32/treeview.c
Modified: trunk/reactos/w32api/include/winuser.h
_____
Modified: trunk/reactos/lib/comctl32/animate.c
--- trunk/reactos/lib/comctl32/animate.c 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/animate.c 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -53,7 +53,7 @@
HMODULE hModule;
HIC (WINAPI *fnICOpen)(DWORD, DWORD, UINT);
LRESULT (WINAPI *fnICClose)(HIC);
- LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD, DWORD);
+ LRESULT (WINAPI *fnICSendMessage)(HIC, UINT, DWORD_PTR,
DWORD_PTR);
DWORD (WINAPIV
*fnICDecompress)(HIC,DWORD,LPBITMAPINFOHEADER,LPVOID,LPBITMAPINFOHEADER,
LPVOID);
} fnIC;
@@ -139,7 +139,8 @@
{
infoPtr->hMMio = mmioOpenW(lpName, 0, MMIO_ALLOCBUF | MMIO_READ |
MMIO_DENYWRITE);
- return (BOOL)infoPtr->hMMio;
+ if(!infoPtr->hMMio) return FALSE;
+ return TRUE;
}
@@ -655,14 +656,14 @@
}
outSize = fnIC.fnICSendMessage(infoPtr->hic,
ICM_DECOMPRESS_GET_FORMAT,
- (DWORD)infoPtr->inbih, 0L);
+ (DWORD_PTR)infoPtr->inbih, 0L);
infoPtr->outbih = Alloc(outSize);
if (!infoPtr->outbih)
return FALSE;
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
- (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) !=
outSize)
+ (DWORD_PTR)infoPtr->inbih,
(DWORD_PTR)infoPtr->outbih) != outSize)
{
WARN("Can't get output BIH\n");
return FALSE;
@@ -673,7 +674,7 @@
return FALSE;
if (fnIC.fnICSendMessage(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
- (DWORD)infoPtr->inbih, (DWORD)infoPtr->outbih) !=
ICERR_OK) {
+ (DWORD_PTR)infoPtr->inbih,
(DWORD_PTR)infoPtr->outbih) != ICERR_OK) {
WARN("Can't begin decompression\n");
return FALSE;
}
@@ -696,10 +697,10 @@
if (!hInstance)
hInstance = (HINSTANCE)GetWindowLongPtrW(infoPtr->hwndSelf,
GWLP_HINSTANCE);
- if (HIWORD(lpszName))
- {
- TRACE("(\"%s\");\n", debugstr_w(lpszName));
+ TRACE("(%s)\n", debugstr_w(lpszName));
+ if (HIWORD(lpszName))
+ {
if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName))
{
TRACE("No AVI resource found!\n");
@@ -712,9 +713,7 @@
}
else
{
- TRACE("(%u);\n", (WORD)(DWORD)lpszName);
-
- if (!ANIMATE_LoadResW(infoPtr, hInstance,
MAKEINTRESOURCEW((INT)lpszName)))
+ if (!ANIMATE_LoadResW(infoPtr, hInstance, lpszName))
{
WARN("No AVI resource found!\n");
return FALSE;
_____
Modified: trunk/reactos/lib/comctl32/comboex.c
--- trunk/reactos/lib/comctl32/comboex.c 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/comboex.c 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -839,10 +839,10 @@
}
-static DWORD COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT index)
+static DWORD_PTR COMBOEX_GetItemData (COMBOEX_INFO *infoPtr, INT index)
{
CBE_ITEMDATA *item1, *item2;
- DWORD ret = 0;
+ DWORD_PTR ret = 0;
item1 = get_item_data(infoPtr, index);
if ((item1 != NULL) && ((LRESULT)item1 != CB_ERR)) {
@@ -854,7 +854,7 @@
if (item1->mask & CBEIF_LPARAM) ret = item1->lParam;
TRACE("returning 0x%08lx\n", ret);
} else {
- ret = (DWORD)item1;
+ ret = (DWORD_PTR)item1;
TRACE("non-valid result from combo, returning 0x%08lx\n", ret);
}
return ret;
@@ -878,7 +878,7 @@
}
-static DWORD COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT index,
DWORD data)
+static DWORD_PTR COMBOEX_SetItemData (COMBOEX_INFO *infoPtr, INT index,
DWORD_PTR data)
{
CBE_ITEMDATA *item1, *item2;
@@ -894,8 +894,8 @@
TRACE("setting lparam to 0x%08lx\n", data);
return 0;
}
- TRACE("non-valid result from combo 0x%08lx\n", (DWORD)item1);
- return (LRESULT)item1;
+ TRACE("non-valid result from combo %p\n", item1);
+ return (DWORD_PTR)item1;
}
@@ -1136,10 +1136,10 @@
n = SendMessageW (infoPtr->hwndCombo, CB_GETCOUNT, 0, 0);
for (cursel = 0; cursel < n; cursel++){
item = get_item_data(infoPtr, cursel);
- if ((INT)item == CB_ERR) break;
+ if ((INT_PTR)item == CB_ERR) break;
if (!cmptext(COMBOEX_GetText(infoPtr, item), wintext))
break;
}
- if ((cursel == n) || ((INT)item == CB_ERR)) {
+ if ((cursel == n) || ((INT_PTR)item == CB_ERR)) {
TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel);
if (infoPtr->hwndEdit)
@@ -1149,7 +1149,7 @@
}
else {
item = get_item_data(infoPtr, cursel);
- if ((INT)item == CB_ERR) {
+ if ((INT_PTR)item == CB_ERR) {
TRACE("failed to find match??? item=%p cursel=%d\n",
item, cursel);
if (infoPtr->hwndEdit)
@@ -2223,7 +2223,7 @@
return COMBOEX_SetCursel (infoPtr, (INT)wParam);
case CB_SETITEMDATA:
- return COMBOEX_SetItemData (infoPtr, (INT)wParam,
(DWORD)lParam);
+ return COMBOEX_SetItemData (infoPtr, (INT)wParam,
(DWORD_PTR)lParam);
case CB_SETITEMHEIGHT:
return COMBOEX_SetItemHeight (infoPtr, (INT)wParam,
(UINT)lParam);
_____
Modified: trunk/reactos/lib/comctl32/comctl32.h
--- trunk/reactos/lib/comctl32/comctl32.h 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/comctl32.h 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -249,4 +249,8 @@
to->wMilliseconds = from->wMilliseconds;
}
+extern void THEMING_Initialize(void);
+extern LRESULT THEMING_CallOriginalClass(HWND, UINT, WPARAM, LPARAM);
+extern void THEMING_SetSubclassData(HWND, ULONG_PTR);
+
#endif /* __WINE_COMCTL32_H */
_____
Modified: trunk/reactos/lib/comctl32/comctl32.spec
--- trunk/reactos/lib/comctl32/comctl32.spec 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/comctl32.spec 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -1,188 +1,188 @@
-# Functions exported by the Win95 comctl32.dll
-# (these need to have these exact ordinals, because some win95 dlls
-# import comctl32.dll by ordinal)
-# This list was created from a comctl32.dll v5.81 (IE5.01).
-
- 2 stdcall MenuHelp(long long long long long long ptr)
- 3 stdcall ShowHideMenuCtl(long long ptr)
- 4 stdcall GetEffectiveClientRect(long long long)
- 5 stdcall DrawStatusTextA(long ptr str long)
- 6 stdcall CreateStatusWindowA(long str long long)
- 7 stdcall CreateToolbar(long long long long long long ptr long)
- 8 stdcall CreateMappedBitmap(long long long ptr long)
- 9 stdcall -noname DPA_LoadStream(ptr ptr ptr long)
- 10 stdcall -noname DPA_SaveStream(ptr ptr ptr long)
- 11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
-#12 stub Cctl1632_ThunkData32
- 13 stdcall MakeDragList(long)
- 14 stdcall LBItemFromPt(long long long long)
- 15 stdcall DrawInsert(long long long)
- 16 stdcall CreateUpDownControl(long long long long long long long long
long long long long)
- 17 stdcall InitCommonControls()
- 71 stdcall -noname Alloc(long)
- 72 stdcall -noname ReAlloc(ptr long)
- 73 stdcall -noname Free(ptr)
- 74 stdcall -noname GetSize(ptr)
-151 stdcall -noname CreateMRUListA(ptr)
-152 stdcall -noname FreeMRUList(long)
-153 stdcall -noname AddMRUStringA(long str)
-154 stdcall -noname EnumMRUListA(long long ptr long)
-155 stdcall -noname FindMRUStringA(long str ptr)
-156 stdcall -noname DelMRUString(long long)
-157 stdcall -noname CreateMRUListLazyA(ptr long long long)
-163 stub -noname CreatePage
-164 stub -noname CreateProxyPage
-167 stdcall -noname AddMRUData(long ptr long)
-169 stdcall -noname FindMRUData(long ptr long ptr)
-233 stdcall -noname Str_GetPtrA(str str long)
-234 stdcall -noname Str_SetPtrA(str str)
-235 stdcall -noname Str_GetPtrW(wstr wstr long)
-236 stdcall -noname Str_SetPtrW(wstr wstr)
-320 stdcall -noname DSA_Create(long long)
-321 stdcall -noname DSA_Destroy(ptr)
-322 stdcall -noname DSA_GetItem(ptr long long)
-323 stdcall -noname DSA_GetItemPtr(ptr long)
-324 stdcall -noname DSA_InsertItem(ptr long long)
-325 stdcall -noname DSA_SetItem (ptr long long)
-326 stdcall -noname DSA_DeleteItem(ptr long)
-327 stdcall -noname DSA_DeleteAllItems(ptr)
-328 stdcall -noname DPA_Create(long)
-329 stdcall -noname DPA_Destroy(ptr)
-330 stdcall -noname DPA_Grow(ptr long)
-331 stdcall -noname DPA_Clone(ptr ptr)
-332 stdcall -noname DPA_GetPtr(ptr long)
-333 stdcall -noname DPA_GetPtrIndex(ptr ptr)
-334 stdcall -noname DPA_InsertPtr(ptr long ptr)
-335 stdcall -noname DPA_SetPtr(ptr long ptr)
-336 stdcall -noname DPA_DeletePtr(ptr long)
-337 stdcall -noname DPA_DeleteAllPtrs(ptr)
-338 stdcall -noname DPA_Sort(ptr ptr long)
-339 stdcall -noname DPA_Search(ptr ptr long ptr long long)
-340 stdcall -noname DPA_CreateEx(long long)
-341 stdcall -noname SendNotify(long long long ptr)
-342 stdcall -noname SendNotifyEx(long long long ptr long)
-350 stdcall -noname StrChrA(str str)
-351 stdcall -noname StrRChrA(str str long)
-352 stdcall -noname StrCmpNA(str str long)
-353 stdcall -noname StrCmpNIA(str str long)
-354 stdcall -noname StrStrA(str str)
-355 stdcall -noname StrStrIA(str str)
-356 stdcall -noname StrCSpnA(str str)
-357 stdcall -noname StrToIntA(str)
-358 stdcall -noname StrChrW(wstr long)
-359 stdcall -noname StrRChrW(wstr wstr long)
-360 stdcall -noname StrCmpNW(wstr wstr long)
-361 stdcall -noname StrCmpNIW(wstr wstr long)
-362 stdcall -noname StrStrW(wstr wstr)
-363 stdcall -noname StrStrIW(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)
-368 stdcall -noname StrRChrIA(str str long)
-369 stdcall -noname StrRChrIW(wstr wstr long)
-372 stdcall -noname StrRStrIA(str str str)
-373 stdcall -noname StrRStrIW(wstr wstr wstr)
-374 stdcall -noname StrCSpnIA(str str)
-375 stdcall -noname StrCSpnIW(wstr wstr)
-376 stdcall -noname IntlStrEqWorkerA(long str str long)
-377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long)
-382 stdcall -noname SmoothScrollWindow(ptr)
-383 stub -noname DoReaderMode
-384 stdcall -noname SetPathWordBreakProc(ptr long)
-385 stdcall -noname DPA_EnumCallback(long long long)
-386 stdcall -noname DPA_DestroyCallback(ptr ptr long)
-387 stdcall -noname DSA_EnumCallback(ptr ptr long)
-388 stdcall -noname DSA_DestroyCallback(ptr ptr long)
-389 stub -noname SHGetProcessDword
-390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
-400 stdcall -noname CreateMRUListW(ptr)
-401 stdcall -noname AddMRUStringW(long wstr)
-402 stdcall -noname FindMRUStringW(long wstr ptr)
-403 stdcall -noname EnumMRUListW(long long ptr long)
-404 stdcall -noname CreateMRUListLazyW(ptr long long long)
-410 stdcall -noname SetWindowSubclass(long ptr long long)
-411 stdcall -noname GetWindowSubclass(long ptr long ptr)
-412 stdcall -noname RemoveWindowSubclass(long ptr long)
-413 stdcall -noname DefSubclassProc(long long long long)
-414 stdcall -noname MirrorIcon(ptr ptr)
-415 stdcall DrawTextWrap(long wstr long ptr long) user32.DrawTextW
-416 stdcall DrawTextExPrivWrap(long wstr long ptr long ptr)
user32.DrawTextExW
-417 stdcall ExtTextOutWrap(long long long long ptr wstr long ptr)
gdi32.ExtTextOutW
-418 stdcall GetCharWidthWrap(long long long long) gdi32.GetCharWidthW
-419 stdcall GetTextExtentPointWrap(long wstr long ptr)
gdi32.GetTextExtentPointW
-420 stdcall GetTextExtentPoint32Wrap(long wstr long ptr)
gdi32.GetTextExtentPoint32W
-421 stdcall TextOutWrap(long long long wstr long) gdi32.TextOutW
-
-# Functions imported by name
-
-@ stdcall CreatePropertySheetPage(ptr) CreatePropertySheetPageA
-@ stdcall CreatePropertySheetPageA(ptr)
-@ stdcall CreatePropertySheetPageW(ptr)
-@ stdcall CreateStatusWindow(long str long long) CreateStatusWindowA
-@ stdcall CreateStatusWindowW(long wstr long long)
-@ stdcall CreateToolbarEx(long long long long long long ptr long long
long long long long)
-@ stdcall DestroyPropertySheetPage(long)
-@ stdcall DllGetVersion(ptr) COMCTL32_DllGetVersion
-@ stdcall DllInstall(long ptr) COMCTL32_DllInstall
-@ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA
-@ stdcall DrawStatusTextW(long ptr wstr long)
-@ stdcall FlatSB_EnableScrollBar (long long long)
-@ stdcall FlatSB_GetScrollInfo (long long ptr)
-@ stdcall FlatSB_GetScrollPos (long long)
-@ stdcall FlatSB_GetScrollProp (long long ptr)
-@ stdcall FlatSB_GetScrollRange (long long ptr ptr)
-@ stdcall FlatSB_SetScrollInfo (long long ptr long)
-@ stdcall FlatSB_SetScrollPos (long long long long)
-@ stdcall FlatSB_SetScrollProp (long long long long)
-@ stdcall FlatSB_SetScrollRange (long long long long long)
-@ stdcall FlatSB_ShowScrollBar (long long long)
-@ stdcall GetMUILanguage()
-@ stdcall ImageList_Add(ptr long long)
-@ stdcall ImageList_AddIcon(ptr long)
-@ stdcall ImageList_AddMasked(ptr long long)
-@ stdcall ImageList_BeginDrag(ptr long long long)
-@ stdcall ImageList_Copy(ptr long ptr long long)
-@ stdcall ImageList_Create(long long long long long)
-@ stdcall ImageList_Destroy(ptr)
-@ stdcall ImageList_DragEnter(long long long)
-@ stdcall ImageList_DragLeave(long)
-@ stdcall ImageList_DragMove(long long)
-@ stdcall ImageList_DragShowNolock(long)
-@ stdcall ImageList_Draw(ptr long long long long long)
-@ stdcall ImageList_DrawEx(ptr long long long long long long long long
long)
-@ stdcall ImageList_DrawIndirect(ptr)
-@ stdcall ImageList_Duplicate(ptr)
-@ stdcall ImageList_EndDrag()
-@ stdcall ImageList_GetBkColor(ptr)
-@ stdcall ImageList_GetDragImage(ptr ptr)
-@ stdcall ImageList_GetFlags(ptr)
-@ stdcall ImageList_GetIcon(ptr long long)
-@ stdcall ImageList_GetIconSize(ptr ptr ptr)
-@ stdcall ImageList_GetImageCount(ptr)
-@ stdcall ImageList_GetImageInfo(ptr long ptr)
-@ stdcall ImageList_GetImageRect(ptr long ptr)
-@ stdcall ImageList_LoadImage(long str long long long long long)
ImageList_LoadImageA
-@ stdcall ImageList_LoadImageA(long str long long long long long)
-@ stdcall ImageList_LoadImageW(long wstr long long long long long)
-@ stdcall ImageList_Merge(ptr long ptr long long long)
-@ stdcall ImageList_Read(ptr)
-@ stdcall ImageList_Remove(ptr long)
-@ stdcall ImageList_Replace(ptr long long long)
-@ stdcall ImageList_ReplaceIcon(ptr long long)
-@ stdcall ImageList_SetBkColor(ptr long)
-@ stdcall ImageList_SetDragCursorImage(ptr long long long)
-@ stdcall ImageList_SetFilter(ptr long long)
-@ stdcall ImageList_SetFlags(ptr long)
-@ stdcall ImageList_SetIconSize(ptr long long)
-@ stdcall ImageList_SetImageCount(ptr long)
-@ stdcall ImageList_SetOverlayImage(ptr long long)
-@ stdcall ImageList_Write(ptr ptr)
-@ stdcall InitCommonControlsEx(ptr)
-@ stdcall InitMUILanguage(long)
-@ stdcall InitializeFlatSB(long)
-@ stdcall PropertySheet(ptr) PropertySheetA
-@ stdcall PropertySheetA(ptr)
-@ stdcall PropertySheetW(ptr)
-@ stdcall UninitializeFlatSB(long)
-@ stdcall _TrackMouseEvent(ptr)
+# Functions exported by the Win95 comctl32.dll
+# (these need to have these exact ordinals, because some win95 dlls
+# import comctl32.dll by ordinal)
+# This list was created from a comctl32.dll v5.81 (IE5.01).
+
+ 2 stdcall MenuHelp(long long long long long long ptr)
+ 3 stdcall ShowHideMenuCtl(long long ptr)
+ 4 stdcall GetEffectiveClientRect(long long long)
+ 5 stdcall DrawStatusTextA(long ptr str long)
+ 6 stdcall CreateStatusWindowA(long str long long)
+ 7 stdcall CreateToolbar(long long long long long long ptr long)
+ 8 stdcall CreateMappedBitmap(long long long ptr long)
+ 9 stdcall -noname DPA_LoadStream(ptr ptr ptr long)
+ 10 stdcall -noname DPA_SaveStream(ptr ptr ptr long)
+ 11 stdcall -noname DPA_Merge(ptr ptr long ptr ptr long)
+#12 stub Cctl1632_ThunkData32
+ 13 stdcall MakeDragList(long)
+ 14 stdcall LBItemFromPt(long long long long)
+ 15 stdcall DrawInsert(long long long)
+ 16 stdcall CreateUpDownControl(long long long long long long long long
long long long long)
+ 17 stdcall InitCommonControls()
+ 71 stdcall -noname Alloc(long)
+ 72 stdcall -noname ReAlloc(ptr long)
+ 73 stdcall -noname Free(ptr)
+ 74 stdcall -noname GetSize(ptr)
+151 stdcall -noname CreateMRUListA(ptr)
+152 stdcall -noname FreeMRUList(long)
+153 stdcall -noname AddMRUStringA(long str)
+154 stdcall -noname EnumMRUListA(long long ptr long)
+155 stdcall -noname FindMRUStringA(long str ptr)
+156 stdcall -noname DelMRUString(long long)
+157 stdcall -noname CreateMRUListLazyA(ptr long long long)
+163 stub -noname CreatePage
+164 stub -noname CreateProxyPage
+167 stdcall -noname AddMRUData(long ptr long)
+169 stdcall -noname FindMRUData(long ptr long ptr)
+233 stdcall -noname Str_GetPtrA(str str long)
+234 stdcall -noname Str_SetPtrA(str str)
+235 stdcall -noname Str_GetPtrW(wstr wstr long)
+236 stdcall -noname Str_SetPtrW(wstr wstr)
+320 stdcall -noname DSA_Create(long long)
+321 stdcall -noname DSA_Destroy(ptr)
+322 stdcall -noname DSA_GetItem(ptr long long)
+323 stdcall -noname DSA_GetItemPtr(ptr long)
+324 stdcall -noname DSA_InsertItem(ptr long long)
+325 stdcall -noname DSA_SetItem (ptr long long)
+326 stdcall -noname DSA_DeleteItem(ptr long)
+327 stdcall -noname DSA_DeleteAllItems(ptr)
+328 stdcall -noname DPA_Create(long)
+329 stdcall -noname DPA_Destroy(ptr)
+330 stdcall -noname DPA_Grow(ptr long)
+331 stdcall -noname DPA_Clone(ptr ptr)
+332 stdcall -noname DPA_GetPtr(ptr long)
+333 stdcall -noname DPA_GetPtrIndex(ptr ptr)
+334 stdcall -noname DPA_InsertPtr(ptr long ptr)
+335 stdcall -noname DPA_SetPtr(ptr long ptr)
+336 stdcall -noname DPA_DeletePtr(ptr long)
+337 stdcall -noname DPA_DeleteAllPtrs(ptr)
+338 stdcall -noname DPA_Sort(ptr ptr long)
+339 stdcall -noname DPA_Search(ptr ptr long ptr long long)
+340 stdcall -noname DPA_CreateEx(long long)
+341 stdcall -noname SendNotify(long long long ptr)
+342 stdcall -noname SendNotifyEx(long long long ptr long)
+350 stdcall -noname StrChrA(str str)
+351 stdcall -noname StrRChrA(str str long)
+352 stdcall -noname StrCmpNA(str str long)
+353 stdcall -noname StrCmpNIA(str str long)
+354 stdcall -noname StrStrA(str str)
+355 stdcall -noname StrStrIA(str str)
+356 stdcall -noname StrCSpnA(str str)
+357 stdcall -noname StrToIntA(str)
+358 stdcall -noname StrChrW(wstr long)
+359 stdcall -noname StrRChrW(wstr wstr long)
+360 stdcall -noname StrCmpNW(wstr wstr long)
+361 stdcall -noname StrCmpNIW(wstr wstr long)
+362 stdcall -noname StrStrW(wstr wstr)
+363 stdcall -noname StrStrIW(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)
+368 stdcall -noname StrRChrIA(str str long)
+369 stdcall -noname StrRChrIW(wstr wstr long)
+372 stdcall -noname StrRStrIA(str str str)
+373 stdcall -noname StrRStrIW(wstr wstr wstr)
+374 stdcall -noname StrCSpnIA(str str)
+375 stdcall -noname StrCSpnIW(wstr wstr)
+376 stdcall -noname IntlStrEqWorkerA(long str str long)
+377 stdcall -noname IntlStrEqWorkerW(long wstr wstr long)
+382 stdcall -noname SmoothScrollWindow(ptr)
+383 stub -noname DoReaderMode
+384 stdcall -noname SetPathWordBreakProc(ptr long)
+385 stdcall -noname DPA_EnumCallback(long long long)
+386 stdcall -noname DPA_DestroyCallback(ptr ptr long)
+387 stdcall -noname DSA_EnumCallback(ptr ptr long)
+388 stdcall -noname DSA_DestroyCallback(ptr ptr long)
+389 stub -noname SHGetProcessDword
+390 stdcall -noname ImageList_SetColorTable(ptr long long ptr)
+400 stdcall -noname CreateMRUListW(ptr)
+401 stdcall -noname AddMRUStringW(long wstr)
+402 stdcall -noname FindMRUStringW(long wstr ptr)
+403 stdcall -noname EnumMRUListW(long long ptr long)
+404 stdcall -noname CreateMRUListLazyW(ptr long long long)
+410 stdcall -noname SetWindowSubclass(long ptr long long)
+411 stdcall -noname GetWindowSubclass(long ptr long ptr)
+412 stdcall -noname RemoveWindowSubclass(long ptr long)
+413 stdcall -noname DefSubclassProc(long long long long)
+414 stdcall -noname MirrorIcon(ptr ptr)
+415 stdcall DrawTextWrap(long wstr long ptr long) user32.DrawTextW
+416 stdcall DrawTextExPrivWrap(long wstr long ptr long ptr)
user32.DrawTextExW
+417 stdcall ExtTextOutWrap(long long long long ptr wstr long ptr)
gdi32.ExtTextOutW
+418 stdcall GetCharWidthWrap(long long long long) gdi32.GetCharWidthW
+419 stdcall GetTextExtentPointWrap(long wstr long ptr)
gdi32.GetTextExtentPointW
+420 stdcall GetTextExtentPoint32Wrap(long wstr long ptr)
gdi32.GetTextExtentPoint32W
+421 stdcall TextOutWrap(long long long wstr long) gdi32.TextOutW
+
+# Functions imported by name
+
+@ stdcall CreatePropertySheetPage(ptr) CreatePropertySheetPageA
+@ stdcall CreatePropertySheetPageA(ptr)
+@ stdcall CreatePropertySheetPageW(ptr)
+@ stdcall CreateStatusWindow(long str long long) CreateStatusWindowA
+@ stdcall CreateStatusWindowW(long wstr long long)
+@ stdcall CreateToolbarEx(long long long long long long ptr long long
long long long long)
+@ stdcall DestroyPropertySheetPage(long)
+@ stdcall -private DllGetVersion(ptr)
+@ stdcall -private DllInstall(long wstr)
+@ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA
+@ stdcall DrawStatusTextW(long ptr wstr long)
+@ stdcall FlatSB_EnableScrollBar (long long long)
+@ stdcall FlatSB_GetScrollInfo (long long ptr)
+@ stdcall FlatSB_GetScrollPos (long long)
+@ stdcall FlatSB_GetScrollProp (long long ptr)
+@ stdcall FlatSB_GetScrollRange (long long ptr ptr)
+@ stdcall FlatSB_SetScrollInfo (long long ptr long)
+@ stdcall FlatSB_SetScrollPos (long long long long)
+@ stdcall FlatSB_SetScrollProp (long long long long)
+@ stdcall FlatSB_SetScrollRange (long long long long long)
+@ stdcall FlatSB_ShowScrollBar (long long long)
+@ stdcall GetMUILanguage()
+@ stdcall ImageList_Add(ptr long long)
+@ stdcall ImageList_AddIcon(ptr long)
+@ stdcall ImageList_AddMasked(ptr long long)
+@ stdcall ImageList_BeginDrag(ptr long long long)
+@ stdcall ImageList_Copy(ptr long ptr long long)
+@ stdcall ImageList_Create(long long long long long)
+@ stdcall ImageList_Destroy(ptr)
+@ stdcall ImageList_DragEnter(long long long)
+@ stdcall ImageList_DragLeave(long)
+@ stdcall ImageList_DragMove(long long)
+@ stdcall ImageList_DragShowNolock(long)
+@ stdcall ImageList_Draw(ptr long long long long long)
+@ stdcall ImageList_DrawEx(ptr long long long long long long long long
long)
+@ stdcall ImageList_DrawIndirect(ptr)
+@ stdcall ImageList_Duplicate(ptr)
+@ stdcall ImageList_EndDrag()
+@ stdcall ImageList_GetBkColor(ptr)
+@ stdcall ImageList_GetDragImage(ptr ptr)
+@ stdcall ImageList_GetFlags(ptr)
+@ stdcall ImageList_GetIcon(ptr long long)
+@ stdcall ImageList_GetIconSize(ptr ptr ptr)
+@ stdcall ImageList_GetImageCount(ptr)
+@ stdcall ImageList_GetImageInfo(ptr long ptr)
+@ stdcall ImageList_GetImageRect(ptr long ptr)
+@ stdcall ImageList_LoadImage(long str long long long long long)
ImageList_LoadImageA
+@ stdcall ImageList_LoadImageA(long str long long long long long)
+@ stdcall ImageList_LoadImageW(long wstr long long long long long)
+@ stdcall ImageList_Merge(ptr long ptr long long long)
+@ stdcall ImageList_Read(ptr)
+@ stdcall ImageList_Remove(ptr long)
+@ stdcall ImageList_Replace(ptr long long long)
+@ stdcall ImageList_ReplaceIcon(ptr long long)
+@ stdcall ImageList_SetBkColor(ptr long)
+@ stdcall ImageList_SetDragCursorImage(ptr long long long)
+@ stdcall ImageList_SetFilter(ptr long long)
+@ stdcall ImageList_SetFlags(ptr long)
+@ stdcall ImageList_SetIconSize(ptr long long)
+@ stdcall ImageList_SetImageCount(ptr long)
+@ stdcall ImageList_SetOverlayImage(ptr long long)
+@ stdcall ImageList_Write(ptr ptr)
+@ stdcall InitCommonControlsEx(ptr)
+@ stdcall InitMUILanguage(long)
+@ stdcall InitializeFlatSB(long)
+@ stdcall PropertySheet(ptr) PropertySheetA
+@ stdcall PropertySheetA(ptr)
+@ stdcall PropertySheetW(ptr)
+@ stdcall UninitializeFlatSB(long)
+@ stdcall _TrackMouseEvent(ptr)
Property changes on: trunk/reactos/lib/comctl32/comctl32.spec
___________________________________________________________________
Name: svn:eol-style
+ native
_____
Modified: trunk/reactos/lib/comctl32/comctl32.xml
--- trunk/reactos/lib/comctl32/comctl32.xml 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/comctl32.xml 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -40,6 +40,11 @@
<file>status.c</file>
<file>syslink.c</file>
<file>tab.c</file>
+ <file>theme_combo.c</file>
+ <file>theme_dialog.c</file>
+ <file>theme_edit.c</file>
+ <file>theme_listbox.c</file>
+ <file>theming.c</file>
<file>toolbar.c</file>
<file>tooltips.c</file>
<file>trackbar.c</file>
_____
Modified: trunk/reactos/lib/comctl32/comctl32undoc.c
--- trunk/reactos/lib/comctl32/comctl32undoc.c 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/comctl32undoc.c 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -274,7 +274,6 @@
HKEY newkey;
WCHAR realname[2];
LPWINEMRUITEM witem;
- static const WCHAR emptyW[] = {'\0'};
/* or should we do the following instead of RegOpenKeyEx:
*/
@@ -287,7 +286,7 @@
err);
if ((err = RegCreateKeyExW( mp->extview.hKey,
mp->extview.lpszSubKey,
0,
- (LPWSTR)emptyW,
+ NULL,
REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WRITE,
0,
@@ -653,7 +652,6 @@
WCHAR realname[2];
LPWINEMRUITEM witem;
DWORD type;
- static const WCHAR emptyW[] = {'\0'};
/* get space to save indices that will turn into names
* but in order of most to least recently used
@@ -668,16 +666,16 @@
/* open the sub key */
if ((err = RegCreateKeyExW( mp->extview.hKey,
mp->extview.lpszSubKey,
0,
- (LPWSTR)emptyW,
+ NULL,
REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WRITE,
0,
&newkey,
&dwdisp))) {
/* error - what to do ??? */
- ERR("(%lu %lu %lx %lx \"%s\" %p): Could not open key,
error=%d\n",
+ ERR("(%lu %lu %lx %p %s %p): Could not open key, error=%d\n",
mp->extview.cbSize, mp->extview.nMaxItems,
mp->extview.dwFlags,
- (DWORD)mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
+ mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, err);
return 0;
}
@@ -718,9 +716,9 @@
else
mp->cursize = 0;
- TRACE("(%lu %lu %lx %lx \"%s\" %p): Current Size = %ld\n",
+ TRACE("(%lu %lu %lx %p %s %p): Current Size = %ld\n",
mp->extview.cbSize, mp->extview.nMaxItems,
mp->extview.dwFlags,
- (DWORD)mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
+ mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, mp->cursize);
return (HANDLE)mp;
}
_____
Modified: trunk/reactos/lib/comctl32/commctrl.c
--- trunk/reactos/lib/comctl32/commctrl.c 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/commctrl.c 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -119,7 +119,7 @@
COMCTL32_hModule = (HMODULE)hinstDLL;
/* add global subclassing atom (used by 'tooltip' and
'updown') */
- COMCTL32_wSubclass = (LPWSTR)(DWORD)GlobalAddAtomW
(strCC32SubclassInfo);
+ COMCTL32_wSubclass = (LPWSTR)(DWORD_PTR)GlobalAddAtomW
(strCC32SubclassInfo);
TRACE("Subclassing atom added: %p\n", COMCTL32_wSubclass);
/* create local pattern brush */
@@ -144,6 +144,9 @@
TRACKBAR_Register ();
TREEVIEW_Register ();
UPDOWN_Register ();
+
+ /* subclass user32 controls */
+ THEMING_Initialize ();
break;
case DLL_PROCESS_DETACH:
@@ -305,7 +308,7 @@
*/
BOOL WINAPI
-ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
+ShowHideMenuCtl (HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
{
LPINT lpMenuId;
@@ -322,9 +325,9 @@
while (*lpMenuId != uFlags)
lpMenuId += 2;
- if (GetMenuState ((HMENU)lpInfo[1], uFlags, MF_BYCOMMAND) &
MFS_CHECKED) {
+ if (GetMenuState ((HMENU)(DWORD_PTR)lpInfo[1], uFlags,
MF_BYCOMMAND) & MFS_CHECKED) {
/* uncheck menu item */
- CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND |
MF_UNCHECKED);
+ CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId,
MF_BYCOMMAND | MF_UNCHECKED);
/* hide control */
lpMenuId++;
@@ -333,7 +336,7 @@
}
else {
/* check menu item */
- CheckMenuItem ((HMENU)lpInfo[0], *lpMenuId, MF_BYCOMMAND |
MF_CHECKED);
+ CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId,
MF_BYCOMMAND | MF_CHECKED);
/* show control */
lpMenuId++;
@@ -373,8 +376,8 @@
INT *lpRun;
HWND hwndCtrl;
- TRACE("(0x%08lx 0x%08lx 0x%08lx)\n",
- (DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
+ TRACE("(%p %p %p)\n",
+ hwnd, lpRect, lpInfo);
GetClientRect (hwnd, lpRect);
lpRun = lpInfo;
@@ -503,7 +506,7 @@
return CreateWindowA(STATUSCLASSNAMEA, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- parent, (HMENU)wid, 0, 0);
+ parent, (HMENU)(DWORD_PTR)wid, 0, 0);
}
@@ -529,7 +532,7 @@
return CreateWindowW(STATUSCLASSNAMEW, text, style,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
- parent, (HMENU)wid, 0, 0);
+ parent, (HMENU)(DWORD_PTR)wid, 0, 0);
}
@@ -564,7 +567,7 @@
{
HWND hUD =
CreateWindowW (UPDOWN_CLASSW, 0, style, x, y, cx, cy,
- parent, (HMENU)id, inst, 0);
+ parent, (HMENU)(DWORD_PTR)id, inst, 0);
if (hUD) {
SendMessageW (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
SendMessageW (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
@@ -725,7 +728,7 @@
hwndTB =
CreateWindowExW(0, TOOLBARCLASSNAMEW, NULL, style|WS_CHILD,
0,0,100,30,
- hwnd, (HMENU)wID, COMCTL32_hModule, NULL);
+ hwnd, (HMENU)(DWORD_PTR)wID, COMCTL32_hModule,
NULL);
if(hwndTB) {
TBADDBITMAP tbab;
@@ -784,7 +787,7 @@
*/
HBITMAP WINAPI
-CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags,
+CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
LPCOLORMAP lpColorMap, INT iNumMaps)
{
HGLOBAL hglb;
@@ -931,8 +934,7 @@
* Returns version of a comctl32.dll from IE4.01 SP1.
*/
-HRESULT WINAPI
-COMCTL32_DllGetVersion (DLLVERSIONINFO *pdvi)
+HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
{
if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
WARN("wrong DLLVERSIONINFO size from app\n");
@@ -960,7 +962,7 @@
* Success: S_OK
* Failure: A HRESULT error
*/
-HRESULT WINAPI COMCTL32_DllInstall(BOOL bInstall, LPCWSTR cmdline)
+HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
debugstr_w(cmdline));
_____
Modified: trunk/reactos/lib/comctl32/datetime.c
--- trunk/reactos/lib/comctl32/datetime.c 2005-09-05 20:12:18 UTC
(rev 17663)
+++ trunk/reactos/lib/comctl32/datetime.c 2005-09-05 20:25:16 UTC
(rev 17664)
@@ -1164,6 +1164,15 @@
static LRESULT
+DATETIME_SetFont (DATETIME_INFO *infoPtr, HFONT font, BOOL repaint)
+{
+ infoPtr->hFont = font;
+ if (repaint) InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+ return 0;
+}
+
+
+static LRESULT
DATETIME_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
{
static const WCHAR SysMonthCal32W[] = { 'S', 'y', 's',
'M', 'o',
'n', 't', 'h', 'C', 'a', 'l', '3',
'2', 0 };
@@ -1314,6 +1323,12 @@
case WM_STYLECHANGED:
return DATETIME_StyleChanged(infoPtr, wParam,
(LPSTYLESTRUCT)lParam);
+ case WM_SETFONT:
+ return DATETIME_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
+
+ case WM_GETFONT:
+ return (LRESULT) infoPtr->hFont;
+
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
ERR("unknown msg %04x wp=%08x lp=%08lx\n",
_____
Modified: trunk/reactos/lib/comctl32/dpa.c
--- trunk/reactos/lib/comctl32/dpa.c 2005-09-05 20:12:18 UTC (rev
17663)
+++ trunk/reactos/lib/comctl32/dpa.c 2005-09-05 20:25:16 UTC (rev
17664)
@@ -787,11 +787,6 @@
* RETURNS
* Success: index of the pointer in the array.
* Failure: -1
- *
- * NOTES
- * Binary search taken from R.Sedgewick "Algorithms in C"!
- * Function is NOT tested!
- * If something goes wrong, blame HIM not ME! (Eric Kohl)
*/
INT WINAPI DPA_Search (const HDPA hdpa, LPVOID pFind, INT nStart,
PFNDPACOMPARE pfnCompare, LPARAM lParam, UINT
uOptions)
@@ -807,47 +802,34 @@
INT l, r, x, n;
LPVOID *lpPtr;
- TRACE("binary search\n");
-
l = (nStart == -1) ? 0 : nStart;
r = hdpa->nItemCount - 1;
lpPtr = hdpa->ptrs;
while (r >= l) {
x = (l + r) / 2;
n = (pfnCompare)(pFind, lpPtr[x], lParam);
- if (n < 0)
+ if (n == 0)
+ return x;
+ else if (n < 0)
r = x - 1;
- else
+ else /* (n > 0) */
l = x + 1;
- if (n == 0) {
- TRACE("-- ret=%d\n", n);
- return n;
- }
}
-
- if (uOptions & (DPAS_INSERTBEFORE | DPAS_INSERTAFTER)) {
- TRACE("-- ret=%d\n", l);
- return l;
- }
+ if (uOptions & (DPAS_INSERTBEFORE|DPAS_INSERTAFTER)) return l;
}
else {
/* array is not sorted --> use linear search */
LPVOID *lpPtr;
INT nIndex;
- TRACE("linear search\n");
-
nIndex = (nStart == -1)? 0 : nStart;
lpPtr = hdpa->ptrs;
for (; nIndex < hdpa->nItemCount; nIndex++) {
- if ((pfnCompare)(pFind, lpPtr[nIndex], lParam) == 0) {
- TRACE("-- ret=%d\n", nIndex);
+ if ((pfnCompare)(pFind, lpPtr[nIndex], lParam) == 0)
return nIndex;
- }
}
}
- TRACE("-- not found: ret=-1\n");
return -1;
}
_____
Modified: trunk/reactos/lib/comctl32/header.c
--- trunk/reactos/lib/comctl32/header.c 2005-09-05 20:12:18 UTC (rev
17663)
+++ trunk/reactos/lib/comctl32/header.c 2005-09-05 20:25:16 UTC (rev
17664)
@@ -87,6 +87,7 @@
HIMAGELIST himl; /* handle to an image list (may be 0) */
HEADER_ITEM *items; /* pointer to array of
HEADER_ITEM's */
+ INT *order; /* array of item IDs indexed by order
*/
BOOL bRectsValid; /* validity flag for bounding rectangles
*/
} HEADER_INFO;
@@ -113,14 +114,10 @@
{
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
INT iorder = (INT)wParam;
- UINT i;
- if ((iorder <0) || iorder >infoPtr->uNumItem)
+ if ((iorder <0) || iorder >= infoPtr->uNumItem)
return iorder;
- for (i=0; i<infoPtr->uNumItem; i++)
- if (HEADER_IndexToOrder(hwnd,i) == iorder)
- return i;
- return iorder;
+ return infoPtr->order[iorder];
}
static void
@@ -385,7 +382,7 @@
}
x = rect.left;
- for (i = 0; i < infoPtr->uNumItem; i++) {
+ for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
x = HEADER_DrawItem (hwnd, hdc, HEADER_OrderToIndex(hwnd,i),
infoPtr->iHotItem == i);
}
@@ -416,7 +413,7 @@
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject
(SYSTEM_FONT);
hOldFont = SelectObject (hdc, hFont);
- HEADER_DrawItem (hwnd, hdc, iItem, FALSE);
+ HEADER_DrawItem (hwnd, hdc, iItem, infoPtr->iHotItem == iItem);
SelectObject (hdc, hOldFont);
}
@@ -647,16 +644,19 @@
if (infoPtr->items[0].pszText)
Free (infoPtr->items[0].pszText);
Free (infoPtr->items);
+ Free(infoPtr->order);
infoPtr->items = 0;
+ infoPtr->order = 0;
infoPtr->uNumItem = 0;
}
else {
HEADER_ITEM *oldItems = infoPtr->items;
- HEADER_ITEM *pItem;
INT i;
INT iOrder;
TRACE("Complex delete! [iItem=%d]\n", iItem);
+ for (i = 0; i < infoPtr->uNumItem; i++)
+ TRACE("%d: order=%d, iOrder=%d, ->iOrder=%d\n", i,
infoPtr->order[i], infoPtr->items[i].iOrder,
infoPtr->items[infoPtr->order[i]].iOrder);
if (infoPtr->items[iItem].pszText)
Free (infoPtr->items[iItem].pszText);
iOrder = infoPtr->items[iItem].iOrder;
@@ -676,11 +676,21 @@
}
/* Correct the orders */
- for (i=infoPtr->uNumItem, pItem = infoPtr->items; i; i--,
pItem++)
+ if (iOrder < infoPtr->uNumItem)
{
- if (pItem->iOrder > iOrder)
- pItem->iOrder--;
+ memmove(&infoPtr->order[iOrder], &infoPtr->order[iOrder +
1],
+ (infoPtr->uNumItem - iOrder) * sizeof(INT));
+ for (i = 0; i < infoPtr->uNumItem; i++)
+ {
+ if (infoPtr->order[i] > iItem)
+ infoPtr->order[i]--;
+ if (i >= iOrder)
+ infoPtr->items[infoPtr->order[i]].iOrder =
infoPtr->order[i];
+ }
}
+
+ for (i = 0; i < infoPtr->uNumItem; i++)
+ TRACE("%d: order=%d, iOrder=%d, ->iOrder=%d\n", i,
infoPtr->order[i], infoPtr->items[i].iOrder,
infoPtr->items[infoPtr->order[i]].iOrder);
Free (oldItems);
}
@@ -850,14 +860,13 @@
static LRESULT
HEADER_GetOrderArray(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- int i;
LPINT order = (LPINT) lParam;
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
if ((unsigned int)wParam <infoPtr->uNumItem)
return FALSE;
- for (i=0; i<(int)wParam; i++)
- *order++=HEADER_OrderToIndex(hwnd,i);
+
+ memcpy(order, infoPtr->order, infoPtr->uNumItem * sizeof(INT));
return TRUE;
}
@@ -871,6 +880,7 @@
if ((unsigned int)wParam <infoPtr->uNumItem)
return FALSE;
+ memcpy(infoPtr->order, order, infoPtr->uNumItem * sizeof(INT));
for (i=0; i<(int)wParam; i++)
{
lpItem = &infoPtr->items[*order++];
@@ -923,10 +933,12 @@
if (infoPtr->uNumItem == 0) {
infoPtr->items = Alloc (sizeof (HEADER_ITEM));
+ infoPtr->order = Alloc(sizeof(INT));
infoPtr->uNumItem++;
}
else {
HEADER_ITEM *oldItems = infoPtr->items;
+ INT *oldOrder = infoPtr->order;
infoPtr->uNumItem++;
infoPtr->items = Alloc (sizeof (HEADER_ITEM) *
infoPtr->uNumItem);
@@ -949,13 +961,21 @@
}
}
+ infoPtr->order = Alloc(sizeof(INT) * infoPtr->uNumItem);
+ memcpy(infoPtr->order, oldOrder, iOrder * sizeof(INT));
+ infoPtr->order[iOrder] = nItem;
+ memcpy(&infoPtr->order[iOrder + 1], &oldOrder[iOrder],
+ (infoPtr->uNumItem - iOrder - 1) * sizeof(INT));
+
Free (oldItems);
+ Free(oldOrder);
[truncated at 1000 lines; 3635 more skipped]