Wine-0_9_1 vendor drop Modified: vendor/wine/dlls/comctl32/current/animate.c Modified: vendor/wine/dlls/comctl32/current/comboex.c Modified: vendor/wine/dlls/comctl32/current/datetime.c Modified: vendor/wine/dlls/comctl32/current/header.c Modified: vendor/wine/dlls/comctl32/current/hotkey.c Modified: vendor/wine/dlls/comctl32/current/imagelist.c Modified: vendor/wine/dlls/comctl32/current/listview.c Modified: vendor/wine/dlls/comctl32/current/monthcal.c Modified: vendor/wine/dlls/comctl32/current/pager.c Modified: vendor/wine/dlls/comctl32/current/progress.c Modified: vendor/wine/dlls/comctl32/current/propsheet.c Modified: vendor/wine/dlls/comctl32/current/rebar.c Modified: vendor/wine/dlls/comctl32/current/status.c Modified: vendor/wine/dlls/comctl32/current/string.c Modified: vendor/wine/dlls/comctl32/current/syslink.c Modified: vendor/wine/dlls/comctl32/current/tab.c Modified: vendor/wine/dlls/comctl32/current/toolbar.c Modified: vendor/wine/dlls/comctl32/current/tooltips.c Modified: vendor/wine/dlls/comctl32/current/trackbar.c Modified: vendor/wine/dlls/comctl32/current/treeview.c Modified: vendor/wine/dlls/comctl32/current/updown.c Modified: vendor/wine/dlls/commdlg/current/Makefile.in Modified: vendor/wine/dlls/commdlg/current/cdlg.h Modified: vendor/wine/dlls/commdlg/current/cdlg32.c Modified: vendor/wine/dlls/commdlg/current/cdlg_Bg.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Cn.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Cs.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_De.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_En.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Es.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Fi.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Fr.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_It.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Nl.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_No.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Pl.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Pt.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Ru.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Si.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Sk.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Sv.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Th.rc Modified: vendor/wine/dlls/commdlg/current/cdlg_Uk.rc Modified: vendor/wine/dlls/commdlg/current/colordlg.c Modified: vendor/wine/dlls/commdlg/current/filedlg.c Modified: vendor/wine/dlls/commdlg/current/filetitle.c Modified: vendor/wine/dlls/commdlg/current/finddlg32.c Modified: vendor/wine/dlls/commdlg/current/fontdlg.c Modified: vendor/wine/dlls/commdlg/current/printdlg.c Modified: vendor/wine/dlls/dinput/current/device.c Modified: vendor/wine/dlls/dinput/current/joystick_linuxinput.c Modified: vendor/wine/dlls/dinput/current/mouse.c Modified: vendor/wine/dlls/dsound/current/dsound_main.c Modified: vendor/wine/dlls/dsound/current/dsound_private.h Modified: vendor/wine/dlls/dsound/current/duplex.c Modified: vendor/wine/dlls/dsound/current/mixer.c Modified: vendor/wine/dlls/mpr/current/mpr.rc Modified: vendor/wine/dlls/mpr/current/mpr_Cs.rc Added: vendor/wine/dlls/mpr/current/mpr_Ko.rc Modified: vendor/wine/dlls/msi/current/action.c Modified: vendor/wine/dlls/msi/current/action.h Modified: vendor/wine/dlls/msi/current/appsearch.c Modified: vendor/wine/dlls/msi/current/classes.c Modified: vendor/wine/dlls/msi/current/cond.y Modified: vendor/wine/dlls/msi/current/create.c Modified: vendor/wine/dlls/msi/current/custom.c Modified: vendor/wine/dlls/msi/current/database.c Modified: vendor/wine/dlls/msi/current/delete.c Modified: vendor/wine/dlls/msi/current/dialog.c Modified: vendor/wine/dlls/msi/current/distinct.c Modified: vendor/wine/dlls/msi/current/files.c Modified: vendor/wine/dlls/msi/current/format.c Modified: vendor/wine/dlls/msi/current/helpers.c Modified: vendor/wine/dlls/msi/current/insert.c Modified: vendor/wine/dlls/msi/current/install.c Modified: vendor/wine/dlls/msi/current/msi.c Modified: vendor/wine/dlls/msi/current/msi.rc Modified: vendor/wine/dlls/msi/current/msi.spec Added: vendor/wine/dlls/msi/current/msi_Ko.rc Modified: vendor/wine/dlls/msi/current/msipriv.h Modified: vendor/wine/dlls/msi/current/msiquery.c Modified: vendor/wine/dlls/msi/current/order.c Modified: vendor/wine/dlls/msi/current/package.c Modified: vendor/wine/dlls/msi/current/record.c Modified: vendor/wine/dlls/msi/current/registry.c Modified: vendor/wine/dlls/msi/current/select.c Modified: vendor/wine/dlls/msi/current/string.c Modified: vendor/wine/dlls/msi/current/suminfo.c Modified: vendor/wine/dlls/msi/current/table.c Modified: vendor/wine/dlls/msi/current/update.c Modified: vendor/wine/dlls/msi/current/where.c Modified: vendor/wine/dlls/ole32/current/antimoniker.c Modified: vendor/wine/dlls/ole32/current/bindctx.c Modified: vendor/wine/dlls/ole32/current/clipboard.c Modified: vendor/wine/dlls/ole32/current/compobj.c Modified: vendor/wine/dlls/ole32/current/compobj_private.h Modified: vendor/wine/dlls/ole32/current/defaulthandler.c Modified: vendor/wine/dlls/ole32/current/memlockbytes16.c Modified: vendor/wine/dlls/ole32/current/ole16.c Modified: vendor/wine/dlls/ole32/current/ole2.c [truncated at 100 lines; 77 more skipped] _____
Modified: vendor/wine/dlls/comctl32/current/animate.c --- vendor/wine/dlls/comctl32/current/animate.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/animate.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -899,6 +899,7 @@
case WM_TIMER: return ANIMATE_Timer(infoPtr);
+ case WM_PRINTCLIENT: case WM_PAINT: { /* the animation isn't playing, or has not decompressed _____
Modified: vendor/wine/dlls/comctl32/current/comboex.c --- vendor/wine/dlls/comctl32/current/comboex.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/comboex.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -1395,7 +1395,7 @@
if (!item) { item = get_item_data(infoPtr, dis->itemID); if (item == (CBE_ITEMDATA *)CB_ERR) { - ERR("invalid item for id %d \n", dis->itemID); + ERR("invalid item for id %d\n", dis->itemID); return 0; } } _____
Modified: vendor/wine/dlls/comctl32/current/datetime.c --- vendor/wine/dlls/comctl32/current/datetime.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/datetime.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -1284,6 +1284,7 @@
case WM_GETDLGCODE: return DLGC_WANTARROWS | DLGC_WANTCHARS;
+ case WM_PRINTCLIENT: case WM_PAINT: return DATETIME_Paint (infoPtr, (HDC)wParam);
_____
Modified: vendor/wine/dlls/comctl32/current/header.c --- vendor/wine/dlls/comctl32/current/header.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/header.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -598,10 +598,99 @@
nmitem.iImage = infoPtr->items[iItem].iImage;
return (BOOL)SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, - (WPARAM)nmhdr.hdr.idFrom, (LPARAM)&nmhdr); + (WPARAM)nmhdr.hdr.idFrom, (LPARAM)&nmhdr); }
+/** + * Send Disp Info notification. + * depends on NMHDDISPINFOW having same structure as NMHDDISPINFOA + * (so we handle the two cases only doing a specific cast for pszText). + * + * @param hwnd : hwnd header container handler + * @param mask : notification mask (usually HDI_TEXT or HDI_IMAGE) + * @param pDispInfo : NMHDDISPINFO structure (can be unicode or ansi) + * @param isW : TRUE if dispinfo is Unicode + */ +static BOOL +HEADER_SendHeaderDispInfoNotify(HWND hwnd, INT iItem, INT mask, LPHDITEMW phdi, HEADER_ITEM* lpItem, BOOL isW) +{ + HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); + BOOL ret; + BOOL convertToAnsi = FALSE; + BOOL convertToUnicode = FALSE; + BOOL isUnicodeNotify = FALSE; + NMHDDISPINFOW dispInfo;
+ if (mask & HDI_TEXT) + { + convertToAnsi = (isW && infoPtr->nNotifyFormat == NFR_ANSI); + convertToUnicode = (!isW && infoPtr->nNotifyFormat == NFR_UNICODE); + } + isUnicodeNotify = (isW && !convertToAnsi); + + memset(&dispInfo, 0, sizeof(NMHDDISPINFOW)); + dispInfo.hdr.hwndFrom = hwnd; + dispInfo.hdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID); + if (isUnicodeNotify || convertToUnicode) + { + dispInfo.hdr.code = HDN_GETDISPINFOW; + } + else + { + dispInfo.hdr.code = HDN_GETDISPINFOA; + } + dispInfo.iItem = iItem; + dispInfo.mask = mask; + /* + dispInfo.pszText = Alloc(sizeof(WCHAR) * 260); + dispInfo.cchTextMax = 260; + */ + ret = (BOOL) SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, + (WPARAM) dispInfo.hdr.idFrom, + (LPARAM) &dispInfo); + + TRACE("SendMessage returns(mask:0x%x,str:%s,lParam:%p)\n", + dispInfo.mask, + (isUnicodeNotify ? debugstr_w(dispInfo.pszText) : (LPSTR) dispInfo.pszText), + (void*) dispInfo.lParam); + + if (dispInfo.mask & HDI_DI_SETITEM) + { + if (dispInfo.mask & HDI_IMAGE) + { + lpItem->iImage = dispInfo.iImage; + } + if (dispInfo.mask & HDI_TEXT) + { + if (isUnicodeNotify || convertToUnicode) + Str_SetPtrW(&lpItem->pszText, (LPCWSTR)dispInfo.pszText); + else /*if (convertToAnsi || !isW)*/ + Str_SetPtrAtoW(&lpItem->pszText, (LPCSTR)dispInfo.pszText); + } + + FIXME("NMHDDISPINFO returns with flags HDI_DI_SETITEM\n"); + } + + if (NULL != phdi) + { + if ((phdi->mask & mask) & HDI_IMAGE) + { + phdi->iImage = dispInfo.iImage; + } + if ((phdi->mask & mask) & HDI_TEXT) + { + if (isUnicodeNotify) + Str_GetPtrW ((LPCWSTR)dispInfo.pszText, phdi->pszText, phdi->cchTextMax); + else if (convertToUnicode) + Str_GetPtrWtoA ((LPCWSTR)dispInfo.pszText, (LPSTR)phdi->pszText, phdi->cchTextMax); + else /*if (!isW) */ + Str_GetPtrA ((LPCSTR)dispInfo.pszText, (LPSTR)phdi->pszText, phdi->cchTextMax); + } + } + return ret; +} + + static BOOL HEADER_SendClickNotify (HWND hwnd, UINT code, INT iItem) { @@ -712,11 +801,9 @@
static LRESULT -HEADER_GetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) +HEADER_GetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMA *phdi = (HDITEMA*)lParam; - INT nItem = (INT)wParam; HEADER_ITEM *lpItem;
if (!phdi) @@ -727,12 +814,10 @@ if (phdi->mask == 0) return TRUE;
- if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem)) { + if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem)) lpItem = NULL; - } - else { + else lpItem = &infoPtr->items[nItem]; - }
if (phdi->mask & HDI_BITMAP) phdi->hbm = (lpItem != NULL) ? lpItem->hbm : 0; @@ -746,86 +831,34 @@ if (phdi->mask & HDI_LPARAM) phdi->lParam = (lpItem != NULL) ? lpItem->lParam : 0;
- if (phdi->mask & HDI_TEXT) { - if (lpItem == NULL) { - *phdi->pszText = 0; - } - else if (lpItem->pszText != LPSTR_TEXTCALLBACKW) { - if (lpItem->pszText) - WideCharToMultiByte (CP_ACP, 0, lpItem->pszText, -1, - phdi->pszText, phdi->cchTextMax, NULL, NULL); - else - *phdi->pszText = 0; - } - else - phdi->pszText = LPSTR_TEXTCALLBACKA; + if (phdi->mask & HDI_IMAGE) + { + phdi->iImage = (lpItem != NULL) ? lpItem->iImage : 0; + if (lpItem->iImage == I_IMAGECALLBACK) + { + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_IMAGE, phdi, lpItem, bUnicode); + } }
- if (phdi->mask & HDI_IMAGE) - phdi->iImage = (lpItem != NULL) ? lpItem->iImage : 0; - if (phdi->mask & HDI_ORDER) phdi->iOrder = (lpItem != NULL) ? lpItem->iOrder : 0;
- return TRUE; -} - - -static LRESULT -HEADER_GetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMW *phdi = (HDITEMW*)lParam; - INT nItem = (INT)wParam; - HEADER_ITEM *lpItem; - - if (!phdi) - return FALSE; - - TRACE("[nItem=%d]\n", nItem); - - if (phdi->mask == 0) - return TRUE; - - if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem)) { - lpItem = NULL; + if (phdi->mask & HDI_TEXT) + { + if (lpItem == NULL) *phdi->pszText = 0; /* null pointer check */ + else if (lpItem->pszText == LPSTR_TEXTCALLBACKW) /* covers == TEXTCALLBACKA too */ + { + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_TEXT, phdi, lpItem, bUnicode); + } + else + { + if (bUnicode) + Str_GetPtrW (lpItem->pszText, phdi->pszText, phdi->cchTextMax); + else + Str_GetPtrWtoA (lpItem->pszText, (LPSTR)phdi->pszText, phdi->cchTextMax); + } } - else { - lpItem = &infoPtr->items[nItem]; - }
- if (phdi->mask & HDI_BITMAP) - phdi->hbm = (lpItem != NULL) ? lpItem->hbm : 0; - - if (phdi->mask & HDI_FORMAT) - phdi->fmt = (lpItem != NULL) ? lpItem->fmt : 0; - - if (phdi->mask & HDI_WIDTH) - phdi->cxy = (lpItem != NULL) ? lpItem->cxy : 0; - - if (phdi->mask & HDI_LPARAM) - phdi->lParam = (lpItem != NULL) ? lpItem->lParam : 0; - - if (phdi->mask & HDI_TEXT) { - if (lpItem == NULL) { - *phdi->pszText = 0; - } - else if (lpItem->pszText != LPSTR_TEXTCALLBACKW) { - if (lpItem->pszText) - lstrcpynW (phdi->pszText, lpItem->pszText, phdi->cchTextMax); - else - *phdi->pszText = 0; - } - else - phdi->pszText = LPSTR_TEXTCALLBACKW; - } - - if (phdi->mask & HDI_IMAGE) - phdi->iImage = (lpItem != NULL) ? lpItem->iImage : 0; - - if (phdi->mask & HDI_ORDER) - phdi->iOrder = (lpItem != NULL) ? lpItem->iOrder : 0; - return TRUE; }
@@ -914,13 +947,11 @@
static LRESULT -HEADER_InsertItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) +HEADER_InsertItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMA *phdi = (HDITEMA*)lParam; - INT nItem = (INT)wParam; HEADER_ITEM *lpItem; - INT len, iOrder; + INT iOrder; UINT i;
if ((phdi == NULL) || (nItem < 0)) @@ -988,150 +1019,49 @@ if (phdi->mask & HDI_WIDTH) lpItem->cxy = phdi->cxy;
- if (phdi->mask & HDI_TEXT) { - if (!phdi->pszText) /* null pointer check */ - phdi->pszText = ""; - if (phdi->pszText != LPSTR_TEXTCALLBACKA) { - len = MultiByteToWideChar(CP_ACP, 0, phdi->pszText, -1, NULL, 0); - lpItem->pszText = Alloc( len*sizeof(WCHAR) ); - MultiByteToWideChar(CP_ACP, 0, phdi->pszText, -1, lpItem->pszText, len); - } - else - lpItem->pszText = LPSTR_TEXTCALLBACKW; - } - if (phdi->mask & HDI_FORMAT) lpItem->fmt = phdi->fmt;
if (lpItem->fmt == 0) lpItem->fmt = HDF_LEFT;
- if (!(lpItem->fmt & HDF_STRING) && (phdi->mask & HDI_TEXT)) - { - lpItem->fmt |= HDF_STRING; - } if (phdi->mask & HDI_BITMAP) lpItem->hbm = phdi->hbm;
if (phdi->mask & HDI_LPARAM) lpItem->lParam = phdi->lParam;
- if (phdi->mask & HDI_IMAGE) - lpItem->iImage = phdi->iImage; - - lpItem->iOrder = iOrder; - - HEADER_SetItemBounds (hwnd); - - InvalidateRect(hwnd, NULL, FALSE); - - return nItem; -} - - -static LRESULT -HEADER_InsertItemW (HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMW *phdi = (HDITEMW*)lParam; - INT nItem = (INT)wParam; - HEADER_ITEM *lpItem; - INT len, iOrder; - UINT i; - - if ((phdi == NULL) || (nItem < 0)) - return -1; - - if (nItem > infoPtr->uNumItem) - nItem = infoPtr->uNumItem; - - iOrder = (phdi->mask & HDI_ORDER) ? phdi->iOrder : nItem; - - if (infoPtr->uNumItem == 0) { - infoPtr->items = Alloc (sizeof (HEADER_ITEM)); - infoPtr->order = Alloc(sizeof(INT)); - infoPtr->uNumItem++; + if (phdi->mask & HDI_IMAGE) + { + if (phdi->iImage != I_IMAGECALLBACK) + { + lpItem->iImage = phdi->iImage; + } + else + { + lpItem->iImage = phdi->iImage; + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_IMAGE, NULL, lpItem, bUnicode); + } } - else { - HEADER_ITEM *oldItems = infoPtr->items; - INT *oldOrder = infoPtr->order;
- infoPtr->uNumItem++; - infoPtr->items = Alloc (sizeof (HEADER_ITEM) * infoPtr->uNumItem); - if (nItem == 0) { - memcpy (&infoPtr->items[1], &oldItems[0], - (infoPtr->uNumItem-1) * sizeof(HEADER_ITEM)); + if (phdi->mask & HDI_TEXT) + { + if (!phdi->pszText) phdi->pszText = '\0'; /* null pointer check */ + if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ + { + if (bUnicode) + Str_SetPtrW(&lpItem->pszText, phdi->pszText); + else + Str_SetPtrAtoW(&lpItem->pszText, (LPSTR)phdi->pszText); } - else + else { - /* pre insert copy */ - if (nItem > 0) { - memcpy (&infoPtr->items[0], &oldItems[0], - nItem * sizeof(HEADER_ITEM)); - } - - /* post insert copy */ - if (nItem < infoPtr->uNumItem - 1) { - memcpy (&infoPtr->items[nItem+1], &oldItems[nItem], - (infoPtr->uNumItem - nItem - 1) * sizeof(HEADER_ITEM)); - } + lpItem->pszText = phdi->pszText; + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_TEXT, NULL, lpItem, bUnicode); } - - infoPtr->order = Alloc(infoPtr->uNumItem * sizeof(INT)); - 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); + lpItem->fmt |= HDF_STRING; }
- for (i = 0; i < infoPtr->uNumItem; i++) - { - if (i != iOrder && infoPtr->order[i] >= nItem) - infoPtr->order[i]++; - infoPtr->items[infoPtr->order[i]].iOrder = infoPtr->order[i]; - } - - lpItem = &infoPtr->items[nItem]; - lpItem->bDown = FALSE; - - if (phdi->mask & HDI_WIDTH) - lpItem->cxy = phdi->cxy; - - if (phdi->mask & HDI_TEXT) { - WCHAR wide_null_char = 0; - if (!phdi->pszText) /* null pointer check */ - phdi->pszText = &wide_null_char; - if (phdi->pszText != LPSTR_TEXTCALLBACKW) { - len = strlenW (phdi->pszText); - lpItem->pszText = Alloc ((len+1)*sizeof(WCHAR)); - strcpyW (lpItem->pszText, phdi->pszText); - } - else - lpItem->pszText = LPSTR_TEXTCALLBACKW; - } - - if (phdi->mask & HDI_FORMAT) - lpItem->fmt = phdi->fmt; - - if (lpItem->fmt == 0) - lpItem->fmt = HDF_LEFT; - - if (!(lpItem->fmt &HDF_STRING) && (phdi->mask & HDI_TEXT)) - { - lpItem->fmt |= HDF_STRING; - } - if (phdi->mask & HDI_BITMAP) - lpItem->hbm = phdi->hbm; - - if (phdi->mask & HDI_LPARAM) - lpItem->lParam = phdi->lParam; - - if (phdi->mask & HDI_IMAGE) - lpItem->iImage = phdi->iImage; - lpItem->iOrder = iOrder;
HEADER_SetItemBounds (hwnd); @@ -1207,11 +1137,9 @@ }
static LRESULT -HEADER_SetItemA (HWND hwnd, WPARAM wParam, LPARAM lParam) +HEADER_SetItemT (HWND hwnd, INT nItem, LPHDITEMW phdi, BOOL bUnicode) { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMA *phdi = (HDITEMA*)lParam; - INT nItem = (INT)wParam; HEADER_ITEM *lpItem;
if (phdi == NULL) @@ -1221,7 +1149,8 @@
TRACE("[nItem=%d]\n", nItem);
- if (HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGINGA, nItem, phdi->mask)) + if (HEADER_SendHeaderNotify (hwnd, bUnicode ? HDN_ITEMCHANGINGW : HDN_ITEMCHANGINGA, + nItem, phdi->mask)) return FALSE;
lpItem = &infoPtr->items[nItem]; @@ -1234,113 +1163,46 @@ if (phdi->mask & HDI_LPARAM) lpItem->lParam = phdi->lParam;
- if (phdi->mask & HDI_TEXT) { - if (phdi->pszText != LPSTR_TEXTCALLBACKA) { - if (lpItem->pszText) { - Free (lpItem->pszText); - lpItem->pszText = NULL; - } - if (phdi->pszText) { - INT len = MultiByteToWideChar (CP_ACP,0,phdi->pszText,-1,NULL,0); - lpItem->pszText = Alloc( len*sizeof(WCHAR) ); - MultiByteToWideChar (CP_ACP,0,phdi->pszText,-1,lpItem->pszText,len); - } - } - else - lpItem->pszText = LPSTR_TEXTCALLBACKW; - } - if (phdi->mask & HDI_WIDTH) lpItem->cxy = phdi->cxy;
- if (phdi->mask & HDI_IMAGE) - lpItem->iImage = phdi->iImage; - - if (phdi->mask & HDI_ORDER) - { - INT i, nMin, nMax; - - if (lpItem->iOrder < phdi->iOrder) + if (phdi->mask & HDI_IMAGE) + { + if (phdi->iImage != I_IMAGECALLBACK) { - memmove(&infoPtr->order[lpItem->iOrder], - &infoPtr->order[lpItem->iOrder + 1], - (phdi->iOrder - lpItem->iOrder) * sizeof(INT)); - } - if (phdi->iOrder < lpItem->iOrder) + lpItem->iImage = phdi->iImage; + } + else { - memmove(&infoPtr->order[phdi->iOrder + 1], - &infoPtr->order[phdi->iOrder], - (lpItem->iOrder - phdi->iOrder) * sizeof(INT)); + lpItem->iImage = phdi->iImage; + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_IMAGE, NULL, lpItem, bUnicode); } - infoPtr->order[phdi->iOrder] = nItem; - nMin = min(lpItem->iOrder, phdi->iOrder); - nMax = max(lpItem->iOrder, phdi->iOrder); - for (i = nMin; i <= nMax; i++) - { - infoPtr->items[infoPtr->order[i]].iOrder = infoPtr->order[i]; - } - } + }
- HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGEDA, nItem, phdi->mask); - - HEADER_SetItemBounds (hwnd); - - InvalidateRect(hwnd, NULL, FALSE); - - return TRUE; -} - - -static LRESULT -HEADER_SetItemW (HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); - HDITEMW *phdi = (HDITEMW*)lParam; - INT nItem = (INT)wParam; - HEADER_ITEM *lpItem; - - if (phdi == NULL) - return FALSE; - if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem)) - return FALSE; - - TRACE("[nItem=%d]\n", nItem); - - if (HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGINGW, nItem, phdi->mask)) - return FALSE; - - lpItem = &infoPtr->items[nItem]; - if (phdi->mask & HDI_BITMAP) - lpItem->hbm = phdi->hbm; - - if (phdi->mask & HDI_FORMAT) - lpItem->fmt = phdi->fmt; - - if (phdi->mask & HDI_LPARAM) - lpItem->lParam = phdi->lParam; - - if (phdi->mask & HDI_TEXT) { - if (phdi->pszText != LPSTR_TEXTCALLBACKW) { - if (lpItem->pszText) { - Free (lpItem->pszText); - lpItem->pszText = NULL; - } - if (phdi->pszText) { - INT len = strlenW (phdi->pszText); - lpItem->pszText = Alloc ((len+1)*sizeof(WCHAR)); - strcpyW (lpItem->pszText, phdi->pszText); - } + if (phdi->mask & HDI_TEXT) + { + if (phdi->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ + { + if (lpItem->pszText) + { + Free(lpItem->pszText); + lpItem->pszText = NULL; + } + if (phdi->pszText) + { + if (bUnicode) + Str_SetPtrW(&lpItem->pszText, phdi->pszText); + else + Str_SetPtrAtoW(&lpItem->pszText, (LPSTR)phdi->pszText); + } } - else - lpItem->pszText = LPSTR_TEXTCALLBACKW; + else + { + lpItem->pszText = phdi->pszText; + HEADER_SendHeaderDispInfoNotify(hwnd, nItem, HDI_TEXT, NULL, lpItem, bUnicode); + } }
- if (phdi->mask & HDI_WIDTH) - lpItem->cxy = phdi->cxy; - - if (phdi->mask & HDI_IMAGE) - lpItem->iImage = phdi->iImage; - if (phdi->mask & HDI_ORDER) { INT i, nMin, nMax; @@ -1366,7 +1228,8 @@ } }
- HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGEDW, nItem, phdi->mask); + HEADER_SendHeaderNotify (hwnd, bUnicode ? HDN_ITEMCHANGEDW : HDN_ITEMCHANGEDA, + nItem, phdi->mask);
HEADER_SetItemBounds (hwnd);
@@ -1889,10 +1752,8 @@ return HEADER_GetImageList (hwnd);
case HDM_GETITEMA: - return HEADER_GetItemA (hwnd, wParam, lParam); - case HDM_GETITEMW: - return HEADER_GetItemW (hwnd, wParam, lParam); + return HEADER_GetItemT (hwnd, (INT)wParam, (LPHDITEMW)lParam, msg == HDM_GETITEMW);
case HDM_GETITEMCOUNT: return HEADER_GetItemCount (hwnd); @@ -1910,10 +1771,8 @@ return HEADER_HitTest (hwnd, wParam, lParam);
case HDM_INSERTITEMA: - return HEADER_InsertItemA (hwnd, wParam, lParam); - case HDM_INSERTITEMW: - return HEADER_InsertItemW (hwnd, wParam, lParam); + return HEADER_InsertItemT (hwnd, (INT)wParam, (LPHDITEMW)lParam, msg == HDM_INSERTITEMW);
case HDM_LAYOUT: return HEADER_Layout (hwnd, wParam, lParam); @@ -1932,10 +1791,8 @@ return HEADER_SetImageList (hwnd, (HIMAGELIST)lParam);
case HDM_SETITEMA: - return HEADER_SetItemA (hwnd, wParam, lParam); - case HDM_SETITEMW: - return HEADER_SetItemW (hwnd, wParam, lParam); + return HEADER_SetItemT (hwnd, (INT)wParam, (LPHDITEMW)lParam, msg == HDM_SETITEMW);
case HDM_SETORDERARRAY: return HEADER_SetOrderArray(hwnd, wParam, lParam); @@ -1982,6 +1839,7 @@ case WM_THEMECHANGED: return HEADER_ThemeChanged (hwnd);
+ case WM_PRINTCLIENT: case WM_PAINT: return HEADER_Paint (hwnd, wParam);
_____
Modified: vendor/wine/dlls/comctl32/current/hotkey.c --- vendor/wine/dlls/comctl32/current/hotkey.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/hotkey.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -516,6 +516,7 @@
case WM_NCCREATE: return HOTKEY_NCCreate (hwnd, (LPCREATESTRUCTW)lParam);
+ case WM_PRINTCLIENT: case WM_PAINT: HOTKEY_Paint(infoPtr, (HDC)wParam); return 0; _____
Modified: vendor/wine/dlls/comctl32/current/imagelist.c --- vendor/wine/dlls/comctl32/current/imagelist.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/imagelist.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -1581,8 +1581,7 @@
* * Creates an image list from a bitmap, icon or cursor. * - * SEE - * ImageList_LoadImageW () + * See ImageList_LoadImageW. */
HIMAGELIST WINAPI _____
Modified: vendor/wine/dlls/comctl32/current/listview.c --- vendor/wine/dlls/comctl32/current/listview.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/listview.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -3272,6 +3272,9 @@
{ TRACKMOUSEEVENT trackinfo;
+ if (!(fwKeys & MK_LBUTTON)) + infoPtr->bLButtonDown = FALSE; + if (infoPtr->bLButtonDown && DragDetect(infoPtr->hwndSelf, infoPtr->ptClickPos)) { LVHITTESTINFO lvHitTestInfo; @@ -4187,7 +4190,7 @@ HDC hdc, hdcOrig; HBITMAP hbmp, hOldbmp; HIMAGELIST dragList = 0; - TRACE("iItem=%d Count=%d \n", iItem, infoPtr->nItemCount); + TRACE("iItem=%d Count=%d\n", iItem, infoPtr->nItemCount);
if (iItem < 0 || iItem >= infoPtr->nItemCount) return 0; @@ -5135,7 +5138,7 @@ * * NOTE: * This is the internal 'GetItem' interface -- it tries to - * be smart, and avoids text copies, if possible, by modifing + * be smart and avoid text copies, if possible, by modifying * lpLVItem->pszText to point to the text string. Please note * that this is not always possible (e.g. OWNERDATA), so on * entry you *must* supply valid values for pszText, and cchTextMax. @@ -5610,6 +5613,7 @@ { POINT Position; LVITEMW lvItem; + INT nColumn = lprc->top;
if (!lprc) return FALSE;
@@ -5622,9 +5626,11 @@
if (!LISTVIEW_GetItemPosition(infoPtr, nItem, &Position)) return FALSE;
+ if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return FALSE; + lvItem.mask = 0; lvItem.iItem = nItem; - lvItem.iSubItem = lprc->top; + lvItem.iSubItem = nColumn;
if (lvItem.mask && !LISTVIEW_GetItemW(infoPtr, &lvItem)) return FALSE; switch(lprc->left) _____
Modified: vendor/wine/dlls/comctl32/current/monthcal.c --- vendor/wine/dlls/comctl32/current/monthcal.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/monthcal.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -2007,6 +2007,7 @@
case WM_LBUTTONUP: return MONTHCAL_LButtonUp(infoPtr, lParam);
+ case WM_PRINTCLIENT: case WM_PAINT: return MONTHCAL_Paint(infoPtr, wParam);
_____
Modified: vendor/wine/dlls/comctl32/current/pager.c --- vendor/wine/dlls/comctl32/current/pager.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/pager.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -34,6 +34,8 @@
* PGS_DRAGNDROP * Notifications: * PGN_HOTITEMCHANGE + * Messages: + * WM_PRINT and/or WM_PRINTCLIENT * * TESTING: * Tested primarily with the controlspy Pager application. _____
Modified: vendor/wine/dlls/comctl32/current/progress.c --- vendor/wine/dlls/comctl32/current/progress.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/progress.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -627,6 +627,7 @@
case WM_SETFONT: return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
+ case WM_PRINTCLIENT: case WM_PAINT: return PROGRESS_Paint (infoPtr, (HDC)wParam);
_____
Modified: vendor/wine/dlls/comctl32/current/propsheet.c --- vendor/wine/dlls/comctl32/current/propsheet.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/propsheet.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -3455,6 +3455,7 @@
return TRUE; }
+ case WM_PRINTCLIENT: case WM_PAINT: PROPSHEET_Paint(hwnd, (HDC)wParam); return TRUE; _____
Modified: vendor/wine/dlls/comctl32/current/rebar.c --- vendor/wine/dlls/comctl32/current/rebar.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/rebar.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -50,7 +50,6 @@
* - WM_LBUTTONDBLCLK * - WM_MEASUREITEM * - WM_PALETTECHANGED - * - WM_PRINTCLIENT * - WM_QUERYNEWPALETTE * - WM_RBUTTONDOWN * - WM_RBUTTONUP @@ -4768,11 +4767,11 @@ case WM_NOTIFYFORMAT: return REBAR_NotifyFormat (infoPtr, wParam, lParam);
+ case WM_PRINTCLIENT: case WM_PAINT: return REBAR_Paint (infoPtr, wParam, lParam);
/* case WM_PALETTECHANGED: supported according to ControlSpy */ -/* case WM_PRINTCLIENT: supported according to ControlSpy */ /* case WM_QUERYNEWPALETTE:supported according to ControlSpy */ /* case WM_RBUTTONDOWN: supported according to ControlSpy */ /* case WM_RBUTTONUP: supported according to ControlSpy */ _____
Modified: vendor/wine/dlls/comctl32/current/status.c --- vendor/wine/dlls/comctl32/current/status.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/status.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -1342,6 +1342,7 @@
case WM_NOTIFYFORMAT: return STATUSBAR_NotifyFormat(infoPtr, (HWND)wParam, (INT)lParam);
+ case WM_PRINTCLIENT: case WM_PAINT: return STATUSBAR_WMPaint (infoPtr, (HDC)wParam);
_____
Modified: vendor/wine/dlls/comctl32/current/string.c --- vendor/wine/dlls/comctl32/current/string.c 2005-11-16 21:22:07 UTC (rev 19277) +++ vendor/wine/dlls/comctl32/current/string.c 2005-11-16 21:24:43 UTC (rev 19278) @@ -22,6 +22,9 @@
* */
+#include "config.h" +#include "wine/port.h" + #include <stdarg.h> #include <string.h> #include <stdlib.h> /* atoi */ @@ -171,13 +174,52 @@ return NULL; }
+/********************************************************************** **** + * StrCmpNIA [COMCTL32.353] + * + * Compare two strings, up to a maximum length, ignoring case. + * + * PARAMS + * lpszStr [I] First string to compare + * lpszComp [I] Second string to compare + * iLen [I] Maximum number of chars to compare. + * + * RETURNS + * An integer less than, equal to or greater than 0, indicating that + * lpszStr is less than, the same, or greater than lpszComp. + */ +INT WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, INT iLen) +{ + INT iRet; + + TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen); + + iRet = CompareStringA(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen); + return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0; +} +
/*********************************************************************** ** + * StrCmpNIW [COMCTL32.361] + * + * See StrCmpNIA. + */ +INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen) +{ + INT iRet; + + TRACE("(%s,%s,%i)\n", debugstr_w(lpszStr), debugstr_w(lpszComp), iLen); + + iRet = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen); + return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0; +} + +/********************************************************************** *** * COMCTL32_StrStrHelperA * * Internal implementation of StrStrA/StrStrIA */ static LPSTR COMCTL32_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch, - int (*pStrCmpFn)(LPCSTR,LPCSTR,size_t)) + INT (WINAPI *pStrCmpFn)(LPCSTR,LPCSTR,INT)) { size_t iLen;
@@ -201,7 +243,7 @@ * Internal implementation of StrStrW/StrStrIW */ static LPWSTR COMCTL32_StrStrHelperW(LPCWSTR lpszStr, LPCWSTR lpszSearch, - int (*pStrCmpFn)(LPCWSTR,LPCWSTR,int)) + INT (WINAPI *pStrCmpFn)(LPCWSTR,LPCWSTR,INT)) { int iLen;
@@ -235,7 +277,7 @@ { TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
- return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, strncasecmp); + return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA); }
/*********************************************************************** *** @@ -264,7 +306,7 @@ { TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, strncmpiW); + return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, StrCmpNIW); }
/*********************************************************************** *** @@ -365,45 +407,6 @@ }
/*********************************************************************** *** - * StrCmpNIA [COMCTL32.353] - * - * Compare two strings, up to a maximum length, ignoring case. - * - * PARAMS - * lpszStr [I] First string to compare - * lpszComp [I] Second string to compare - * iLen [I] Maximum number of chars to compare. - * - * RETURNS - * An integer less than, equal to or greater than 0, indicating that - * lpszStr is less than, the same, or greater than lpszComp. - */ -int WINAPI StrCmpNIA(LPCSTR lpszStr, LPCSTR lpszComp, int iLen) -{ - INT iRet; - - TRACE("(%s,%s,%i)\n", debugstr_a(lpszStr), debugstr_a(lpszComp), iLen); - - iRet = CompareStringA(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen); - return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0; -} - -/********************************************************************** *** - * StrCmpNIW [COMCTL32.361] - * - * See StrCmpNIA. - */ -INT WINAPI StrCmpNIW(LPCWSTR lpszStr, LPCWSTR lpszComp, int iLen) -{ - INT iRet; - - TRACE("(%s,%s,%i)\n", debugstr_w(lpszStr), debugstr_w(lpszComp), iLen); - - iRet = CompareStringW(GetThreadLocale(), NORM_IGNORECASE, lpszStr, iLen, lpszComp, iLen); - return iRet == CSTR_LESS_THAN ? -1 : iRet == CSTR_GREATER_THAN ? 1 : 0; -} - -/********************************************************************** **** * StrCmpNW [COMCTL32.360] * * See StrCmpNA. @@ -501,7 +504,7 @@ { TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
[truncated at 1000 lines; 17802 more skipped]