- Sync comctl32 with Wine head

svn path=/trunk/; revision=39850
This commit is contained in:
Dmitry Chapyshev 2009-03-03 09:09:59 +00:00
parent f1aeddb982
commit a7bbe6d2ec
18 changed files with 397 additions and 282 deletions

View file

@ -121,7 +121,7 @@ static BOOL ANIMATE_LoadResW(ANIMATE_INFO *infoPtr, HINSTANCE hInst, LPCWSTR lpN
memset(&mminfo, 0, sizeof(mminfo)); memset(&mminfo, 0, sizeof(mminfo));
mminfo.fccIOProc = FOURCC_MEM; mminfo.fccIOProc = FOURCC_MEM;
mminfo.pchBuffer = (LPSTR)lpAvi; mminfo.pchBuffer = lpAvi;
mminfo.cchBuffer = SizeofResource(hInst, hrsrc); mminfo.cchBuffer = SizeofResource(hInst, hrsrc);
infoPtr->hMMio = mmioOpenW(NULL, &mminfo, MMIO_READ); infoPtr->hMMio = mmioOpenW(NULL, &mminfo, MMIO_READ);
if (!infoPtr->hMMio) if (!infoPtr->hMMio)
@ -391,7 +391,7 @@ static LRESULT ANIMATE_Timer(ANIMATE_INFO *infoPtr)
static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_) static DWORD CALLBACK ANIMATE_AnimationThread(LPVOID ptr_)
{ {
ANIMATE_INFO *infoPtr = (ANIMATE_INFO *)ptr_; ANIMATE_INFO *infoPtr = ptr_;
HANDLE event; HANDLE event;
DWORD timeout; DWORD timeout;
@ -472,7 +472,7 @@ static LRESULT ANIMATE_Play(ANIMATE_INFO *infoPtr, UINT cRepeat, WORD wFrom, WOR
TRACE("Using an animation thread\n"); TRACE("Using an animation thread\n");
infoPtr->hStopEvent = CreateEventW( NULL, TRUE, FALSE, NULL ); infoPtr->hStopEvent = CreateEventW( NULL, TRUE, FALSE, NULL );
infoPtr->hThread = CreateThread(0, 0, ANIMATE_AnimationThread, infoPtr->hThread = CreateThread(0, 0, ANIMATE_AnimationThread,
(LPVOID)infoPtr, 0, &infoPtr->threadId); infoPtr, 0, &infoPtr->threadId);
if(!infoPtr->hThread) return FALSE; if(!infoPtr->hThread) return FALSE;
} }

View file

@ -339,7 +339,7 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
*/ */
void WINAPI FreeMRUList (HANDLE hMRUList) void WINAPI FreeMRUList (HANDLE hMRUList)
{ {
LPWINEMRULIST mp = (LPWINEMRULIST)hMRUList; LPWINEMRULIST mp = hMRUList;
UINT i; UINT i;
TRACE("(%p)\n", hMRUList); TRACE("(%p)\n", hMRUList);
@ -380,7 +380,7 @@ void WINAPI FreeMRUList (HANDLE hMRUList)
INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData, INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData,
LPINT lpRegNum) LPINT lpRegNum)
{ {
const WINEMRULIST *mp = (LPWINEMRULIST)hList; const WINEMRULIST *mp = hList;
INT ret; INT ret;
UINT i; UINT i;
LPSTR dataA = NULL; LPSTR dataA = NULL;
@ -454,7 +454,7 @@ INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData,
*/ */
INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData) INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
{ {
LPWINEMRULIST mp = (LPWINEMRULIST)hList; LPWINEMRULIST mp = hList;
LPWINEMRUITEM witem; LPWINEMRUITEM witem;
INT i, replace; INT i, replace;
@ -718,7 +718,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags, mp->extview.cbSize, mp->extview.nMaxItems, mp->extview.dwFlags,
mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey), mp->extview.hKey, debugstr_w(mp->extview.lpszSubKey),
mp->extview.lpfnCompare, mp->cursize); mp->extview.lpfnCompare, mp->cursize);
return (HANDLE)mp; return mp;
} }
/************************************************************************** /**************************************************************************
@ -830,7 +830,7 @@ HANDLE WINAPI CreateMRUListA (const CREATEMRULISTA *lpcml)
INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer, INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
DWORD nBufferSize) DWORD nBufferSize)
{ {
const WINEMRULIST *mp = (LPWINEMRULIST) hList; const WINEMRULIST *mp = hList;
const WINEMRUITEM *witem; const WINEMRUITEM *witem;
INT desired, datasize; INT desired, datasize;
@ -855,7 +855,7 @@ INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer, INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
DWORD nBufferSize) DWORD nBufferSize)
{ {
const WINEMRULIST *mp = (LPWINEMRULIST) hList; const WINEMRULIST *mp = hList;
LPWINEMRUITEM witem; LPWINEMRUITEM witem;
INT desired, datasize; INT desired, datasize;
DWORD lenA; DWORD lenA;

View file

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

View file

@ -869,7 +869,7 @@ CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags,
internalColorMap[2].to = GetSysColor (COLOR_BTNFACE); internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT); internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
iMaps = 4; iMaps = 4;
sysColorMap = (LPCOLORMAP)internalColorMap; sysColorMap = internalColorMap;
} }
hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP); hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP);
@ -1125,7 +1125,7 @@ BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass,
ERR ("Failed to allocate our Subclassing stack\n"); ERR ("Failed to allocate our Subclassing stack\n");
return FALSE; return FALSE;
} }
SetPropW (hWnd, COMCTL32_wSubclass, (HANDLE)stack); SetPropW (hWnd, COMCTL32_wSubclass, stack);
/* set window procedure to our own and save the current one */ /* set window procedure to our own and save the current one */
if (IsWindowUnicode (hWnd)) if (IsWindowUnicode (hWnd))

View file

@ -46,8 +46,6 @@ typedef struct
DWORD dwDummy; /* just to keep the compiler happy ;-) */ DWORD dwDummy; /* just to keep the compiler happy ;-) */
} FLATSB_INFO, *LPFLATSB_INFO; } FLATSB_INFO, *LPFLATSB_INFO;
#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongPtrW (hwnd, 0))
/*********************************************************************** /***********************************************************************
* InitializeFlatSB (COMCTL32.@) * InitializeFlatSB (COMCTL32.@)
@ -245,7 +243,7 @@ FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT WINAPI static LRESULT WINAPI
FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
if (!FlatSB_GetInfoPtr(hwnd) && (uMsg != WM_CREATE)) if (!GetWindowLongPtrW(hwnd, 0) && (uMsg != WM_CREATE))
return DefWindowProcW( hwnd, uMsg, wParam, lParam ); return DefWindowProcW( hwnd, uMsg, wParam, lParam );
switch (uMsg) switch (uMsg)

View file

@ -405,7 +405,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags
} }
if ((phdi->fmt & HDF_BITMAP) && (phdi->hbm)) { if ((phdi->fmt & HDF_BITMAP) && (phdi->hbm)) {
GetObjectW (phdi->hbm, sizeof(BITMAP), (LPVOID)&bmp); GetObjectW (phdi->hbm, sizeof(BITMAP), &bmp);
bw = bmp.bmWidth + 2 * infoPtr->iMargin; bw = bmp.bmWidth + 2 * infoPtr->iMargin;
if (!iw) { if (!iw) {
x = &bx; x = &bx;
@ -903,7 +903,7 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask)
if (mask & HDI_TEXT) if (mask & HDI_TEXT)
pvBuffer = Alloc(MAX_HEADER_TEXT_LEN * sizeof(CHAR)); pvBuffer = Alloc(MAX_HEADER_TEXT_LEN * sizeof(CHAR));
} }
dispInfo.pszText = (LPWSTR)pvBuffer; dispInfo.pszText = pvBuffer;
dispInfo.cchTextMax = (pvBuffer!=NULL?MAX_HEADER_TEXT_LEN:0); dispInfo.cchTextMax = (pvBuffer!=NULL?MAX_HEADER_TEXT_LEN:0);
dispInfo.iItem = iItem; dispInfo.iItem = iItem;
dispInfo.mask = mask; dispInfo.mask = mask;
@ -923,7 +923,7 @@ HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask)
{ {
if (infoPtr->nNotifyFormat == NFR_UNICODE) if (infoPtr->nNotifyFormat == NFR_UNICODE)
{ {
lpItem->pszText = (LPWSTR)pvBuffer; lpItem->pszText = pvBuffer;
/* the user might have used his own buffer */ /* the user might have used his own buffer */
if (dispInfo.pszText != lpItem->pszText) if (dispInfo.pszText != lpItem->pszText)

View file

@ -243,7 +243,7 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
if (!is_valid(himl)) if (!is_valid(himl))
return -1; return -1;
if (!GetObjectW(hbmImage, sizeof(BITMAP), (LPVOID)&bmp)) if (!GetObjectW(hbmImage, sizeof(BITMAP), &bmp))
return -1; return -1;
nImageCount = bmp.bmWidth / himl->cx; nImageCount = bmp.bmWidth / himl->cx;
@ -1730,14 +1730,14 @@ ImageList_LoadImageW (HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow,
DeleteObject (handle); DeleteObject (handle);
return NULL; return NULL;
} }
ImageList_AddMasked (himl, (HBITMAP)handle, clrMask); ImageList_AddMasked (himl, handle, clrMask);
} }
else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) { else if ((uType == IMAGE_ICON) || (uType == IMAGE_CURSOR)) {
ICONINFO ii; ICONINFO ii;
BITMAP bmp; BITMAP bmp;
GetIconInfo (handle, &ii); GetIconInfo (handle, &ii);
GetObjectW (ii.hbmColor, sizeof(BITMAP), (LPVOID)&bmp); GetObjectW (ii.hbmColor, sizeof(BITMAP), &bmp);
himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight,
ILC_MASK | ILC_COLOR, 1, cGrow); ILC_MASK | ILC_COLOR, 1, cGrow);
if (!himl) { if (!himl) {
@ -2196,7 +2196,7 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage,
return FALSE; return FALSE;
} }
if (!GetObjectW(hbmImage, sizeof(BITMAP), (LPVOID)&bmp)) if (!GetObjectW(hbmImage, sizeof(BITMAP), &bmp))
return FALSE; return FALSE;
hdcImage = CreateCompatibleDC (0); hdcImage = CreateCompatibleDC (0);
@ -2291,7 +2291,7 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
return -1; return -1;
} }
ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp); ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), &bmp);
if (!ret) { if (!ret) {
ERR("couldn't get mask bitmap info\n"); ERR("couldn't get mask bitmap info\n");
if (ii.hbmColor) if (ii.hbmColor)
@ -2686,7 +2686,7 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm)
HDC xdc; HDC xdc;
BOOL result = FALSE; BOOL result = FALSE;
if (!GetObjectW(hBitmap, sizeof(BITMAP), (LPVOID)&bm)) if (!GetObjectW(hBitmap, sizeof(BITMAP), &bm))
return FALSE; return FALSE;
bitCount = bm.bmBitsPixel == 1 ? 1 : 24; bitCount = bm.bmBitsPixel == 1 ? 1 : 24;

View file

@ -106,7 +106,6 @@
* -- LVN_GETINFOTIP * -- LVN_GETINFOTIP
* -- LVN_HOTTRACK * -- LVN_HOTTRACK
* -- LVN_MARQUEEBEGIN * -- LVN_MARQUEEBEGIN
* -- LVN_ODFINDITEM
* -- LVN_SETDISPINFO * -- LVN_SETDISPINFO
* -- NM_HOVER * -- NM_HOVER
* -- LVN_BEGINRDRAG * -- LVN_BEGINRDRAG
@ -1373,7 +1372,7 @@ static inline COLUMN_INFO * LISTVIEW_GetColumnInfo(const LISTVIEW_INFO *infoPtr,
if (nSubItem == 0 && DPA_GetPtrCount(infoPtr->hdpaColumns) == 0) return &mainItem; if (nSubItem == 0 && DPA_GetPtrCount(infoPtr->hdpaColumns) == 0) return &mainItem;
assert (nSubItem >= 0 && nSubItem < DPA_GetPtrCount(infoPtr->hdpaColumns)); assert (nSubItem >= 0 && nSubItem < DPA_GetPtrCount(infoPtr->hdpaColumns));
return (COLUMN_INFO *)DPA_GetPtr(infoPtr->hdpaColumns, nSubItem); return DPA_GetPtr(infoPtr->hdpaColumns, nSubItem);
} }
static inline void LISTVIEW_GetHeaderRect(const LISTVIEW_INFO *infoPtr, INT nSubItem, LPRECT lprc) static inline void LISTVIEW_GetHeaderRect(const LISTVIEW_INFO *infoPtr, INT nSubItem, LPRECT lprc)
@ -1530,7 +1529,7 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
if (!charCode || !keyData) return 0; if (!charCode || !keyData) return 0;
/* only allow the valid WM_CHARs through */ /* only allow the valid WM_CHARs through */
if (!isalnum(charCode) && if (!isalnumW(charCode) &&
charCode != '.' && charCode != '`' && charCode != '!' && charCode != '.' && charCode != '`' && charCode != '!' &&
charCode != '@' && charCode != '#' && charCode != '$' && charCode != '@' && charCode != '#' && charCode != '$' &&
charCode != '%' && charCode != '^' && charCode != '&' && charCode != '%' && charCode != '^' && charCode != '&' &&
@ -1574,6 +1573,28 @@ static INT LISTVIEW_ProcessLetterKeys(LISTVIEW_INFO *infoPtr, WPARAM charCode, L
endidx=infoPtr->nItemCount; endidx=infoPtr->nItemCount;
idx=0; idx=0;
} }
/* Let application handle this for virtual listview */
if (infoPtr->dwStyle & LVS_OWNERDATA)
{
NMLVFINDITEMW nmlv;
LVFINDINFOW lvfi;
ZeroMemory(&lvfi, sizeof(lvfi));
lvfi.flags = (LVFI_WRAP | LVFI_PARTIAL);
infoPtr->szSearchParam[infoPtr->nSearchParamLength] = '\0';
lvfi.psz = infoPtr->szSearchParam;
nmlv.iStart = idx;
nmlv.lvfi = lvfi;
nItem = notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
if (nItem != -1)
LISTVIEW_KeySelection(infoPtr, nItem);
return 0;
}
do { do {
if (idx == infoPtr->nItemCount) { if (idx == infoPtr->nItemCount) {
if (endidx == infoPtr->nItemCount || endidx == 0) if (endidx == infoPtr->nItemCount || endidx == 0)
@ -2584,8 +2605,8 @@ static INT CALLBACK ranges_cmp(LPVOID range1, LPVOID range2, LPARAM flags)
cmp = 1; cmp = 1;
else else
cmp = 0; cmp = 0;
TRACE("range1=%s, range2=%s, cmp=%d\n", debugrange((RANGE*)range1), debugrange((RANGE*)range2), cmp); TRACE("range1=%s, range2=%s, cmp=%d\n", debugrange(range1), debugrange(range2), cmp);
return cmp; return cmp;
} }
@ -4511,10 +4532,11 @@ static BOOL LISTVIEW_DeleteAllItems(LISTVIEW_INFO *infoPtr, BOOL destroy)
for (i = infoPtr->nItemCount - 1; i >= 0; i--) for (i = infoPtr->nItemCount - 1; i >= 0; i--)
{ {
/* send LVN_DELETEITEM notification, if not suppressed */
if (!bSuppress) notify_deleteitem(infoPtr, i);
if (!(infoPtr->dwStyle & LVS_OWNERDATA)) if (!(infoPtr->dwStyle & LVS_OWNERDATA))
{ {
/* send LVN_DELETEITEM notification, if not suppressed
and if it is not a virtual listview */
if (!bSuppress) notify_deleteitem(infoPtr, i);
hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, i); hdpaSubItems = DPA_GetPtr(infoPtr->hdpaItems, i);
for (j = 0; j < DPA_GetPtrCount(hdpaSubItems); j++) for (j = 0; j < DPA_GetPtrCount(hdpaSubItems); j++)
{ {
@ -5075,6 +5097,17 @@ static INT LISTVIEW_FindItemW(const LISTVIEW_INFO *infoPtr, INT nStart,
POINT Position, Destination; POINT Position, Destination;
LVITEMW lvItem; LVITEMW lvItem;
/* Search in virtual listviews should be done by application, not by
listview control, so we just send LVN_ODFINDITEMW and return the result */
if (infoPtr->dwStyle & LVS_OWNERDATA)
{
NMLVFINDITEMW nmlv;
nmlv.iStart = nStart;
nmlv.lvfi = *lpFindInfo;
return notify_hdr(infoPtr, LVN_ODFINDITEMW, (LPNMHDR)&nmlv.hdr);
}
if (!lpFindInfo || nItem < 0) return -1; if (!lpFindInfo || nItem < 0) return -1;
lvItem.mask = 0; lvItem.mask = 0;
@ -6473,8 +6506,8 @@ static INT LISTVIEW_HitTest(const LISTVIEW_INFO *infoPtr, LPLVHITTESTINFO lpht,
*/ */
static INT WINAPI LISTVIEW_InsertCompare( LPVOID first, LPVOID second, LPARAM lParam) static INT WINAPI LISTVIEW_InsertCompare( LPVOID first, LPVOID second, LPARAM lParam)
{ {
ITEM_INFO* lv_first = DPA_GetPtr( (HDPA)first, 0 ); ITEM_INFO* lv_first = DPA_GetPtr( first, 0 );
ITEM_INFO* lv_second = DPA_GetPtr( (HDPA)second, 0 ); ITEM_INFO* lv_second = DPA_GetPtr( second, 0 );
INT cmpv = textcmpWT(lv_first->hdr.pszText, lv_second->hdr.pszText, TRUE); INT cmpv = textcmpWT(lv_first->hdr.pszText, lv_second->hdr.pszText, TRUE);
/* if we're sorting descending, negate the return value */ /* if we're sorting descending, negate the return value */
@ -7755,8 +7788,8 @@ static BOOL LISTVIEW_SetUnicodeFormat( LISTVIEW_INFO *infoPtr, BOOL fUnicode)
static INT WINAPI LISTVIEW_CallBackCompare(LPVOID first, LPVOID second, LPARAM lParam) static INT WINAPI LISTVIEW_CallBackCompare(LPVOID first, LPVOID second, LPARAM lParam)
{ {
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)lParam; LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)lParam;
ITEM_INFO* lv_first = DPA_GetPtr( (HDPA)first, 0 ); ITEM_INFO* lv_first = DPA_GetPtr( first, 0 );
ITEM_INFO* lv_second = DPA_GetPtr( (HDPA)second, 0 ); ITEM_INFO* lv_second = DPA_GetPtr( second, 0 );
/* Forward the call to the client defined callback */ /* Forward the call to the client defined callback */
return (infoPtr->pfnCompare)( lv_first->lParam , lv_second->lParam, infoPtr->lParamSort ); return (infoPtr->pfnCompare)( lv_first->lParam , lv_second->lParam, infoPtr->lParamSort );
@ -8953,6 +8986,7 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE
nmlv.iItem = -1; nmlv.iItem = -1;
nmlv.iSubItem = lpnmh->iItem; nmlv.iSubItem = lpnmh->iItem;
notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv); notify_listview(infoPtr, LVN_COLUMNCLICK, &nmlv);
notify_forward_header(infoPtr, lpnmh);
} }
break; break;

View file

@ -673,19 +673,15 @@ static INT_PTR PROPSHEET_CreateDialog(PropSheetInfo* psInfo)
if( psInfo->unicode ) if( psInfo->unicode )
{ {
ret = (INT_PTR)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance, ret = (INT_PTR)CreateDialogIndirectParamW(psInfo->ppshheader.hInstance,
(LPDLGTEMPLATEW) temp, temp, psInfo->ppshheader.hwndParent,
psInfo->ppshheader.hwndParent, PROPSHEET_DialogProc, (LPARAM)psInfo);
PROPSHEET_DialogProc,
(LPARAM)psInfo);
if ( !ret ) ret = -1; if ( !ret ) ret = -1;
} }
else else
{ {
ret = (INT_PTR)CreateDialogIndirectParamA(psInfo->ppshheader.hInstance, ret = (INT_PTR)CreateDialogIndirectParamA(psInfo->ppshheader.hInstance,
(LPDLGTEMPLATEA) temp, temp, psInfo->ppshheader.hwndParent,
psInfo->ppshheader.hwndParent, PROPSHEET_DialogProc, (LPARAM)psInfo);
PROPSHEET_DialogProc,
(LPARAM)psInfo);
if ( !ret ) ret = -1; if ( !ret ) ret = -1;
} }
@ -740,9 +736,10 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL); HWND hwndTabCtrl = GetDlgItem(hwndDlg, IDC_TABCONTROL);
HWND hwndButton = GetDlgItem(hwndDlg, IDOK); HWND hwndButton = GetDlgItem(hwndDlg, IDOK);
RECT rc,tabRect; RECT rc,tabRect;
int tabOffsetX, tabOffsetY, buttonHeight; int buttonHeight;
PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg); PADDING_INFO padding = PROPSHEET_GetPaddingInfo(hwndDlg);
RECT units; RECT units;
LONG style;
/* Get the height of buttons */ /* Get the height of buttons */
GetClientRect(hwndButton, &rc); GetClientRect(hwndButton, &rc);
@ -784,9 +781,6 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, TRUE, (LPARAM)&rc); SendMessageW(hwndTabCtrl, TCM_ADJUSTRECT, TRUE, (LPARAM)&rc);
tabOffsetX = -(rc.left);
tabOffsetY = -(rc.top);
rc.right -= rc.left; rc.right -= rc.left;
rc.bottom -= rc.top; rc.bottom -= rc.top;
TRACE("setting tab %p, rc (0,0)-(%d,%d)\n", TRACE("setting tab %p, rc (0,0)-(%d,%d)\n",
@ -798,8 +792,15 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
TRACE("tab client rc %s\n", wine_dbgstr_rect(&rc)); TRACE("tab client rc %s\n", wine_dbgstr_rect(&rc));
rc.right += ((padding.x * 2) + tabOffsetX); rc.right += (padding.x * 2);
rc.bottom += (buttonHeight + (3 * padding.y) + tabOffsetY); rc.bottom += buttonHeight + (3 * padding.y);
style = GetWindowLongW(hwndDlg, GWL_STYLE);
if (!(style & WS_CHILD))
AdjustWindowRect(&rc, style, FALSE);
rc.right -= rc.left;
rc.bottom -= rc.top;
/* /*
* Resize the property sheet. * Resize the property sheet.
@ -2439,7 +2440,6 @@ EnumChildProc(HWND hwnd, LPARAM lParam)
return TRUE; return TRUE;
} }
/****************************************************************************** /******************************************************************************
* PROPSHEET_SetWizButtons * PROPSHEET_SetWizButtons
* *
@ -2756,7 +2756,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
Free(psInfo->strPropertiesFor); Free(psInfo->strPropertiesFor);
ImageList_Destroy(psInfo->hImageList); ImageList_Destroy(psInfo->hImageList);
GlobalFree((HGLOBAL)psInfo); GlobalFree(psInfo);
} }
static INT do_loop(const PropSheetInfo *psInfo) static INT do_loop(const PropSheetInfo *psInfo)
@ -3268,7 +3268,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2); MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2);
SetRect(&rzone, 0, 0, r.right + 1, r.top - 1); SetRect(&rzone, 0, 0, r.right + 1, r.top - 1);
GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm); GetObjectW(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), &bm);
if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD) if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD)
{ {
@ -3376,7 +3376,7 @@ static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
hbr = GetSysColorBrush(COLOR_WINDOW); hbr = GetSysColorBrush(COLOR_WINDOW);
FillRect(hdc, &rzone, hbr); FillRect(hdc, &rzone, hbr);
GetObjectW(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), (LPVOID)&bm); GetObjectW(psInfo->ppshheader.u4.hbmWatermark, sizeof(BITMAP), &bm);
hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark); hbmp = SelectObject(hdcSrc, psInfo->ppshheader.u4.hbmWatermark);
/* The watermark is truncated to a width of 164 pixels */ /* The watermark is truncated to a width of 164 pixels */
@ -3431,7 +3431,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
/* Using PropSheetInfoStr to store extra data doesn't match the native /* Using PropSheetInfoStr to store extra data doesn't match the native
* common control: native uses TCM_[GS]ETITEM * common control: native uses TCM_[GS]ETITEM
*/ */
SetPropW(hwnd, PropSheetInfoStr, (HANDLE)psInfo); SetPropW(hwnd, PropSheetInfoStr, psInfo);
/* /*
* psInfo->hwnd is not being used by WINE code - it exists * psInfo->hwnd is not being used by WINE code - it exists

View file

@ -3469,19 +3469,19 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
REBAR_StyleChanged (REBAR_INFO *infoPtr, LPARAM lParam) REBAR_StyleChanged (REBAR_INFO *infoPtr, INT nType, const STYLESTRUCT *lpStyle)
{ {
STYLESTRUCT *ss = (STYLESTRUCT *)lParam;
TRACE("current style=%08x, styleOld=%08x, style being set to=%08x\n", TRACE("current style=%08x, styleOld=%08x, style being set to=%08x\n",
infoPtr->dwStyle, ss->styleOld, ss->styleNew); infoPtr->dwStyle, lpStyle->styleOld, lpStyle->styleNew);
infoPtr->orgStyle = infoPtr->dwStyle = ss->styleNew; if (nType == GWL_STYLE)
if (GetWindowTheme (infoPtr->hwndSelf)) {
infoPtr->dwStyle &= ~WS_BORDER; infoPtr->orgStyle = infoPtr->dwStyle = lpStyle->styleNew;
/* maybe it should be COMMON_STYLES like in toolbar */ if (GetWindowTheme (infoPtr->hwndSelf))
if ((ss->styleNew ^ ss->styleOld) & CCS_VERT) infoPtr->dwStyle &= ~WS_BORDER;
REBAR_Layout(infoPtr); /* maybe it should be COMMON_STYLES like in toolbar */
if ((lpStyle->styleNew ^ lpStyle->styleOld) & CCS_VERT)
REBAR_Layout(infoPtr);
}
return FALSE; return FALSE;
} }
@ -3715,7 +3715,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return REBAR_Size (infoPtr, wParam, lParam); return REBAR_Size (infoPtr, wParam, lParam);
case WM_STYLECHANGED: case WM_STYLECHANGED:
return REBAR_StyleChanged (infoPtr, lParam); return REBAR_StyleChanged (infoPtr, wParam, (LPSTYLESTRUCT)lParam);
case WM_THEMECHANGED: case WM_THEMECHANGED:
return theme_changed (infoPtr); return theme_changed (infoPtr);

View file

@ -102,6 +102,7 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico
#include "comctl_It.rc" #include "comctl_It.rc"
#include "comctl_Ja.rc" #include "comctl_Ja.rc"
#include "comctl_Ko.rc" #include "comctl_Ko.rc"
#include "comctl_Lt.rc"
#include "comctl_Nl.rc" #include "comctl_Nl.rc"
#include "comctl_No.rc" #include "comctl_No.rc"
#include "comctl_Pl.rc" #include "comctl_Pl.rc"
@ -109,6 +110,7 @@ IDI_TT_ERROR_SM ICON LOADONCALL DISCARDABLE idi_tt_error_sm.ico
#include "comctl_Ro.rc" #include "comctl_Ro.rc"
#include "comctl_Ru.rc" #include "comctl_Ru.rc"
#include "comctl_Si.rc" #include "comctl_Si.rc"
#include "comctl_Sk.rc"
#include "comctl_Sv.rc" #include "comctl_Sv.rc"
#include "comctl_Th.rc" #include "comctl_Th.rc"
#include "comctl_Tr.rc" #include "comctl_Tr.rc"

View file

@ -95,7 +95,6 @@ typedef struct
#define HORZ_BORDER 0 #define HORZ_BORDER 0
#define VERT_BORDER 2 #define VERT_BORDER 2
#define HORZ_GAP 2 #define HORZ_GAP 2
#define MIN_PANE_HEIGHT 18
static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }; static const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 };
@ -649,7 +648,9 @@ STATUSBAR_SetIcon (STATUS_INFO *infoPtr, INT nPart, HICON hIcon)
static BOOL static BOOL
STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height) STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height)
{ {
infoPtr->minHeight = max(height, MIN_PANE_HEIGHT); DWORD ysize = GetSystemMetrics(SM_CYSIZE);
if (ysize & 1) ysize--;
infoPtr->minHeight = max(height, ysize);
infoPtr->height = STATUSBAR_ComputeHeight(infoPtr); infoPtr->height = STATUSBAR_ComputeHeight(infoPtr);
/* like native, don't resize the control */ /* like native, don't resize the control */
return TRUE; return TRUE;
@ -758,8 +759,6 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style,
if (style & SBT_OWNERDRAW) { if (style & SBT_OWNERDRAW) {
if (!(oldStyle & SBT_OWNERDRAW)) if (!(oldStyle & SBT_OWNERDRAW))
Free (part->text); Free (part->text);
else if (part->text == text)
return TRUE;
part->text = (LPWSTR)text; part->text = (LPWSTR)text;
} else { } else {
LPWSTR ntext; LPWSTR ntext;
@ -921,7 +920,8 @@ STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate)
infoPtr->horizontalBorder = HORZ_BORDER; infoPtr->horizontalBorder = HORZ_BORDER;
infoPtr->verticalBorder = VERT_BORDER; infoPtr->verticalBorder = VERT_BORDER;
infoPtr->horizontalGap = HORZ_GAP; infoPtr->horizontalGap = HORZ_GAP;
infoPtr->minHeight = MIN_PANE_HEIGHT; infoPtr->minHeight = GetSystemMetrics(SM_CYSIZE);
if (infoPtr->minHeight & 1) infoPtr->minHeight--;
STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY); STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY);

View file

@ -602,8 +602,8 @@ static PDOC_ITEM SYSLINK_GetPrevLink (const SYSLINK_INFO *infoPtr, PDOC_ITEM Cur
* SYSLINK_WrapLine * SYSLINK_WrapLine
* Tries to wrap a line. * Tries to wrap a line.
*/ */
static BOOL SYSLINK_WrapLine (HDC hdc, LPWSTR Text, WCHAR BreakChar, int *LineLen, static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int *LineLen,
int nFit, LPSIZE Extent, int Width) int nFit, LPSIZE Extent)
{ {
WCHAR *Current; WCHAR *Current;
@ -720,7 +720,7 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect)
if(n != 0) if(n != 0)
{ {
Wrap = SYSLINK_WrapLine(hdc, tx, infoPtr->BreakChar, &LineLen, nFit, &szDim, rc.right - x); Wrap = SYSLINK_WrapLine(tx, infoPtr->BreakChar, &LineLen, nFit, &szDim);
if(LineLen == 0) if(LineLen == 0)
{ {
@ -1317,7 +1317,7 @@ static LRESULT SYSLINK_SendParentNotify (const SYSLINK_INFO *infoPtr, UINT code,
* SYSLINK_SetFocus * SYSLINK_SetFocus
* Handles receiving the input focus. * Handles receiving the input focus.
*/ */
static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow) static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr)
{ {
PDOC_ITEM Focus; PDOC_ITEM Focus;
@ -1340,7 +1340,7 @@ static LRESULT SYSLINK_SetFocus (SYSLINK_INFO *infoPtr, HWND PrevFocusWindow)
* SYSLINK_KillFocus * SYSLINK_KillFocus
* Handles losing the input focus. * Handles losing the input focus.
*/ */
static LRESULT SYSLINK_KillFocus (SYSLINK_INFO *infoPtr, HWND NewFocusWindow) static LRESULT SYSLINK_KillFocus (SYSLINK_INFO *infoPtr)
{ {
PDOC_ITEM Focus; PDOC_ITEM Focus;
@ -1385,7 +1385,7 @@ static PDOC_ITEM SYSLINK_LinkAtPt (const SYSLINK_INFO *infoPtr, const POINT *pt,
* SYSLINK_LButtonDown * SYSLINK_LButtonDown
* Handles mouse clicks * Handles mouse clicks
*/ */
static LRESULT SYSLINK_LButtonDown (SYSLINK_INFO *infoPtr, DWORD Buttons, const POINT *pt) static LRESULT SYSLINK_LButtonDown (SYSLINK_INFO *infoPtr, const POINT *pt)
{ {
PDOC_ITEM Current, Old; PDOC_ITEM Current, Old;
int id; int id;
@ -1411,7 +1411,7 @@ static LRESULT SYSLINK_LButtonDown (SYSLINK_INFO *infoPtr, DWORD Buttons, const
* SYSLINK_LButtonUp * SYSLINK_LButtonUp
* Handles mouse clicks * Handles mouse clicks
*/ */
static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, DWORD Buttons, const POINT *pt) static LRESULT SYSLINK_LButtonUp (SYSLINK_INFO *infoPtr, const POINT *pt)
{ {
if(infoPtr->MouseDownID > -1) if(infoPtr->MouseDownID > -1)
{ {
@ -1601,14 +1601,14 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
POINT pt; POINT pt;
pt.x = (short)LOWORD(lParam); pt.x = (short)LOWORD(lParam);
pt.y = (short)HIWORD(lParam); pt.y = (short)HIWORD(lParam);
return SYSLINK_LButtonDown(infoPtr, wParam, &pt); return SYSLINK_LButtonDown(infoPtr, &pt);
} }
case WM_LBUTTONUP: case WM_LBUTTONUP:
{ {
POINT pt; POINT pt;
pt.x = (short)LOWORD(lParam); pt.x = (short)LOWORD(lParam);
pt.y = (short)HIWORD(lParam); pt.y = (short)HIWORD(lParam);
return SYSLINK_LButtonUp(infoPtr, wParam, &pt); return SYSLINK_LButtonUp(infoPtr, &pt);
} }
case WM_KEYDOWN: case WM_KEYDOWN:
@ -1694,10 +1694,10 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
return SYSLINK_GetIdealHeight(infoPtr); return SYSLINK_GetIdealHeight(infoPtr);
case WM_SETFOCUS: case WM_SETFOCUS:
return SYSLINK_SetFocus(infoPtr, (HWND)wParam); return SYSLINK_SetFocus(infoPtr);
case WM_KILLFOCUS: case WM_KILLFOCUS:
return SYSLINK_KillFocus(infoPtr, (HWND)wParam); return SYSLINK_KillFocus(infoPtr);
case WM_ENABLE: case WM_ENABLE:
infoPtr->Style &= ~WS_DISABLED; infoPtr->Style &= ~WS_DISABLED;

View file

@ -916,7 +916,7 @@ static LRESULT TAB_AdjustRect(const TAB_INFO *infoPtr, WPARAM fLarger, LPRECT pr
* This method will handle the notification from the scroll control and * This method will handle the notification from the scroll control and
* perform the scrolling operation on the tab control. * perform the scrolling operation on the tab control.
*/ */
static LRESULT TAB_OnHScroll(TAB_INFO *infoPtr, int nScrollCode, int nPos, HWND hwndScroll) static LRESULT TAB_OnHScroll(TAB_INFO *infoPtr, int nScrollCode, int nPos)
{ {
if(nScrollCode == SB_THUMBPOSITION && nPos != infoPtr->leftmostVisible) if(nScrollCode == SB_THUMBPOSITION && nPos != infoPtr->leftmostVisible)
{ {
@ -2936,7 +2936,7 @@ static inline LRESULT TAB_Size (TAB_INFO *infoPtr)
} }
static LRESULT TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT TAB_Create (HWND hwnd, LPARAM lParam)
{ {
TAB_INFO *infoPtr; TAB_INFO *infoPtr;
TEXTMETRICW fontMetrics; TEXTMETRICW fontMetrics;
@ -3076,7 +3076,7 @@ static LRESULT theme_changed(const TAB_INFO *infoPtr)
return 0; return 0;
} }
static LRESULT TAB_NCCalcSize(HWND hwnd, WPARAM wParam, LPARAM lParam) static LRESULT TAB_NCCalcSize(WPARAM wParam)
{ {
if (!wParam) if (!wParam)
return 0; return 0;
@ -3211,7 +3211,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TAB_SetFont (infoPtr, (HFONT)wParam); return TAB_SetFont (infoPtr, (HFONT)wParam);
case WM_CREATE: case WM_CREATE:
return TAB_Create (hwnd, wParam, lParam); return TAB_Create (hwnd, lParam);
case WM_NCDESTROY: case WM_NCDESTROY:
return TAB_Destroy (infoPtr); return TAB_Destroy (infoPtr);
@ -3245,7 +3245,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TAB_SetRedraw (infoPtr, (BOOL)wParam); return TAB_SetRedraw (infoPtr, (BOOL)wParam);
case WM_HSCROLL: case WM_HSCROLL:
return TAB_OnHScroll(infoPtr, (int)LOWORD(wParam), (int)HIWORD(wParam), (HWND)lParam); return TAB_OnHScroll(infoPtr, (int)LOWORD(wParam), (int)HIWORD(wParam));
case WM_STYLECHANGED: case WM_STYLECHANGED:
TAB_SetItemBounds (infoPtr); TAB_SetItemBounds (infoPtr);
@ -3270,7 +3270,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TAB_NCHitTest(infoPtr, lParam); return TAB_NCHitTest(infoPtr, lParam);
case WM_NCCALCSIZE: case WM_NCCALCSIZE:
return TAB_NCCalcSize(hwnd, wParam, lParam); return TAB_NCCalcSize(wParam);
default: default:
if (uMsg >= WM_USER && uMsg < WM_APP && !COMCTL32_IsReflectedMessage(uMsg)) if (uMsg >= WM_USER && uMsg < WM_APP && !COMCTL32_IsReflectedMessage(uMsg))

View file

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

View file

@ -368,7 +368,7 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ttnmdi.hdr.hwndFrom = hwnd; ttnmdi.hdr.hwndFrom = hwnd;
ttnmdi.hdr.idFrom = toolPtr->uId; ttnmdi.hdr.idFrom = toolPtr->uId;
ttnmdi.hdr.code = TTN_GETDISPINFOA; /* == TTN_NEEDTEXTA */ ttnmdi.hdr.code = TTN_GETDISPINFOA; /* == TTN_NEEDTEXTA */
ttnmdi.lpszText = (LPSTR)ttnmdi.szText; ttnmdi.lpszText = ttnmdi.szText;
ttnmdi.uFlags = toolPtr->uFlags; ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam; ttnmdi.lParam = toolPtr->lParam;
@ -424,7 +424,7 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ttnmdi.hdr.hwndFrom = hwnd; ttnmdi.hdr.hwndFrom = hwnd;
ttnmdi.hdr.idFrom = toolPtr->uId; ttnmdi.hdr.idFrom = toolPtr->uId;
ttnmdi.hdr.code = TTN_GETDISPINFOW; /* == TTN_NEEDTEXTW */ ttnmdi.hdr.code = TTN_GETDISPINFOW; /* == TTN_NEEDTEXTW */
ttnmdi.lpszText = (LPWSTR)ttnmdi.szText; ttnmdi.lpszText = ttnmdi.szText;
ttnmdi.uFlags = toolPtr->uFlags; ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam; ttnmdi.lParam = toolPtr->lParam;
@ -1006,7 +1006,7 @@ TOOLTIPS_CheckTool (HWND hwnd, BOOL bShowTest)
static LRESULT static LRESULT
TOOLTIPS_Activate (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_Activate (HWND hwnd, WPARAM wParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@ -1023,7 +1023,7 @@ TOOLTIPS_Activate (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_AddToolA (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@ -1114,7 +1114,7 @@ TOOLTIPS_AddToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_AddToolW (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam; LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@ -1280,7 +1280,7 @@ TOOLTIPS_DelToolCommon (HWND hwnd, TOOLTIPS_INFO *infoPtr, INT nTool)
} }
static LRESULT static LRESULT
TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_DelToolA (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@ -1302,7 +1302,7 @@ TOOLTIPS_DelToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_DelToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_DelToolW (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam; LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@ -1451,7 +1451,7 @@ TOOLTIPS_GetCurrentToolA (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_GetCurrentToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_GetCurrentToolW (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam; LPTTTOOLINFOW lpToolInfo = (LPTTTOOLINFOW)lParam;
@ -1485,7 +1485,7 @@ TOOLTIPS_GetCurrentToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_GetDelayTime (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_GetDelayTime (HWND hwnd, WPARAM wParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@ -1510,7 +1510,7 @@ TOOLTIPS_GetDelayTime (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_GetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_GetMargin (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPRECT lpRect = (LPRECT)lParam; LPRECT lpRect = (LPRECT)lParam;
@ -1600,7 +1600,7 @@ TOOLTIPS_GetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
static inline LRESULT static inline LRESULT
TOOLTIPS_GetToolCount (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_GetToolCount (HWND hwnd)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
return infoPtr->uNumTools; return infoPtr->uNumTools;
@ -1608,7 +1608,7 @@ TOOLTIPS_GetToolCount (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_GetToolInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_GetToolInfoA (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@ -1717,7 +1717,7 @@ TOOLTIPS_HitTestA (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_HitTestW (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_HitTestW (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTHITTESTINFOW lptthit = (LPTTHITTESTINFOW)lParam; LPTTHITTESTINFOW lptthit = (LPTTHITTESTINFOW)lParam;
@ -1800,7 +1800,7 @@ TOOLTIPS_NewToolRectW (HWND hwnd, WPARAM wParam, LPARAM lParam)
static inline LRESULT static inline LRESULT
TOOLTIPS_Pop (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_Pop (HWND hwnd)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
TOOLTIPS_Hide (hwnd, infoPtr); TOOLTIPS_Hide (hwnd, infoPtr);
@ -1918,7 +1918,7 @@ TOOLTIPS_SetDelayTime (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_SetMargin (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_SetMargin (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPRECT lpRect = (LPRECT)lParam; LPRECT lpRect = (LPRECT)lParam;
@ -1956,7 +1956,7 @@ TOOLTIPS_SetTipBkColor (HWND hwnd, WPARAM wParam, LPARAM lParam)
static inline LRESULT static inline LRESULT
TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_SetTipTextColor (HWND hwnd, WPARAM wParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
@ -2035,7 +2035,7 @@ TOOLTIPS_SetTitleW (HWND hwnd, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_SetToolInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_SetToolInfoA (HWND hwnd, LPARAM lParam)
{ {
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam; LPTTTOOLINFOA lpToolInfo = (LPTTTOOLINFOA)lParam;
@ -2697,19 +2697,19 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch (uMsg) switch (uMsg)
{ {
case TTM_ACTIVATE: case TTM_ACTIVATE:
return TOOLTIPS_Activate (hwnd, wParam, lParam); return TOOLTIPS_Activate (hwnd, wParam);
case TTM_ADDTOOLA: case TTM_ADDTOOLA:
return TOOLTIPS_AddToolA (hwnd, wParam, lParam); return TOOLTIPS_AddToolA (hwnd, lParam);
case TTM_ADDTOOLW: case TTM_ADDTOOLW:
return TOOLTIPS_AddToolW (hwnd, wParam, lParam); return TOOLTIPS_AddToolW (hwnd, lParam);
case TTM_DELTOOLA: case TTM_DELTOOLA:
return TOOLTIPS_DelToolA (hwnd, wParam, lParam); return TOOLTIPS_DelToolA (hwnd, lParam);
case TTM_DELTOOLW: case TTM_DELTOOLW:
return TOOLTIPS_DelToolW (hwnd, wParam, lParam); return TOOLTIPS_DelToolW (hwnd, lParam);
case TTM_ENUMTOOLSA: case TTM_ENUMTOOLSA:
return TOOLTIPS_EnumToolsA (hwnd, wParam, lParam); return TOOLTIPS_EnumToolsA (hwnd, wParam, lParam);
@ -2724,13 +2724,13 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_GetCurrentToolA (hwnd, wParam, lParam); return TOOLTIPS_GetCurrentToolA (hwnd, wParam, lParam);
case TTM_GETCURRENTTOOLW: case TTM_GETCURRENTTOOLW:
return TOOLTIPS_GetCurrentToolW (hwnd, wParam, lParam); return TOOLTIPS_GetCurrentToolW (hwnd, lParam);
case TTM_GETDELAYTIME: case TTM_GETDELAYTIME:
return TOOLTIPS_GetDelayTime (hwnd, wParam, lParam); return TOOLTIPS_GetDelayTime (hwnd, wParam);
case TTM_GETMARGIN: case TTM_GETMARGIN:
return TOOLTIPS_GetMargin (hwnd, wParam, lParam); return TOOLTIPS_GetMargin (hwnd, lParam);
case TTM_GETMAXTIPWIDTH: case TTM_GETMAXTIPWIDTH:
return TOOLTIPS_GetMaxTipWidth (hwnd, wParam, lParam); return TOOLTIPS_GetMaxTipWidth (hwnd, wParam, lParam);
@ -2748,10 +2748,10 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_GetTipTextColor (hwnd, wParam, lParam); return TOOLTIPS_GetTipTextColor (hwnd, wParam, lParam);
case TTM_GETTOOLCOUNT: case TTM_GETTOOLCOUNT:
return TOOLTIPS_GetToolCount (hwnd, wParam, lParam); return TOOLTIPS_GetToolCount (hwnd);
case TTM_GETTOOLINFOA: case TTM_GETTOOLINFOA:
return TOOLTIPS_GetToolInfoA (hwnd, wParam, lParam); return TOOLTIPS_GetToolInfoA (hwnd, lParam);
case TTM_GETTOOLINFOW: case TTM_GETTOOLINFOW:
return TOOLTIPS_GetToolInfoW (hwnd, wParam, lParam); return TOOLTIPS_GetToolInfoW (hwnd, wParam, lParam);
@ -2760,7 +2760,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_HitTestA (hwnd, wParam, lParam); return TOOLTIPS_HitTestA (hwnd, wParam, lParam);
case TTM_HITTESTW: case TTM_HITTESTW:
return TOOLTIPS_HitTestW (hwnd, wParam, lParam); return TOOLTIPS_HitTestW (hwnd, lParam);
case TTM_NEWTOOLRECTA: case TTM_NEWTOOLRECTA:
return TOOLTIPS_NewToolRectA (hwnd, wParam, lParam); return TOOLTIPS_NewToolRectA (hwnd, wParam, lParam);
@ -2769,7 +2769,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_NewToolRectW (hwnd, wParam, lParam); return TOOLTIPS_NewToolRectW (hwnd, wParam, lParam);
case TTM_POP: case TTM_POP:
return TOOLTIPS_Pop (hwnd, wParam, lParam); return TOOLTIPS_Pop (hwnd);
case TTM_RELAYEVENT: case TTM_RELAYEVENT:
return TOOLTIPS_RelayEvent (hwnd, wParam, lParam); return TOOLTIPS_RelayEvent (hwnd, wParam, lParam);
@ -2778,7 +2778,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_SetDelayTime (hwnd, wParam, lParam); return TOOLTIPS_SetDelayTime (hwnd, wParam, lParam);
case TTM_SETMARGIN: case TTM_SETMARGIN:
return TOOLTIPS_SetMargin (hwnd, wParam, lParam); return TOOLTIPS_SetMargin (hwnd, lParam);
case TTM_SETMAXTIPWIDTH: case TTM_SETMAXTIPWIDTH:
return TOOLTIPS_SetMaxTipWidth (hwnd, wParam, lParam); return TOOLTIPS_SetMaxTipWidth (hwnd, wParam, lParam);
@ -2787,7 +2787,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_SetTipBkColor (hwnd, wParam, lParam); return TOOLTIPS_SetTipBkColor (hwnd, wParam, lParam);
case TTM_SETTIPTEXTCOLOR: case TTM_SETTIPTEXTCOLOR:
return TOOLTIPS_SetTipTextColor (hwnd, wParam, lParam); return TOOLTIPS_SetTipTextColor (hwnd, wParam);
case TTM_SETTITLEA: case TTM_SETTITLEA:
return TOOLTIPS_SetTitleA (hwnd, wParam, lParam); return TOOLTIPS_SetTitleA (hwnd, wParam, lParam);
@ -2796,7 +2796,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TOOLTIPS_SetTitleW (hwnd, wParam, lParam); return TOOLTIPS_SetTitleW (hwnd, wParam, lParam);
case TTM_SETTOOLINFOA: case TTM_SETTOOLINFOA:
return TOOLTIPS_SetToolInfoA (hwnd, wParam, lParam); return TOOLTIPS_SetToolInfoA (hwnd, lParam);
case TTM_SETTOOLINFOW: case TTM_SETTOOLINFOW:
return TOOLTIPS_SetToolInfoW (hwnd, wParam, lParam); return TOOLTIPS_SetToolInfoW (hwnd, wParam, lParam);

View file

@ -1112,7 +1112,7 @@ TREEVIEW_DoSetItemT(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem,
if (tvItem->mask & TVIF_TEXT) if (tvItem->mask & TVIF_TEXT)
{ {
wineItem->textWidth = 0; /* force width recalculation */ wineItem->textWidth = 0; /* force width recalculation */
if (tvItem->pszText != LPSTR_TEXTCALLBACKW) /* covers != TEXTCALLBACKA too */ if (tvItem->pszText != LPSTR_TEXTCALLBACKW && tvItem->pszText != NULL) /* covers != TEXTCALLBACKA too, and undocumented: pszText of NULL also means TEXTCALLBACK */
{ {
int len; int len;
LPWSTR newText; LPWSTR newText;

View file

@ -570,7 +570,7 @@ static HWND UPDOWN_SetBuddy (UPDOWN_INFO* infoPtr, HWND bud)
good to break the window proc chain. */ good to break the window proc chain. */
if (!GetPropW(bud, BUDDY_SUPERCLASS_WNDPROC)) { if (!GetPropW(bud, BUDDY_SUPERCLASS_WNDPROC)) {
baseWndProc = (WNDPROC)SetWindowLongPtrW(bud, GWLP_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc); baseWndProc = (WNDPROC)SetWindowLongPtrW(bud, GWLP_WNDPROC, (LPARAM)UPDOWN_Buddy_SubclassProc);
SetPropW(bud, BUDDY_SUPERCLASS_WNDPROC, (HANDLE)baseWndProc); SetPropW(bud, BUDDY_SUPERCLASS_WNDPROC, baseWndProc);
} }
} }