mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 17:12:58 +00:00
comctl32 auto-winesync
svn path=/trunk/; revision=24806
This commit is contained in:
parent
2de78f3052
commit
b1d908abe5
30 changed files with 1110 additions and 990 deletions
|
@ -33,7 +33,6 @@
|
||||||
* - check for the 'rec ' list in some AVI files
|
* - check for the 'rec ' list in some AVI files
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define COM_NO_WINDOWS_H
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
|
@ -498,16 +497,16 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
||||||
|
|
||||||
mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->mah, sizeof(infoPtr->mah));
|
mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->mah, sizeof(infoPtr->mah));
|
||||||
|
|
||||||
TRACE("mah.dwMicroSecPerFrame=%ld\n", infoPtr->mah.dwMicroSecPerFrame);
|
TRACE("mah.dwMicroSecPerFrame=%d\n", infoPtr->mah.dwMicroSecPerFrame);
|
||||||
TRACE("mah.dwMaxBytesPerSec=%ld\n", infoPtr->mah.dwMaxBytesPerSec);
|
TRACE("mah.dwMaxBytesPerSec=%d\n", infoPtr->mah.dwMaxBytesPerSec);
|
||||||
TRACE("mah.dwPaddingGranularity=%ld\n", infoPtr->mah.dwPaddingGranularity);
|
TRACE("mah.dwPaddingGranularity=%d\n", infoPtr->mah.dwPaddingGranularity);
|
||||||
TRACE("mah.dwFlags=%ld\n", infoPtr->mah.dwFlags);
|
TRACE("mah.dwFlags=%d\n", infoPtr->mah.dwFlags);
|
||||||
TRACE("mah.dwTotalFrames=%ld\n", infoPtr->mah.dwTotalFrames);
|
TRACE("mah.dwTotalFrames=%d\n", infoPtr->mah.dwTotalFrames);
|
||||||
TRACE("mah.dwInitialFrames=%ld\n", infoPtr->mah.dwInitialFrames);
|
TRACE("mah.dwInitialFrames=%d\n", infoPtr->mah.dwInitialFrames);
|
||||||
TRACE("mah.dwStreams=%ld\n", infoPtr->mah.dwStreams);
|
TRACE("mah.dwStreams=%d\n", infoPtr->mah.dwStreams);
|
||||||
TRACE("mah.dwSuggestedBufferSize=%ld\n", infoPtr->mah.dwSuggestedBufferSize);
|
TRACE("mah.dwSuggestedBufferSize=%d\n", infoPtr->mah.dwSuggestedBufferSize);
|
||||||
TRACE("mah.dwWidth=%ld\n", infoPtr->mah.dwWidth);
|
TRACE("mah.dwWidth=%d\n", infoPtr->mah.dwWidth);
|
||||||
TRACE("mah.dwHeight=%ld\n", infoPtr->mah.dwHeight);
|
TRACE("mah.dwHeight=%d\n", infoPtr->mah.dwHeight);
|
||||||
|
|
||||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||||
|
|
||||||
|
@ -533,17 +532,17 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
||||||
HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
||||||
LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
|
LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
|
||||||
HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
|
HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
|
||||||
TRACE("ash.dwFlags=%ld\n", infoPtr->ash.dwFlags);
|
TRACE("ash.dwFlags=%d\n", infoPtr->ash.dwFlags);
|
||||||
TRACE("ash.wPriority=%d\n", infoPtr->ash.wPriority);
|
TRACE("ash.wPriority=%d\n", infoPtr->ash.wPriority);
|
||||||
TRACE("ash.wLanguage=%d\n", infoPtr->ash.wLanguage);
|
TRACE("ash.wLanguage=%d\n", infoPtr->ash.wLanguage);
|
||||||
TRACE("ash.dwInitialFrames=%ld\n", infoPtr->ash.dwInitialFrames);
|
TRACE("ash.dwInitialFrames=%d\n", infoPtr->ash.dwInitialFrames);
|
||||||
TRACE("ash.dwScale=%ld\n", infoPtr->ash.dwScale);
|
TRACE("ash.dwScale=%d\n", infoPtr->ash.dwScale);
|
||||||
TRACE("ash.dwRate=%ld\n", infoPtr->ash.dwRate);
|
TRACE("ash.dwRate=%d\n", infoPtr->ash.dwRate);
|
||||||
TRACE("ash.dwStart=%ld\n", infoPtr->ash.dwStart);
|
TRACE("ash.dwStart=%d\n", infoPtr->ash.dwStart);
|
||||||
TRACE("ash.dwLength=%ld\n", infoPtr->ash.dwLength);
|
TRACE("ash.dwLength=%d\n", infoPtr->ash.dwLength);
|
||||||
TRACE("ash.dwSuggestedBufferSize=%ld\n", infoPtr->ash.dwSuggestedBufferSize);
|
TRACE("ash.dwSuggestedBufferSize=%d\n", infoPtr->ash.dwSuggestedBufferSize);
|
||||||
TRACE("ash.dwQuality=%ld\n", infoPtr->ash.dwQuality);
|
TRACE("ash.dwQuality=%d\n", infoPtr->ash.dwQuality);
|
||||||
TRACE("ash.dwSampleSize=%ld\n", infoPtr->ash.dwSampleSize);
|
TRACE("ash.dwSampleSize=%d\n", infoPtr->ash.dwSampleSize);
|
||||||
TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
|
TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
|
||||||
infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
|
infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
|
||||||
|
|
||||||
|
@ -563,17 +562,17 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
||||||
|
|
||||||
mmioRead(infoPtr->hMMio, (LPSTR)infoPtr->inbih, mmckInfo.cksize);
|
mmioRead(infoPtr->hMMio, (LPSTR)infoPtr->inbih, mmckInfo.cksize);
|
||||||
|
|
||||||
TRACE("bih.biSize=%ld\n", infoPtr->inbih->biSize);
|
TRACE("bih.biSize=%d\n", infoPtr->inbih->biSize);
|
||||||
TRACE("bih.biWidth=%ld\n", infoPtr->inbih->biWidth);
|
TRACE("bih.biWidth=%d\n", infoPtr->inbih->biWidth);
|
||||||
TRACE("bih.biHeight=%ld\n", infoPtr->inbih->biHeight);
|
TRACE("bih.biHeight=%d\n", infoPtr->inbih->biHeight);
|
||||||
TRACE("bih.biPlanes=%d\n", infoPtr->inbih->biPlanes);
|
TRACE("bih.biPlanes=%d\n", infoPtr->inbih->biPlanes);
|
||||||
TRACE("bih.biBitCount=%d\n", infoPtr->inbih->biBitCount);
|
TRACE("bih.biBitCount=%d\n", infoPtr->inbih->biBitCount);
|
||||||
TRACE("bih.biCompression=%ld\n", infoPtr->inbih->biCompression);
|
TRACE("bih.biCompression=%d\n", infoPtr->inbih->biCompression);
|
||||||
TRACE("bih.biSizeImage=%ld\n", infoPtr->inbih->biSizeImage);
|
TRACE("bih.biSizeImage=%d\n", infoPtr->inbih->biSizeImage);
|
||||||
TRACE("bih.biXPelsPerMeter=%ld\n", infoPtr->inbih->biXPelsPerMeter);
|
TRACE("bih.biXPelsPerMeter=%d\n", infoPtr->inbih->biXPelsPerMeter);
|
||||||
TRACE("bih.biYPelsPerMeter=%ld\n", infoPtr->inbih->biYPelsPerMeter);
|
TRACE("bih.biYPelsPerMeter=%d\n", infoPtr->inbih->biYPelsPerMeter);
|
||||||
TRACE("bih.biClrUsed=%ld\n", infoPtr->inbih->biClrUsed);
|
TRACE("bih.biClrUsed=%d\n", infoPtr->inbih->biClrUsed);
|
||||||
TRACE("bih.biClrImportant=%ld\n", infoPtr->inbih->biClrImportant);
|
TRACE("bih.biClrImportant=%d\n", infoPtr->inbih->biClrImportant);
|
||||||
|
|
||||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||||
|
|
||||||
|
@ -616,11 +615,11 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
||||||
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
||||||
}
|
}
|
||||||
if (numFrame != infoPtr->mah.dwTotalFrames) {
|
if (numFrame != infoPtr->mah.dwTotalFrames) {
|
||||||
WARN("Found %ld frames (/%ld)\n", numFrame, infoPtr->mah.dwTotalFrames);
|
WARN("Found %d frames (/%d)\n", numFrame, infoPtr->mah.dwTotalFrames);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (insize > infoPtr->ash.dwSuggestedBufferSize) {
|
if (insize > infoPtr->ash.dwSuggestedBufferSize) {
|
||||||
WARN("insize=%ld suggestedSize=%ld\n", insize, infoPtr->ash.dwSuggestedBufferSize);
|
WARN("insize=%d suggestedSize=%d\n", insize, infoPtr->ash.dwSuggestedBufferSize);
|
||||||
infoPtr->ash.dwSuggestedBufferSize = insize;
|
infoPtr->ash.dwSuggestedBufferSize = insize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -801,7 +800,7 @@ static BOOL ANIMATE_Create(HWND hWnd, LPCREATESTRUCTW lpcs)
|
||||||
infoPtr->hbmPrevFrame = 0;
|
infoPtr->hbmPrevFrame = 0;
|
||||||
infoPtr->dwStyle = lpcs->style;
|
infoPtr->dwStyle = lpcs->style;
|
||||||
|
|
||||||
TRACE("Animate style=0x%08lx, parent=%p\n", infoPtr->dwStyle, infoPtr->hwndNotify);
|
TRACE("Animate style=0x%08x, parent=%p\n", infoPtr->dwStyle, infoPtr->hwndNotify);
|
||||||
|
|
||||||
InitializeCriticalSection(&infoPtr->cs);
|
InitializeCriticalSection(&infoPtr->cs);
|
||||||
|
|
||||||
|
@ -844,7 +843,7 @@ static BOOL ANIMATE_EraseBackground(ANIMATE_INFO *infoPtr, HDC hdc)
|
||||||
|
|
||||||
static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT lpss)
|
static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT lpss)
|
||||||
{
|
{
|
||||||
TRACE("(styletype=%x, styleOld=0x%08lx, styleNew=0x%08lx)\n",
|
TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||||
|
|
||||||
if (wStyleType != GWL_STYLE) return 0;
|
if (wStyleType != GWL_STYLE) return 0;
|
||||||
|
|
|
@ -352,7 +352,7 @@ static void COMBOEX_GetComboFontSize (COMBOEX_INFO *infoPtr, SIZE *size)
|
||||||
GetTextExtentPointW (mydc, strA, 1, size);
|
GetTextExtentPointW (mydc, strA, 1, size);
|
||||||
SelectObject (mydc, ofont);
|
SelectObject (mydc, ofont);
|
||||||
ReleaseDC (0, mydc);
|
ReleaseDC (0, mydc);
|
||||||
TRACE("selected font hwnd=%p, height=%ld\n", nfont, size->cy);
|
TRACE("selected font hwnd=%p, height=%d\n", nfont, size->cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -406,13 +406,13 @@ static void COMBOEX_AdjustEditPos (COMBOEX_INFO *infoPtr)
|
||||||
|
|
||||||
/* reposition the Edit control based on whether icon exists */
|
/* reposition the Edit control based on whether icon exists */
|
||||||
COMBOEX_GetComboFontSize (infoPtr, &mysize);
|
COMBOEX_GetComboFontSize (infoPtr, &mysize);
|
||||||
TRACE("Combo font x=%ld, y=%ld\n", mysize.cx, mysize.cy);
|
TRACE("Combo font x=%d, y=%d\n", mysize.cx, mysize.cy);
|
||||||
x = xioff + CBE_STARTOFFSET + 1;
|
x = xioff + CBE_STARTOFFSET + 1;
|
||||||
w = rect.right-rect.left - x - GetSystemMetrics(SM_CXVSCROLL) - 1;
|
w = rect.right-rect.left - x - GetSystemMetrics(SM_CXVSCROLL) - 1;
|
||||||
h = mysize.cy + 1;
|
h = mysize.cy + 1;
|
||||||
y = rect.bottom - h - 1;
|
y = rect.bottom - h - 1;
|
||||||
|
|
||||||
TRACE("Combo client (%ld,%ld)-(%ld,%ld), setting Edit to (%d,%d)-(%d,%d)\n",
|
TRACE("Combo client (%d,%d)-(%d,%d), setting Edit to (%d,%d)-(%d,%d)\n",
|
||||||
rect.left, rect.top, rect.right, rect.bottom, x, y, x + w, y + h);
|
rect.left, rect.top, rect.right, rect.bottom, x, y, x + w, y + h);
|
||||||
SetWindowPos(infoPtr->hwndEdit, HWND_TOP, x, y, w, h,
|
SetWindowPos(infoPtr->hwndEdit, HWND_TOP, x, y, w, h,
|
||||||
SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
|
SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
|
||||||
|
@ -429,7 +429,7 @@ static void COMBOEX_ReSize (COMBOEX_INFO *infoPtr)
|
||||||
cy = mysize.cy + CBE_EXTRA;
|
cy = mysize.cy + CBE_EXTRA;
|
||||||
if (infoPtr->himl && ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo)) {
|
if (infoPtr->himl && ImageList_GetImageInfo(infoPtr->himl, 0, &iinfo)) {
|
||||||
cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy);
|
cy = max (iinfo.rcImage.bottom - iinfo.rcImage.top, cy);
|
||||||
TRACE("upgraded height due to image: height=%ld\n", cy);
|
TRACE("upgraded height due to image: height=%d\n", cy);
|
||||||
}
|
}
|
||||||
SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)cy);
|
SendMessageW (infoPtr->hwndSelf, CB_SETITEMHEIGHT, (WPARAM)-1, (LPARAM)cy);
|
||||||
if (infoPtr->hwndCombo) {
|
if (infoPtr->hwndCombo) {
|
||||||
|
@ -712,7 +712,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
|
||||||
{
|
{
|
||||||
DWORD dwTemp;
|
DWORD dwTemp;
|
||||||
|
|
||||||
TRACE("(mask=x%08lx, style=0x%08lx)\n", mask, style);
|
TRACE("(mask=x%08x, style=0x%08x)\n", mask, style);
|
||||||
|
|
||||||
dwTemp = infoPtr->dwExtStyle;
|
dwTemp = infoPtr->dwExtStyle;
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
|
||||||
mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;
|
mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;
|
||||||
if ((infoPtr->dwExtStyle & mask) != (dwTemp & mask)) {
|
if ((infoPtr->dwExtStyle & mask) != (dwTemp & mask)) {
|
||||||
/* if state of EX_NOEDITIMAGE changes, invalidate all */
|
/* if state of EX_NOEDITIMAGE changes, invalidate all */
|
||||||
TRACE("EX_NOEDITIMAGE state changed to %ld\n",
|
TRACE("EX_NOEDITIMAGE state changed to %d\n",
|
||||||
infoPtr->dwExtStyle & CBES_EX_NOEDITIMAGE);
|
infoPtr->dwExtStyle & CBES_EX_NOEDITIMAGE);
|
||||||
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
|
InvalidateRect (infoPtr->hwndSelf, NULL, TRUE);
|
||||||
COMBOEX_AdjustEditPos (infoPtr);
|
COMBOEX_AdjustEditPos (infoPtr);
|
||||||
|
@ -942,10 +942,10 @@ static INT COMBOEX_SetItemHeight (COMBOEX_INFO *infoPtr, INT index, UINT height)
|
||||||
height = cb_wrect.bottom-cb_wrect.top
|
height = cb_wrect.bottom-cb_wrect.top
|
||||||
+ cbx_wrect.bottom-cbx_wrect.top
|
+ cbx_wrect.bottom-cbx_wrect.top
|
||||||
- (cbx_crect.bottom-cbx_crect.top);
|
- (cbx_crect.bottom-cbx_crect.top);
|
||||||
TRACE("EX window=(%ld,%ld)-(%ld,%ld), client=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("EX window=(%d,%d)-(%d,%d), client=(%d,%d)-(%d,%d)\n",
|
||||||
cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
|
cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
|
||||||
cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
|
cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
|
||||||
TRACE("CB window=(%ld,%ld)-(%ld,%ld), EX setting=(0,0)-(%ld,%d)\n",
|
TRACE("CB window=(%d,%d)-(%d,%d), EX setting=(0,0)-(%d,%d)\n",
|
||||||
cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
|
cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
|
||||||
cbx_wrect.right-cbx_wrect.left, height);
|
cbx_wrect.right-cbx_wrect.left, height);
|
||||||
SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0,
|
SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0,
|
||||||
|
@ -994,7 +994,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
|
||||||
/* create combo box */
|
/* create combo box */
|
||||||
GetWindowRect(hwnd, &wnrc1);
|
GetWindowRect(hwnd, &wnrc1);
|
||||||
GetClientRect(hwnd, &clrc1);
|
GetClientRect(hwnd, &clrc1);
|
||||||
TRACE("EX window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("EX window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d)\n",
|
||||||
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
||||||
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom);
|
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom);
|
||||||
|
|
||||||
|
@ -1085,7 +1085,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
|
||||||
GetWindowRect(hwnd, &wnrc1);
|
GetWindowRect(hwnd, &wnrc1);
|
||||||
GetClientRect(hwnd, &clrc1);
|
GetClientRect(hwnd, &clrc1);
|
||||||
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
||||||
TRACE("EX window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) CB wnd=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("EX window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) CB wnd=(%d,%d)-(%d,%d)\n",
|
||||||
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
||||||
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
||||||
cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
|
cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
|
||||||
|
@ -1094,7 +1094,7 @@ static LRESULT COMBOEX_Create (HWND hwnd, LPCREATESTRUCTA cs)
|
||||||
SWP_NOACTIVATE | SWP_NOREDRAW);
|
SWP_NOACTIVATE | SWP_NOREDRAW);
|
||||||
|
|
||||||
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
GetWindowRect(infoPtr->hwndCombo, &cmbwrc);
|
||||||
TRACE("CB window=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("CB window=(%d,%d)-(%d,%d)\n",
|
||||||
cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
|
cmbwrc.left, cmbwrc.top, cmbwrc.right, cmbwrc.bottom);
|
||||||
SetWindowPos(hwnd, HWND_TOP,
|
SetWindowPos(hwnd, HWND_TOP,
|
||||||
0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top,
|
0, 0, cmbwrc.right-cmbwrc.left, cmbwrc.bottom-cmbwrc.top,
|
||||||
|
@ -1343,7 +1343,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT *dis)
|
||||||
dis->CtlType, dis->CtlID);
|
dis->CtlType, dis->CtlID);
|
||||||
TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
|
TRACE("itemID=0x%08x itemAction=0x%08x itemState=0x%08x\n",
|
||||||
dis->itemID, dis->itemAction, dis->itemState);
|
dis->itemID, dis->itemAction, dis->itemState);
|
||||||
TRACE("hWnd=%p hDC=%p (%ld,%ld)-(%ld,%ld) itemData=0x%08lx\n",
|
TRACE("hWnd=%p hDC=%p (%d,%d)-(%d,%d) itemData=0x%08lx\n",
|
||||||
dis->hwndItem, dis->hDC, dis->rcItem.left,
|
dis->hwndItem, dis->hDC, dis->rcItem.left,
|
||||||
dis->rcItem.top, dis->rcItem.right, dis->rcItem.bottom,
|
dis->rcItem.top, dis->rcItem.right, dis->rcItem.bottom,
|
||||||
dis->itemData);
|
dis->itemData);
|
||||||
|
@ -1363,7 +1363,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT *dis)
|
||||||
if ( ( (dis->itemAction & ODA_FOCUS) && (dis->itemState & ODS_SELECTED)) ||
|
if ( ( (dis->itemAction & ODA_FOCUS) && (dis->itemState & ODS_SELECTED)) ||
|
||||||
( (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) && (dis->itemState & ODS_FOCUS) ) ) {
|
( (dis->itemAction & (ODA_SELECT | ODA_DRAWENTIRE)) && (dis->itemState & ODS_FOCUS) ) ) {
|
||||||
|
|
||||||
TRACE("drawing item -1 special focus, rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("drawing item -1 special focus, rect=(%d,%d)-(%d,%d)\n",
|
||||||
dis->rcItem.left, dis->rcItem.top,
|
dis->rcItem.left, dis->rcItem.top,
|
||||||
dis->rcItem.right, dis->rcItem.bottom);
|
dis->rcItem.right, dis->rcItem.bottom);
|
||||||
}
|
}
|
||||||
|
@ -1379,14 +1379,14 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT *dis)
|
||||||
edrc.left=edrc.top=edrc.right=edrc.bottom=-1;
|
edrc.left=edrc.top=edrc.right=edrc.bottom=-1;
|
||||||
if (infoPtr->hwndEdit)
|
if (infoPtr->hwndEdit)
|
||||||
GetWindowRect (infoPtr->hwndEdit, &edrc);
|
GetWindowRect (infoPtr->hwndEdit, &edrc);
|
||||||
TRACE("window rects ex=(%ld,%ld)-(%ld,%ld), cb=(%ld,%ld)-(%ld,%ld), ed=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("window rects ex=(%d,%d)-(%d,%d), cb=(%d,%d)-(%d,%d), ed=(%d,%d)-(%d,%d)\n",
|
||||||
exrc.left, exrc.top, exrc.right, exrc.bottom,
|
exrc.left, exrc.top, exrc.right, exrc.bottom,
|
||||||
cbrc.left, cbrc.top, cbrc.right, cbrc.bottom,
|
cbrc.left, cbrc.top, cbrc.right, cbrc.bottom,
|
||||||
edrc.left, edrc.top, edrc.right, edrc.bottom);
|
edrc.left, edrc.top, edrc.right, edrc.bottom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ERR("NOT drawing item -1 special focus, rect=(%ld,%ld)-(%ld,%ld), action=%08x, state=%08x\n",
|
ERR("NOT drawing item -1 special focus, rect=(%d,%d)-(%d,%d), action=%08x, state=%08x\n",
|
||||||
dis->rcItem.left, dis->rcItem.top,
|
dis->rcItem.left, dis->rcItem.top,
|
||||||
dis->rcItem.right, dis->rcItem.bottom,
|
dis->rcItem.right, dis->rcItem.bottom,
|
||||||
dis->itemAction, dis->itemState);
|
dis->itemAction, dis->itemState);
|
||||||
|
@ -1546,7 +1546,7 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT *dis)
|
||||||
rect.right = x + txtsize.cx;
|
rect.right = x + txtsize.cx;
|
||||||
rect.top = dis->rcItem.top + 1;
|
rect.top = dis->rcItem.top + 1;
|
||||||
rect.bottom = dis->rcItem.bottom - 1;
|
rect.bottom = dis->rcItem.bottom - 1;
|
||||||
TRACE("drawing item %d text, rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("drawing item %d text, rect=(%d,%d)-(%d,%d)\n",
|
||||||
dis->itemID, rect.left, rect.top, rect.right, rect.bottom);
|
dis->itemID, rect.left, rect.top, rect.right, rect.bottom);
|
||||||
ExtTextOutW (dis->hDC, x, y, ETO_OPAQUE | ETO_CLIPPED,
|
ExtTextOutW (dis->hDC, x, y, ETO_OPAQUE | ETO_CLIPPED,
|
||||||
&rect, str, len, 0);
|
&rect, str, len, 0);
|
||||||
|
@ -1626,7 +1626,7 @@ static LRESULT COMBOEX_NCCreate (HWND hwnd)
|
||||||
oldstyle = (DWORD)GetWindowLongW (hwnd, GWL_STYLE);
|
oldstyle = (DWORD)GetWindowLongW (hwnd, GWL_STYLE);
|
||||||
newstyle = oldstyle & ~(WS_VSCROLL | WS_HSCROLL | WS_BORDER);
|
newstyle = oldstyle & ~(WS_VSCROLL | WS_HSCROLL | WS_BORDER);
|
||||||
if (newstyle != oldstyle) {
|
if (newstyle != oldstyle) {
|
||||||
TRACE("req style %08lx, reseting style %08lx\n",
|
TRACE("req style %08x, reseting style %08x\n",
|
||||||
oldstyle, newstyle);
|
oldstyle, newstyle);
|
||||||
SetWindowLongW (hwnd, GWL_STYLE, newstyle);
|
SetWindowLongW (hwnd, GWL_STYLE, newstyle);
|
||||||
}
|
}
|
||||||
|
@ -1673,10 +1673,10 @@ static LRESULT COMBOEX_WindowPosChanging (COMBOEX_INFO *infoPtr, WINDOWPOS *wp)
|
||||||
|
|
||||||
TRACE("winpos=(%d,%d %dx%d) flags=0x%08x\n",
|
TRACE("winpos=(%d,%d %dx%d) flags=0x%08x\n",
|
||||||
wp->x, wp->y, wp->cx, wp->cy, wp->flags);
|
wp->x, wp->y, wp->cx, wp->cy, wp->flags);
|
||||||
TRACE("EX window=(%ld,%ld)-(%ld,%ld), client=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("EX window=(%d,%d)-(%d,%d), client=(%d,%d)-(%d,%d)\n",
|
||||||
cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
|
cbx_wrect.left, cbx_wrect.top, cbx_wrect.right, cbx_wrect.bottom,
|
||||||
cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
|
cbx_crect.left, cbx_crect.top, cbx_crect.right, cbx_crect.bottom);
|
||||||
TRACE("CB window=(%ld,%ld)-(%ld,%ld), EX setting=(0,0)-(%d,%ld)\n",
|
TRACE("CB window=(%d,%d)-(%d,%d), EX setting=(0,0)-(%d,%d)\n",
|
||||||
cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
|
cb_wrect.left, cb_wrect.top, cb_wrect.right, cb_wrect.bottom,
|
||||||
width, cb_wrect.bottom-cb_wrect.top);
|
width, cb_wrect.bottom-cb_wrect.top);
|
||||||
|
|
||||||
|
@ -1734,7 +1734,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
hDC = (HDC) wParam;
|
hDC = (HDC) wParam;
|
||||||
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
||||||
GetClientRect (hwnd, &rect);
|
GetClientRect (hwnd, &rect);
|
||||||
TRACE("erasing (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("erasing (%d,%d)-(%d,%d)\n",
|
||||||
rect.left, rect.top, rect.right, rect.bottom);
|
rect.left, rect.top, rect.right, rect.bottom);
|
||||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||||
SetBkColor (hDC, obkc);
|
SetBkColor (hDC, obkc);
|
||||||
|
@ -1938,7 +1938,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
hDC = (HDC) wParam;
|
hDC = (HDC) wParam;
|
||||||
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
||||||
GetClientRect (hwnd, &rect);
|
GetClientRect (hwnd, &rect);
|
||||||
TRACE("erasing (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("erasing (%d,%d)-(%d,%d)\n",
|
||||||
rect.left, rect.top, rect.right, rect.bottom);
|
rect.left, rect.top, rect.right, rect.bottom);
|
||||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||||
SetBkColor (hDC, obkc);
|
SetBkColor (hDC, obkc);
|
||||||
|
|
|
@ -174,7 +174,7 @@ DWORD WINAPI GetSize (LPVOID lpMem)
|
||||||
*| DWORD nMaxItems;
|
*| DWORD nMaxItems;
|
||||||
*| DWORD dwFlags;
|
*| DWORD dwFlags;
|
||||||
*| HKEY hKey;
|
*| HKEY hKey;
|
||||||
*| LPCTSTR lpszSubKey;
|
*| LPTSTR lpszSubKey;
|
||||||
*| PROC lpfnCompare;
|
*| PROC lpfnCompare;
|
||||||
*|} CREATEMRULIST, *LPCREATEMRULIST;
|
*|} CREATEMRULIST, *LPCREATEMRULIST;
|
||||||
*
|
*
|
||||||
|
@ -212,7 +212,7 @@ typedef struct tagCREATEMRULISTA
|
||||||
DWORD nMaxItems;
|
DWORD nMaxItems;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LPCSTR lpszSubKey;
|
LPSTR lpszSubKey;
|
||||||
PROC lpfnCompare;
|
PROC lpfnCompare;
|
||||||
} CREATEMRULISTA, *LPCREATEMRULISTA;
|
} CREATEMRULISTA, *LPCREATEMRULISTA;
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ typedef struct tagCREATEMRULISTW
|
||||||
DWORD nMaxItems;
|
DWORD nMaxItems;
|
||||||
DWORD dwFlags;
|
DWORD dwFlags;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
LPCWSTR lpszSubKey;
|
LPWSTR lpszSubKey;
|
||||||
PROC lpfnCompare;
|
PROC lpfnCompare;
|
||||||
} CREATEMRULISTW, *LPCREATEMRULISTW;
|
} CREATEMRULISTW, *LPCREATEMRULISTW;
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ static void MRU_SaveChanged ( LPWINEMRULIST mp )
|
||||||
if (err) {
|
if (err) {
|
||||||
ERR("error saving /%s/, err=%d\n", debugstr_w(realname), err);
|
ERR("error saving /%s/, err=%d\n", debugstr_w(realname), err);
|
||||||
}
|
}
|
||||||
TRACE("saving value for name /%s/ size=%ld\n",
|
TRACE("saving value for name /%s/ size=%d\n",
|
||||||
debugstr_w(realname), witem->size);
|
debugstr_w(realname), witem->size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -357,7 +357,7 @@ void WINAPI FreeMRUList (HANDLE hMRUList)
|
||||||
}
|
}
|
||||||
Free(mp->realMRU);
|
Free(mp->realMRU);
|
||||||
Free(mp->array);
|
Free(mp->array);
|
||||||
Free((LPWSTR)mp->extview.lpszSubKey);
|
Free(mp->extview.lpszSubKey);
|
||||||
Free(mp);
|
Free(mp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ INT WINAPI FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData,
|
||||||
if (lpRegNum && (ret != -1))
|
if (lpRegNum && (ret != -1))
|
||||||
*lpRegNum = 'a' + i;
|
*lpRegNum = 'a' + i;
|
||||||
|
|
||||||
TRACE("(%p, %p, %ld, %p) returning %d\n",
|
TRACE("(%p, %p, %d, %p) returning %d\n",
|
||||||
hList, lpData, cbData, lpRegNum, ret);
|
hList, lpData, cbData, lpRegNum, ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -497,7 +497,7 @@ INT WINAPI AddMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData)
|
||||||
mp->wineFlags |= WMRUF_CHANGED;
|
mp->wineFlags |= WMRUF_CHANGED;
|
||||||
mp->realMRU[0] = replace + 'a';
|
mp->realMRU[0] = replace + 'a';
|
||||||
|
|
||||||
TRACE("(%p, %p, %ld) adding data, /%c/ now most current\n",
|
TRACE("(%p, %p, %d) adding data, /%c/ now most current\n",
|
||||||
hList, lpData, cbData, replace+'a');
|
hList, lpData, cbData, replace+'a');
|
||||||
|
|
||||||
if (!(mp->extview.dwFlags & MRUF_DELAYED_SAVE)) {
|
if (!(mp->extview.dwFlags & MRUF_DELAYED_SAVE)) {
|
||||||
|
@ -671,7 +671,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
||||||
&newkey,
|
&newkey,
|
||||||
&dwdisp))) {
|
&dwdisp))) {
|
||||||
/* error - what to do ??? */
|
/* error - what to do ??? */
|
||||||
ERR("(%lu %lu %lx %p %s %p): Could not open key, error=%d\n",
|
ERR("(%u %u %x %p %s %p): Could not open key, error=%d\n",
|
||||||
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, err);
|
mp->extview.lpfnCompare, err);
|
||||||
|
@ -690,7 +690,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
||||||
else
|
else
|
||||||
datasize /= sizeof(WCHAR);
|
datasize /= sizeof(WCHAR);
|
||||||
|
|
||||||
TRACE("MRU list = %s, datasize = %ld\n", debugstr_w(mp->realMRU), datasize);
|
TRACE("MRU list = %s, datasize = %d\n", debugstr_w(mp->realMRU), datasize);
|
||||||
|
|
||||||
mp->cursize = datasize - 1;
|
mp->cursize = datasize - 1;
|
||||||
/* datasize now has number of items in the MRUList */
|
/* datasize now has number of items in the MRUList */
|
||||||
|
@ -716,7 +716,7 @@ static HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
|
||||||
else
|
else
|
||||||
mp->cursize = 0;
|
mp->cursize = 0;
|
||||||
|
|
||||||
TRACE("(%lu %lu %lx %p %s %p): Current Size = %ld\n",
|
TRACE("(%u %u %x %p %s %p): Current Size = %d\n",
|
||||||
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);
|
||||||
|
@ -742,7 +742,7 @@ HANDLE WINAPI CreateMRUListLazyW (LPCREATEMRULISTW lpcml, DWORD dwParam2,
|
||||||
mp = Alloc(sizeof(WINEMRULIST));
|
mp = Alloc(sizeof(WINEMRULIST));
|
||||||
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
memcpy(&mp->extview, lpcml, sizeof(CREATEMRULISTW));
|
||||||
mp->extview.lpszSubKey = Alloc((strlenW(lpcml->lpszSubKey) + 1) * sizeof(WCHAR));
|
mp->extview.lpszSubKey = Alloc((strlenW(lpcml->lpszSubKey) + 1) * sizeof(WCHAR));
|
||||||
strcpyW((LPWSTR)mp->extview.lpszSubKey, lpcml->lpszSubKey);
|
strcpyW(mp->extview.lpszSubKey, lpcml->lpszSubKey);
|
||||||
mp->isUnicode = TRUE;
|
mp->isUnicode = TRUE;
|
||||||
|
|
||||||
return CreateMRUListLazy_common(mp);
|
return CreateMRUListLazy_common(mp);
|
||||||
|
@ -779,7 +779,7 @@ HANDLE WINAPI CreateMRUListLazyA (LPCREATEMRULISTA lpcml, DWORD dwParam2,
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1, NULL, 0);
|
len = MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1, NULL, 0);
|
||||||
mp->extview.lpszSubKey = Alloc(len * sizeof(WCHAR));
|
mp->extview.lpszSubKey = Alloc(len * sizeof(WCHAR));
|
||||||
MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1,
|
MultiByteToWideChar(CP_ACP, 0, lpcml->lpszSubKey, -1,
|
||||||
(LPWSTR)mp->extview.lpszSubKey, len);
|
mp->extview.lpszSubKey, len);
|
||||||
mp->isUnicode = FALSE;
|
mp->isUnicode = FALSE;
|
||||||
return CreateMRUListLazy_common(mp);
|
return CreateMRUListLazy_common(mp);
|
||||||
}
|
}
|
||||||
|
@ -844,7 +844,7 @@ INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||||
witem = mp->array[desired];
|
witem = mp->array[desired];
|
||||||
datasize = min( witem->size, nBufferSize );
|
datasize = min( witem->size, nBufferSize );
|
||||||
memcpy( lpBuffer, &witem->datastart, datasize);
|
memcpy( lpBuffer, &witem->datastart, datasize);
|
||||||
TRACE("(%p, %d, %p, %ld): returning len=%d\n",
|
TRACE("(%p, %d, %p, %d): returning len=%d\n",
|
||||||
hList, nItemPos, lpBuffer, nBufferSize, datasize);
|
hList, nItemPos, lpBuffer, nBufferSize, datasize);
|
||||||
return datasize;
|
return datasize;
|
||||||
}
|
}
|
||||||
|
@ -878,153 +878,11 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
|
||||||
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
|
WideCharToMultiByte(CP_ACP, 0, (LPWSTR)&witem->datastart, -1,
|
||||||
lpBuffer, datasize, NULL, NULL);
|
lpBuffer, datasize, NULL, NULL);
|
||||||
}
|
}
|
||||||
TRACE("(%p, %d, %p, %ld): returning len=%d\n",
|
TRACE("(%p, %d, %p, %d): returning len=%d\n",
|
||||||
hList, nItemPos, lpBuffer, nBufferSize, datasize);
|
hList, nItemPos, lpBuffer, nBufferSize, datasize);
|
||||||
return datasize;
|
return datasize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Str_GetPtrA [COMCTL32.233]
|
|
||||||
*
|
|
||||||
* Copies a string into a destination buffer.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* lpSrc [I] Source string
|
|
||||||
* lpDest [O] Destination buffer
|
|
||||||
* nMaxLen [I] Size of buffer in characters
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* The number of characters copied.
|
|
||||||
*/
|
|
||||||
INT WINAPI Str_GetPtrA (LPCSTR lpSrc, LPSTR lpDest, INT nMaxLen)
|
|
||||||
{
|
|
||||||
INT len;
|
|
||||||
|
|
||||||
TRACE("(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
|
||||||
|
|
||||||
if (!lpDest && lpSrc)
|
|
||||||
return strlen (lpSrc);
|
|
||||||
|
|
||||||
if (nMaxLen == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (lpSrc == NULL) {
|
|
||||||
lpDest[0] = '\0';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlen (lpSrc);
|
|
||||||
if (len >= nMaxLen)
|
|
||||||
len = nMaxLen - 1;
|
|
||||||
|
|
||||||
RtlMoveMemory (lpDest, lpSrc, len);
|
|
||||||
lpDest[len] = '\0';
|
|
||||||
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Str_SetPtrA [COMCTL32.234]
|
|
||||||
*
|
|
||||||
* Makes a copy of a string, allocating memory if necessary.
|
|
||||||
*
|
|
||||||
* PARAMS
|
|
||||||
* lppDest [O] Pointer to destination string
|
|
||||||
* lpSrc [I] Source string
|
|
||||||
*
|
|
||||||
* RETURNS
|
|
||||||
* Success: TRUE
|
|
||||||
* Failure: FALSE
|
|
||||||
*
|
|
||||||
* NOTES
|
|
||||||
* Set lpSrc to NULL to free the memory allocated by a previous call
|
|
||||||
* to this function.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
|
|
||||||
{
|
|
||||||
TRACE("(%p %p)\n", lppDest, lpSrc);
|
|
||||||
|
|
||||||
if (lpSrc) {
|
|
||||||
LPSTR ptr = ReAlloc (*lppDest, strlen (lpSrc) + 1);
|
|
||||||
if (!ptr)
|
|
||||||
return FALSE;
|
|
||||||
strcpy (ptr, lpSrc);
|
|
||||||
*lppDest = ptr;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (*lppDest) {
|
|
||||||
Free (*lppDest);
|
|
||||||
*lppDest = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Str_GetPtrW [COMCTL32.235]
|
|
||||||
*
|
|
||||||
* See Str_GetPtrA.
|
|
||||||
*/
|
|
||||||
INT WINAPI Str_GetPtrW (LPCWSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
|
|
||||||
{
|
|
||||||
INT len;
|
|
||||||
|
|
||||||
TRACE("(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
|
||||||
|
|
||||||
if (!lpDest && lpSrc)
|
|
||||||
return strlenW (lpSrc);
|
|
||||||
|
|
||||||
if (nMaxLen == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (lpSrc == NULL) {
|
|
||||||
lpDest[0] = L'\0';
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
len = strlenW (lpSrc);
|
|
||||||
if (len >= nMaxLen)
|
|
||||||
len = nMaxLen - 1;
|
|
||||||
|
|
||||||
RtlMoveMemory (lpDest, lpSrc, len*sizeof(WCHAR));
|
|
||||||
lpDest[len] = L'\0';
|
|
||||||
|
|
||||||
return len;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Str_SetPtrW [COMCTL32.236]
|
|
||||||
*
|
|
||||||
* See Str_SetPtrA.
|
|
||||||
*/
|
|
||||||
BOOL WINAPI Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
|
|
||||||
{
|
|
||||||
TRACE("(%p %p)\n", lppDest, lpSrc);
|
|
||||||
|
|
||||||
if (lpSrc) {
|
|
||||||
INT len = strlenW (lpSrc) + 1;
|
|
||||||
LPWSTR ptr = ReAlloc (*lppDest, len * sizeof(WCHAR));
|
|
||||||
if (!ptr)
|
|
||||||
return FALSE;
|
|
||||||
strcpyW (ptr, lpSrc);
|
|
||||||
*lppDest = ptr;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (*lppDest) {
|
|
||||||
Free (*lppDest);
|
|
||||||
*lppDest = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* Str_GetPtrWtoA [internal]
|
* Str_GetPtrWtoA [internal]
|
||||||
*
|
*
|
||||||
|
@ -1173,7 +1031,7 @@ static LRESULT DoNotify (LPNOTIFYDATA lpNotify, UINT uCode, LPNMHDR lpHdr)
|
||||||
LPNMHDR lpNmh = NULL;
|
LPNMHDR lpNmh = NULL;
|
||||||
UINT idFrom = 0;
|
UINT idFrom = 0;
|
||||||
|
|
||||||
TRACE("(%p %p %d %p 0x%08lx)\n",
|
TRACE("(%p %p %d %p 0x%08x)\n",
|
||||||
lpNotify->hwndFrom, lpNotify->hwndTo, uCode, lpHdr,
|
lpNotify->hwndFrom, lpNotify->hwndTo, uCode, lpHdr,
|
||||||
lpNotify->dwParam5);
|
lpNotify->dwParam5);
|
||||||
|
|
||||||
|
@ -1262,7 +1120,7 @@ LRESULT WINAPI SendNotifyEx (HWND hwndTo, HWND hwndFrom, UINT uCode,
|
||||||
NOTIFYDATA notify;
|
NOTIFYDATA notify;
|
||||||
HWND hwndNotify;
|
HWND hwndNotify;
|
||||||
|
|
||||||
TRACE("(%p %p %d %p 0x%08lx)\n",
|
TRACE("(%p %p %d %p 0x%08x)\n",
|
||||||
hwndFrom, hwndTo, uCode, lpHdr, dwParam5);
|
hwndFrom, hwndTo, uCode, lpHdr, dwParam5);
|
||||||
|
|
||||||
hwndNotify = hwndTo;
|
hwndNotify = hwndTo;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
|
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
|
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
|
||||||
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
|
||||||
|
|
|
@ -110,7 +110,7 @@ static const WCHAR strCC32SubclassInfo[] = {
|
||||||
|
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||||
{
|
{
|
||||||
TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
|
TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
|
||||||
|
|
||||||
switch (fdwReason) {
|
switch (fdwReason) {
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
@ -637,7 +637,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
if (lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
|
if (lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRACE("(0x%08lx)\n", lpInitCtrls->dwICC);
|
TRACE("(0x%08x)\n", lpInitCtrls->dwICC);
|
||||||
|
|
||||||
for (cCount = 0; cCount < 32; cCount++) {
|
for (cCount = 0; cCount < 32; cCount++) {
|
||||||
dwMask = 1 << cCount;
|
dwMask = 1 << cCount;
|
||||||
|
@ -687,7 +687,7 @@ InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
FIXME("Unknown class! dwICC=0x%lX\n", dwMask);
|
FIXME("Unknown class! dwICC=0x%X\n", dwMask);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -949,7 +949,7 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
|
||||||
pdvi->dwBuildNumber = 2919;
|
pdvi->dwBuildNumber = 2919;
|
||||||
pdvi->dwPlatformID = 6304;
|
pdvi->dwPlatformID = 6304;
|
||||||
|
|
||||||
TRACE("%lu.%lu.%lu.%lu\n",
|
TRACE("%u.%u.%u.%u\n",
|
||||||
pdvi->dwMajorVersion, pdvi->dwMinorVersion,
|
pdvi->dwMajorVersion, pdvi->dwMinorVersion,
|
||||||
pdvi->dwBuildNumber, pdvi->dwPlatformID);
|
pdvi->dwBuildNumber, pdvi->dwPlatformID);
|
||||||
|
|
||||||
|
@ -1336,7 +1336,7 @@ COMCTL32_CreateToolTip(HWND hwndOwner)
|
||||||
{
|
{
|
||||||
HWND hwndToolTip;
|
HWND hwndToolTip;
|
||||||
|
|
||||||
hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0,
|
hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
|
CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
|
||||||
0, 0, 0);
|
0, 0, 0);
|
||||||
|
|
|
@ -526,7 +526,8 @@ DATETIME_ReturnFieldWidth (DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *fi
|
||||||
static const WCHAR fld_mon[] = { 'S', 'e', 'p', 't', 'e', 'm', 'b', 'e', 'r', 0 };
|
static const WCHAR fld_mon[] = { 'S', 'e', 'p', 't', 'e', 'm', 'b', 'e', 'r', 0 };
|
||||||
static const WCHAR fld_mon3[] = { 'D', 'e', 'c', 0 };
|
static const WCHAR fld_mon3[] = { 'D', 'e', 'c', 0 };
|
||||||
int spec;
|
int spec;
|
||||||
WCHAR buffer[80], *bufptr;
|
WCHAR buffer[80];
|
||||||
|
LPCWSTR bufptr;
|
||||||
SIZE size;
|
SIZE size;
|
||||||
|
|
||||||
TRACE ("%d,%d\n", infoPtr->nrFields, count);
|
TRACE ("%d,%d\n", infoPtr->nrFields, count);
|
||||||
|
@ -564,32 +565,32 @@ DATETIME_ReturnFieldWidth (DATETIME_INFO *infoPtr, HDC hdc, int count, SHORT *fi
|
||||||
case TWODIGITMINUTE:
|
case TWODIGITMINUTE:
|
||||||
case TWODIGITMONTH:
|
case TWODIGITMONTH:
|
||||||
case TWODIGITYEAR:
|
case TWODIGITYEAR:
|
||||||
bufptr = (WCHAR *)fld_d2W;
|
bufptr = fld_d2W;
|
||||||
break;
|
break;
|
||||||
case INVALIDFULLYEAR:
|
case INVALIDFULLYEAR:
|
||||||
case FULLYEAR:
|
case FULLYEAR:
|
||||||
bufptr = (WCHAR *)fld_d4W;
|
bufptr = fld_d4W;
|
||||||
break;
|
break;
|
||||||
case THREECHARDAY:
|
case THREECHARDAY:
|
||||||
bufptr = (WCHAR *)fld_day3;
|
bufptr = fld_day3;
|
||||||
break;
|
break;
|
||||||
case FULLDAY:
|
case FULLDAY:
|
||||||
bufptr = (WCHAR *)fld_day;
|
bufptr = fld_day;
|
||||||
break;
|
break;
|
||||||
case THREECHARMONTH:
|
case THREECHARMONTH:
|
||||||
bufptr = (WCHAR *)fld_mon3;
|
bufptr = fld_mon3;
|
||||||
break;
|
break;
|
||||||
case FULLMONTH:
|
case FULLMONTH:
|
||||||
bufptr = (WCHAR *)fld_mon;
|
bufptr = fld_mon;
|
||||||
break;
|
break;
|
||||||
case ONELETTERAMPM:
|
case ONELETTERAMPM:
|
||||||
bufptr = (WCHAR *)fld_am1;
|
bufptr = fld_am1;
|
||||||
break;
|
break;
|
||||||
case TWOLETTERAMPM:
|
case TWOLETTERAMPM:
|
||||||
bufptr = (WCHAR *)fld_am2;
|
bufptr = fld_am2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bufptr = (WCHAR *)fld_d1W;
|
bufptr = fld_d1W;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -667,7 +668,7 @@ DATETIME_HitTest (DATETIME_INFO *infoPtr, POINT pt)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TRACE ("%ld, %ld\n", pt.x, pt.y);
|
TRACE ("%d, %d\n", pt.x, pt.y);
|
||||||
|
|
||||||
if (PtInRect (&infoPtr->calbutton, pt)) return DTHT_MCPOPUP;
|
if (PtInRect (&infoPtr->calbutton, pt)) return DTHT_MCPOPUP;
|
||||||
if (PtInRect (&infoPtr->checkbox, pt)) return DTHT_CHECKBOX;
|
if (PtInRect (&infoPtr->checkbox, pt)) return DTHT_CHECKBOX;
|
||||||
|
@ -1095,7 +1096,7 @@ DATETIME_Size (DATETIME_INFO *infoPtr, WORD flags, INT width, INT height)
|
||||||
infoPtr->rcClient.bottom = height;
|
infoPtr->rcClient.bottom = height;
|
||||||
infoPtr->rcClient.right = width;
|
infoPtr->rcClient.right = width;
|
||||||
|
|
||||||
TRACE("Height=%ld, Width=%ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
|
TRACE("Height=%d, Width=%d\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
|
||||||
|
|
||||||
infoPtr->rcDraw = infoPtr->rcClient;
|
infoPtr->rcDraw = infoPtr->rcClient;
|
||||||
|
|
||||||
|
@ -1132,7 +1133,7 @@ DATETIME_StyleChanged(DATETIME_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT l
|
||||||
{
|
{
|
||||||
static const WCHAR buttonW[] = { 'b', 'u', 't', 't', 'o', 'n', 0 };
|
static const WCHAR buttonW[] = { 'b', 'u', 't', 't', 'o', 'n', 0 };
|
||||||
|
|
||||||
TRACE("(styletype=%x, styleOld=0x%08lx, styleNew=0x%08lx)\n",
|
TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||||
|
|
||||||
if (wStyleType != GWL_STYLE) return 0;
|
if (wStyleType != GWL_STYLE) return 0;
|
||||||
|
|
|
@ -123,7 +123,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
|
||||||
if (errCode != S_OK)
|
if (errCode != S_OK)
|
||||||
return errCode;
|
return errCode;
|
||||||
|
|
||||||
FIXME ("dwSize=%lu dwData2=%lu dwItems=%lu\n",
|
FIXME ("dwSize=%u dwData2=%u dwItems=%u\n",
|
||||||
streamData.dwSize, streamData.dwData2, streamData.dwItems);
|
streamData.dwSize, streamData.dwData2, streamData.dwItems);
|
||||||
|
|
||||||
if ( ulRead < sizeof(STREAMDATA) ||
|
if ( ulRead < sizeof(STREAMDATA) ||
|
||||||
|
@ -162,7 +162,7 @@ HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
|
||||||
|
|
||||||
/* store the handle to the dpa */
|
/* store the handle to the dpa */
|
||||||
*phDpa = hDpa;
|
*phDpa = hDpa;
|
||||||
FIXME ("new hDpa=%p, errorcode=%lx\n", hDpa, errCode);
|
FIXME ("new hDpa=%p, errorcode=%x\n", hDpa, errCode);
|
||||||
|
|
||||||
return errCode;
|
return errCode;
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ BOOL WINAPI DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD dwFlags,
|
||||||
INT nResult, i;
|
INT nResult, i;
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
|
|
||||||
TRACE("%p %p %08lx %p %p %08lx)\n",
|
TRACE("%p %p %08x %p %p %08lx)\n",
|
||||||
hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
|
hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
|
||||||
|
|
||||||
if (IsBadWritePtr (hdpa1, sizeof(*hdpa1)))
|
if (IsBadWritePtr (hdpa1, sizeof(*hdpa1)))
|
||||||
|
|
|
@ -292,7 +292,7 @@ INT WINAPI LBItemFromPt (HWND hwndLB, POINT pt, BOOL bAutoScroll)
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
DWORD dwScrollTime;
|
DWORD dwScrollTime;
|
||||||
|
|
||||||
TRACE("(%p %ld x %ld %s)\n",
|
TRACE("(%p %d x %d %s)\n",
|
||||||
hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
|
hwndLB, pt.x, pt.y, bAutoScroll ? "TRUE" : "FALSE");
|
||||||
|
|
||||||
ScreenToClient (hwndLB, &pt);
|
ScreenToClient (hwndLB, &pt);
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
* TODO:
|
* TODO:
|
||||||
* - Imagelist support (completed?)
|
* - Imagelist support (completed?)
|
||||||
* - Hottrack support (completed?)
|
* - Hottrack support (completed?)
|
||||||
* - Custom draw support (completed?)
|
|
||||||
* - Filters support (HDS_FILTER, HDI_FILTER, HDM_*FILTER*, HDN_*FILTER*)
|
* - Filters support (HDS_FILTER, HDI_FILTER, HDM_*FILTER*, HDN_*FILTER*)
|
||||||
* - New Windows Vista features
|
* - New Windows Vista features
|
||||||
*/
|
*/
|
||||||
|
@ -108,6 +107,8 @@ typedef struct
|
||||||
|
|
||||||
static BOOL HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask);
|
static BOOL HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask);
|
||||||
static void HEADER_FreeCallbackItems(HEADER_ITEM *lpItem);
|
static void HEADER_FreeCallbackItems(HEADER_ITEM *lpItem);
|
||||||
|
static LRESULT HEADER_SendNotify(HWND hwnd, UINT code, NMHDR *hdr);
|
||||||
|
static LRESULT HEADER_SendCtrlCustomDraw(HWND hwnd, DWORD dwDrawStage, HDC hdc, RECT *rect);
|
||||||
|
|
||||||
static const WCHAR themeClass[] = {'H','e','a','d','e','r',0};
|
static const WCHAR themeClass[] = {'H','e','a','d','e','r',0};
|
||||||
static WCHAR emptyString[] = {0};
|
static WCHAR emptyString[] = {0};
|
||||||
|
@ -300,24 +301,41 @@ static void HEADER_GetHotDividerRect(HWND hwnd, HEADER_INFO *infoPtr, RECT *r)
|
||||||
|
|
||||||
|
|
||||||
static INT
|
static INT
|
||||||
HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack, LRESULT lCDFlags)
|
||||||
{
|
{
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
HEADER_ITEM *phdi = &infoPtr->items[iItem];
|
HEADER_ITEM *phdi = &infoPtr->items[iItem];
|
||||||
RECT r;
|
RECT r;
|
||||||
INT oldBkMode, cxEdge = GetSystemMetrics(SM_CXEDGE);
|
INT oldBkMode;
|
||||||
HTHEME theme = GetWindowTheme (hwnd);
|
HTHEME theme = GetWindowTheme (hwnd);
|
||||||
NMCUSTOMDRAW nmcd;
|
NMCUSTOMDRAW nmcd;
|
||||||
|
|
||||||
TRACE("DrawItem(iItem %d bHotTrack %d unicode flag %d)\n", iItem, bHotTrack, (infoPtr->nNotifyFormat == NFR_UNICODE));
|
TRACE("DrawItem(iItem %d bHotTrack %d unicode flag %d)\n", iItem, bHotTrack, (infoPtr->nNotifyFormat == NFR_UNICODE));
|
||||||
|
|
||||||
if (!infoPtr->bRectsValid)
|
|
||||||
HEADER_SetItemBounds(hwnd);
|
|
||||||
|
|
||||||
r = phdi->rect;
|
r = phdi->rect;
|
||||||
if (r.right - r.left == 0)
|
if (r.right - r.left == 0)
|
||||||
return phdi->rect.right;
|
return phdi->rect.right;
|
||||||
|
|
||||||
|
/* Set the colors before sending NM_CUSTOMDRAW so that it can change them */
|
||||||
|
SetTextColor(hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
|
||||||
|
SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
|
||||||
|
|
||||||
|
if (lCDFlags & CDRF_NOTIFYITEMDRAW && !(phdi->fmt & HDF_OWNERDRAW))
|
||||||
|
{
|
||||||
|
LRESULT lCDItemFlags;
|
||||||
|
|
||||||
|
nmcd.dwDrawStage = CDDS_PREPAINT | CDDS_ITEM;
|
||||||
|
nmcd.hdc = hdc;
|
||||||
|
nmcd.dwItemSpec = iItem;
|
||||||
|
nmcd.rc = r;
|
||||||
|
nmcd.uItemState = phdi->bDown ? CDIS_SELECTED : 0;
|
||||||
|
nmcd.lItemlParam = phdi->lParam;
|
||||||
|
|
||||||
|
lCDItemFlags = HEADER_SendNotify(hwnd, NM_CUSTOMDRAW, (NMHDR *)&nmcd);
|
||||||
|
if (lCDItemFlags & CDRF_SKIPDEFAULT)
|
||||||
|
return phdi->rect.right;
|
||||||
|
}
|
||||||
|
|
||||||
if (theme != NULL) {
|
if (theme != NULL) {
|
||||||
int state = (phdi->bDown) ? HIS_PRESSED :
|
int state = (phdi->bDown) ? HIS_PRESSED :
|
||||||
(bHotTrack ? HIS_HOT : HIS_NORMAL);
|
(bHotTrack ? HIS_HOT : HIS_NORMAL);
|
||||||
|
@ -327,6 +345,8 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
&r, &r);
|
&r, &r);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
HBRUSH hbr;
|
||||||
|
|
||||||
if (GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS) {
|
if (GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS) {
|
||||||
if (phdi->bDown) {
|
if (phdi->bDown) {
|
||||||
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
|
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
|
||||||
|
@ -338,31 +358,16 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
|
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
|
||||||
|
|
||||||
|
hbr = CreateSolidBrush(GetBkColor(hdc));
|
||||||
|
FillRect(hdc, &r, hbr);
|
||||||
|
DeleteObject(hbr);
|
||||||
}
|
}
|
||||||
if (phdi->bDown) {
|
if (phdi->bDown) {
|
||||||
r.left += 2;
|
r.left += 2;
|
||||||
r.top += 2;
|
r.top += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
r.left -= cxEdge;
|
|
||||||
r.right += cxEdge;
|
|
||||||
|
|
||||||
/* Set the colors before sending NM_CUSTOMDRAW so that it can change them */
|
|
||||||
SetTextColor (hdc, (bHotTrack && !theme) ? COLOR_HIGHLIGHT : COLOR_BTNTEXT);
|
|
||||||
SetBkColor(hdc, GetSysColor(COLOR_3DFACE));
|
|
||||||
|
|
||||||
nmcd.hdr.hwndFrom = hwnd;
|
|
||||||
nmcd.hdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID);
|
|
||||||
nmcd.hdr.code = NM_CUSTOMDRAW;
|
|
||||||
nmcd.dwDrawStage = CDDS_PREPAINT | CDDS_ITEM | CDDS_ITEMPOSTERASE;
|
|
||||||
nmcd.hdc = hdc;
|
|
||||||
nmcd.dwItemSpec = iItem;
|
|
||||||
nmcd.rc = r;
|
|
||||||
nmcd.uItemState = phdi->bDown ? CDIS_SELECTED : 0;
|
|
||||||
nmcd.lItemlParam = phdi->lParam;
|
|
||||||
|
|
||||||
SendMessageW (infoPtr->hwndNotify, WM_NOTIFY, nmcd.hdr.idFrom, (LPARAM)&nmcd);
|
|
||||||
|
|
||||||
if (phdi->fmt & HDF_OWNERDRAW) {
|
if (phdi->fmt & HDF_OWNERDRAW) {
|
||||||
DRAWITEMSTRUCT dis;
|
DRAWITEMSTRUCT dis;
|
||||||
|
|
||||||
|
@ -373,7 +378,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
dis.itemState = phdi->bDown ? ODS_SELECTED : 0;
|
dis.itemState = phdi->bDown ? ODS_SELECTED : 0;
|
||||||
dis.hwndItem = hwnd;
|
dis.hwndItem = hwnd;
|
||||||
dis.hDC = hdc;
|
dis.hDC = hdc;
|
||||||
dis.rcItem = r;
|
dis.rcItem = phdi->rect;
|
||||||
dis.itemData = phdi->lParam;
|
dis.itemData = phdi->lParam;
|
||||||
oldBkMode = SetBkMode(hdc, TRANSPARENT);
|
oldBkMode = SetBkMode(hdc, TRANSPARENT);
|
||||||
SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM,
|
SendMessageW (infoPtr->hwndNotify, WM_DRAWITEM,
|
||||||
|
@ -394,18 +399,10 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
rw = r.right - r.left;
|
rw = r.right - r.left;
|
||||||
rh = r.bottom - r.top;
|
rh = r.bottom - r.top;
|
||||||
|
|
||||||
if (theme == NULL) {
|
|
||||||
HBRUSH hbr = CreateSolidBrush(GetBkColor(hdc));
|
|
||||||
RECT rcBackground = r;
|
|
||||||
|
|
||||||
rcBackground.right -= cxEdge;
|
|
||||||
rcBackground.left += cxEdge;
|
|
||||||
FillRect(hdc, &rcBackground, hbr);
|
|
||||||
DeleteObject(hbr);
|
|
||||||
}
|
|
||||||
if (phdi->fmt & HDF_STRING) {
|
if (phdi->fmt & HDF_STRING) {
|
||||||
RECT textRect;
|
RECT textRect;
|
||||||
|
|
||||||
|
SetRectEmpty(&textRect);
|
||||||
DrawTextW (hdc, phdi->pszText, -1,
|
DrawTextW (hdc, phdi->pszText, -1,
|
||||||
&textRect, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT);
|
&textRect, DT_LEFT|DT_VCENTER|DT_SINGLELINE|DT_CALCRECT);
|
||||||
cw = textRect.right - textRect.left + 2 * infoPtr->iMargin;
|
cw = textRect.right - textRect.left + 2 * infoPtr->iMargin;
|
||||||
|
@ -529,10 +526,11 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||||
{
|
{
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
HFONT hFont, hOldFont;
|
HFONT hFont, hOldFont;
|
||||||
RECT rect;
|
RECT rect, rcRest;
|
||||||
HBRUSH hbrBk;
|
HBRUSH hbrBk;
|
||||||
UINT i;
|
UINT i;
|
||||||
INT x;
|
INT x;
|
||||||
|
LRESULT lCDFlags;
|
||||||
HTHEME theme = GetWindowTheme (hwnd);
|
HTHEME theme = GetWindowTheme (hwnd);
|
||||||
|
|
||||||
if (!infoPtr->bRectsValid)
|
if (!infoPtr->bRectsValid)
|
||||||
|
@ -540,6 +538,7 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||||
|
|
||||||
/* get rect for the bar, adjusted for the border */
|
/* get rect for the bar, adjusted for the border */
|
||||||
GetClientRect (hwnd, &rect);
|
GetClientRect (hwnd, &rect);
|
||||||
|
lCDFlags = HEADER_SendCtrlCustomDraw(hwnd, CDDS_PREPAINT, hdc, &rect);
|
||||||
|
|
||||||
if (infoPtr->bDragging)
|
if (infoPtr->bDragging)
|
||||||
ImageList_DragShowNolock(FALSE);
|
ImageList_DragShowNolock(FALSE);
|
||||||
|
@ -557,21 +556,21 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||||
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
|
for (i = 0; x <= rect.right && i < infoPtr->uNumItem; i++) {
|
||||||
int idx = HEADER_OrderToIndex(hwnd,i);
|
int idx = HEADER_OrderToIndex(hwnd,i);
|
||||||
if (RectVisible(hdc, &infoPtr->items[idx].rect))
|
if (RectVisible(hdc, &infoPtr->items[idx].rect))
|
||||||
HEADER_DrawItem (hwnd, hdc, idx, infoPtr->iHotItem == i);
|
HEADER_DrawItem(hwnd, hdc, idx, infoPtr->iHotItem == idx, lCDFlags);
|
||||||
x = infoPtr->items[idx].rect.right;
|
x = infoPtr->items[idx].rect.right;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((x <= rect.right) && (infoPtr->uNumItem > 0)) {
|
rcRest = rect;
|
||||||
rect.left = x;
|
rcRest.left = x;
|
||||||
|
if ((x <= rect.right) && RectVisible(hdc, &rcRest) && (infoPtr->uNumItem > 0)) {
|
||||||
if (theme != NULL) {
|
if (theme != NULL) {
|
||||||
DrawThemeBackground (theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rect,
|
DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS)
|
if (GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS)
|
||||||
DrawEdge (hdc, &rect, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
|
DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
|
||||||
else
|
else
|
||||||
DrawEdge (hdc, &rect, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE);
|
DrawEdge (hdc, &rcRest, EDGE_ETCHED, BF_BOTTOM|BF_MIDDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,6 +580,9 @@ HEADER_Refresh (HWND hwnd, HDC hdc)
|
||||||
if (infoPtr->bDragging)
|
if (infoPtr->bDragging)
|
||||||
ImageList_DragShowNolock(TRUE);
|
ImageList_DragShowNolock(TRUE);
|
||||||
SelectObject (hdc, hOldFont);
|
SelectObject (hdc, hOldFont);
|
||||||
|
|
||||||
|
if (lCDFlags & CDRF_NOTIFYPOSTPAINT)
|
||||||
|
HEADER_SendCtrlCustomDraw(hwnd, CDDS_POSTPAINT, hdc, &rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -588,12 +590,11 @@ static void
|
||||||
HEADER_RefreshItem (HWND hwnd, HDC hdc, INT iItem)
|
HEADER_RefreshItem (HWND hwnd, HDC hdc, INT iItem)
|
||||||
{
|
{
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
HFONT hFont, hOldFont;
|
|
||||||
|
|
||||||
hFont = infoPtr->hFont ? infoPtr->hFont : GetStockObject (SYSTEM_FONT);
|
if (!infoPtr->bRectsValid)
|
||||||
hOldFont = SelectObject (hdc, hFont);
|
HEADER_SetItemBounds(hwnd);
|
||||||
HEADER_DrawItem (hwnd, hdc, iItem, infoPtr->iHotItem == iItem);
|
|
||||||
SelectObject (hdc, hOldFont);
|
InvalidateRect(hwnd, &infoPtr->items[iItem].rect, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -783,18 +784,38 @@ static UINT HEADER_NotifyCodeWtoA(UINT code)
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
HEADER_SendNotify(HWND hwnd, UINT code, NMHDR *nmhdr)
|
||||||
|
{
|
||||||
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
nmhdr->hwndFrom = hwnd;
|
||||||
|
nmhdr->idFrom = GetWindowLongPtrW (hwnd, GWLP_ID);
|
||||||
|
nmhdr->code = code;
|
||||||
|
|
||||||
|
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY,
|
||||||
|
(WPARAM)nmhdr->idFrom, (LPARAM)nmhdr);
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
HEADER_SendSimpleNotify (HWND hwnd, UINT code)
|
HEADER_SendSimpleNotify (HWND hwnd, UINT code)
|
||||||
{
|
{
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
|
||||||
NMHDR nmhdr;
|
NMHDR nmhdr;
|
||||||
|
return (BOOL)HEADER_SendNotify(hwnd, code, &nmhdr);
|
||||||
|
}
|
||||||
|
|
||||||
nmhdr.hwndFrom = hwnd;
|
static LRESULT
|
||||||
nmhdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID);
|
HEADER_SendCtrlCustomDraw(HWND hwnd, DWORD dwDrawStage, HDC hdc, RECT *rect)
|
||||||
nmhdr.code = code;
|
{
|
||||||
|
NMCUSTOMDRAW nm;
|
||||||
|
nm.dwDrawStage = dwDrawStage;
|
||||||
|
nm.hdc = hdc;
|
||||||
|
nm.rc = *rect;
|
||||||
|
nm.dwItemSpec = 0;
|
||||||
|
nm.uItemState = 0;
|
||||||
|
nm.lItemlParam = 0;
|
||||||
|
|
||||||
return (BOOL)SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
return HEADER_SendNotify(hwnd, NM_CUSTOMDRAW, (NMHDR *)&nm);
|
||||||
(WPARAM)nmhdr.idFrom, (LPARAM)&nmhdr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
|
@ -803,15 +824,13 @@ HEADER_SendNotifyWithHDItemT(HWND hwnd, UINT code, INT iItem, HDITEMW *lpItem)
|
||||||
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd);
|
||||||
NMHEADERW nmhdr;
|
NMHEADERW nmhdr;
|
||||||
|
|
||||||
nmhdr.hdr.hwndFrom = hwnd;
|
if (infoPtr->nNotifyFormat != NFR_UNICODE)
|
||||||
nmhdr.hdr.idFrom = GetWindowLongPtrW (hwnd, GWLP_ID);
|
code = HEADER_NotifyCodeWtoA(code);
|
||||||
nmhdr.hdr.code = (infoPtr->nNotifyFormat == NFR_UNICODE ? code : HEADER_NotifyCodeWtoA(code));
|
|
||||||
nmhdr.iItem = iItem;
|
nmhdr.iItem = iItem;
|
||||||
nmhdr.iButton = 0;
|
nmhdr.iButton = 0;
|
||||||
nmhdr.pitem = lpItem;
|
nmhdr.pitem = lpItem;
|
||||||
|
|
||||||
return (BOOL)SendMessageW (infoPtr->hwndNotify, WM_NOTIFY,
|
return (BOOL)HEADER_SendNotify(hwnd, code, (NMHDR *)&nmhdr);
|
||||||
(WPARAM)nmhdr.hdr.idFrom, (LPARAM)&nmhdr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
|
@ -966,12 +985,18 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam)
|
||||||
HEADER_ITEM *lpItem;
|
HEADER_ITEM *lpItem;
|
||||||
HIMAGELIST himl;
|
HIMAGELIST himl;
|
||||||
HBITMAP hMemory, hOldBitmap;
|
HBITMAP hMemory, hOldBitmap;
|
||||||
|
LRESULT lCDFlags;
|
||||||
|
RECT rc;
|
||||||
HDC hMemoryDC;
|
HDC hMemoryDC;
|
||||||
HDC hDeviceDC;
|
HDC hDeviceDC;
|
||||||
int height, width;
|
int height, width;
|
||||||
|
|
||||||
if (wParam < 0 || wParam >= infoPtr->uNumItem)
|
if (wParam < 0 || wParam >= infoPtr->uNumItem)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!infoPtr->bRectsValid)
|
||||||
|
HEADER_SetItemBounds(hwnd);
|
||||||
|
|
||||||
lpItem = &infoPtr->items[wParam];
|
lpItem = &infoPtr->items[wParam];
|
||||||
width = lpItem->rect.right - lpItem->rect.left;
|
width = lpItem->rect.right - lpItem->rect.left;
|
||||||
height = lpItem->rect.bottom - lpItem->rect.top;
|
height = lpItem->rect.bottom - lpItem->rect.top;
|
||||||
|
@ -982,7 +1007,13 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam)
|
||||||
ReleaseDC(NULL, hDeviceDC);
|
ReleaseDC(NULL, hDeviceDC);
|
||||||
hOldBitmap = SelectObject(hMemoryDC, hMemory);
|
hOldBitmap = SelectObject(hMemoryDC, hMemory);
|
||||||
SetViewportOrgEx(hMemoryDC, -lpItem->rect.left, -lpItem->rect.top, NULL);
|
SetViewportOrgEx(hMemoryDC, -lpItem->rect.left, -lpItem->rect.top, NULL);
|
||||||
HEADER_DrawItem(hwnd, hMemoryDC, wParam, FALSE);
|
|
||||||
|
GetClientRect(hwnd, &rc);
|
||||||
|
lCDFlags = HEADER_SendCtrlCustomDraw(hwnd, CDDS_PREPAINT, hMemoryDC, &rc);
|
||||||
|
HEADER_DrawItem(hwnd, hMemoryDC, wParam, FALSE, lCDFlags);
|
||||||
|
if (lCDFlags & CDRF_NOTIFYPOSTPAINT)
|
||||||
|
HEADER_SendCtrlCustomDraw(hwnd, CDDS_POSTPAINT, hMemoryDC, &rc);
|
||||||
|
|
||||||
hMemory = SelectObject(hMemoryDC, hOldBitmap);
|
hMemory = SelectObject(hMemoryDC, hOldBitmap);
|
||||||
DeleteDC(hMemoryDC);
|
DeleteDC(hMemoryDC);
|
||||||
|
|
||||||
|
@ -1525,8 +1556,8 @@ HEADER_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
UINT flags;
|
UINT flags;
|
||||||
INT nItem;
|
INT nItem;
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
|
HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
|
||||||
|
|
||||||
if ((GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS) && (flags == HHT_ONHEADER))
|
if ((GetWindowLongW (hwnd, GWL_STYLE) & HDS_BUTTONS) && (flags == HHT_ONHEADER))
|
||||||
|
@ -1548,8 +1579,8 @@ HEADER_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
INT nItem;
|
INT nItem;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
|
HEADER_InternalHitTest (hwnd, &pt, &flags, &nItem);
|
||||||
|
|
||||||
if ((dwStyle & HDS_BUTTONS) && (flags == HHT_ONHEADER)) {
|
if ((dwStyle & HDS_BUTTONS) && (flags == HHT_ONHEADER)) {
|
||||||
|
@ -1875,8 +1906,8 @@ HEADER_RButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
/* Send a Notify message */
|
/* Send a Notify message */
|
||||||
bRet = HEADER_SendSimpleNotify (hwnd, NM_RCLICK);
|
bRet = HEADER_SendSimpleNotify (hwnd, NM_RCLICK);
|
||||||
|
|
|
@ -289,7 +289,7 @@ HOTKEY_KeyDown (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
|
||||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
TRACE("() Key: %ld\n", key);
|
TRACE("() Key: %d\n", key);
|
||||||
|
|
||||||
wOldHotKey = infoPtr->HotKey;
|
wOldHotKey = infoPtr->HotKey;
|
||||||
bOldMod = infoPtr->CurrMod;
|
bOldMod = infoPtr->CurrMod;
|
||||||
|
@ -349,7 +349,7 @@ HOTKEY_KeyUp (HOTKEY_INFO *infoPtr, DWORD key, DWORD flags)
|
||||||
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
if (GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_DISABLED)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
TRACE("() Key: %ld\n", key);
|
TRACE("() Key: %d\n", key);
|
||||||
|
|
||||||
bOldMod = infoPtr->CurrMod;
|
bOldMod = infoPtr->CurrMod;
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -395,13 +395,13 @@ typedef struct tagLISTVIEW_INFO
|
||||||
|
|
||||||
/* Dump the LISTVIEW_INFO structure to the debug channel */
|
/* Dump the LISTVIEW_INFO structure to the debug channel */
|
||||||
#define LISTVIEW_DUMP(iP) do { \
|
#define LISTVIEW_DUMP(iP) do { \
|
||||||
TRACE("hwndSelf=%p, clrBk=0x%06lx, clrText=0x%06lx, clrTextBk=0x%06lx, ItemHeight=%d, ItemWidth=%d, Style=0x%08lx\n", \
|
TRACE("hwndSelf=%p, clrBk=0x%06x, clrText=0x%06x, clrTextBk=0x%06x, ItemHeight=%d, ItemWidth=%d, Style=0x%08x\n", \
|
||||||
iP->hwndSelf, iP->clrBk, iP->clrText, iP->clrTextBk, \
|
iP->hwndSelf, iP->clrBk, iP->clrText, iP->clrTextBk, \
|
||||||
iP->nItemHeight, iP->nItemWidth, iP->dwStyle); \
|
iP->nItemHeight, iP->nItemWidth, iP->dwStyle); \
|
||||||
TRACE("hwndSelf=%p, himlNor=%p, himlSml=%p, himlState=%p, Focused=%d, Hot=%d, exStyle=0x%08lx, Focus=%d\n", \
|
TRACE("hwndSelf=%p, himlNor=%p, himlSml=%p, himlState=%p, Focused=%d, Hot=%d, exStyle=0x%08x, Focus=%d\n", \
|
||||||
iP->hwndSelf, iP->himlNormal, iP->himlSmall, iP->himlState, \
|
iP->hwndSelf, iP->himlNormal, iP->himlSmall, iP->himlState, \
|
||||||
iP->nFocusedItem, iP->nHotItem, iP->dwLvExStyle, iP->bFocus ); \
|
iP->nFocusedItem, iP->nHotItem, iP->dwLvExStyle, iP->bFocus ); \
|
||||||
TRACE("hwndSelf=%p, ntmH=%d, icSz.cx=%ld, icSz.cy=%ld, icSp.cx=%ld, icSp.cy=%ld, notifyFmt=%d\n", \
|
TRACE("hwndSelf=%p, ntmH=%d, icSz.cx=%d, icSz.cy=%d, icSp.cx=%d, icSp.cy=%d, notifyFmt=%d\n", \
|
||||||
iP->hwndSelf, iP->ntmHeight, iP->iconSize.cx, iP->iconSize.cy, \
|
iP->hwndSelf, iP->ntmHeight, iP->iconSize.cx, iP->iconSize.cy, \
|
||||||
iP->iconSpacing.cx, iP->iconSpacing.cy, iP->notifyFormat); \
|
iP->iconSpacing.cx, iP->iconSpacing.cy, iP->notifyFormat); \
|
||||||
TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, wine_dbgstr_rect(&iP->rcList)); \
|
TRACE("hwndSelf=%p, rcList=%s\n", iP->hwndSelf, wine_dbgstr_rect(&iP->rcList)); \
|
||||||
|
@ -5591,7 +5591,7 @@ static BOOL LISTVIEW_GetItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lprc)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
WARN("Unknown value: %ld\n", lprc->left);
|
WARN("Unknown value: %d\n", lprc->left);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5630,7 +5630,7 @@ static BOOL LISTVIEW_GetSubItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lp
|
||||||
|
|
||||||
nColumn = lprc->top;
|
nColumn = lprc->top;
|
||||||
|
|
||||||
TRACE("(nItem=%d, nSubItem=%ld)\n", nItem, lprc->top);
|
TRACE("(nItem=%d, nSubItem=%d)\n", nItem, lprc->top);
|
||||||
/* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
|
/* On WinNT, a subitem of '0' calls LISTVIEW_GetItemRect */
|
||||||
if (lprc->top == 0)
|
if (lprc->top == 0)
|
||||||
return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
|
return LISTVIEW_GetItemRect(infoPtr, nItem, lprc);
|
||||||
|
@ -5658,7 +5658,7 @@ static BOOL LISTVIEW_GetSubItemRect(LISTVIEW_INFO *infoPtr, INT nItem, LPRECT lp
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ERR("Unknown bounds=%ld\n", lprc->left);
|
ERR("Unknown bounds=%d\n", lprc->left);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6443,7 +6443,7 @@ static BOOL LISTVIEW_Scroll(LISTVIEW_INFO *infoPtr, INT dx, INT dy)
|
||||||
*/
|
*/
|
||||||
static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
|
static BOOL LISTVIEW_SetBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrBk)
|
||||||
{
|
{
|
||||||
TRACE("(clrBk=%lx)\n", clrBk);
|
TRACE("(clrBk=%x)\n", clrBk);
|
||||||
|
|
||||||
if(infoPtr->clrBk != clrBk) {
|
if(infoPtr->clrBk != clrBk) {
|
||||||
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
|
if (infoPtr->clrBk != CLR_NONE) DeleteObject(infoPtr->hBkBrush);
|
||||||
|
@ -7016,7 +7016,7 @@ static DWORD LISTVIEW_SetIconSpacing(LISTVIEW_INFO *infoPtr, INT cx, INT cy)
|
||||||
infoPtr->iconSpacing.cx = cx;
|
infoPtr->iconSpacing.cx = cx;
|
||||||
infoPtr->iconSpacing.cy = cy;
|
infoPtr->iconSpacing.cy = cy;
|
||||||
|
|
||||||
TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%ld,%ld), ntmH=%d\n",
|
TRACE("old=(%d,%d), new=(%d,%d), iconSize=(%d,%d), ntmH=%d\n",
|
||||||
LOWORD(oldspacing), HIWORD(oldspacing), cx, cy,
|
LOWORD(oldspacing), HIWORD(oldspacing), cx, cy,
|
||||||
infoPtr->iconSize.cx, infoPtr->iconSize.cy,
|
infoPtr->iconSize.cx, infoPtr->iconSize.cy,
|
||||||
infoPtr->ntmHeight);
|
infoPtr->ntmHeight);
|
||||||
|
@ -7113,7 +7113,7 @@ static HIMAGELIST LISTVIEW_SetImageList(LISTVIEW_INFO *infoPtr, INT nType, HIMAG
|
||||||
*/
|
*/
|
||||||
static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFlags)
|
static BOOL LISTVIEW_SetItemCount(LISTVIEW_INFO *infoPtr, INT nItems, DWORD dwFlags)
|
||||||
{
|
{
|
||||||
TRACE("(nItems=%d, dwFlags=%lx)\n", nItems, dwFlags);
|
TRACE("(nItems=%d, dwFlags=%x)\n", nItems, dwFlags);
|
||||||
|
|
||||||
if (infoPtr->dwStyle & LVS_OWNERDATA)
|
if (infoPtr->dwStyle & LVS_OWNERDATA)
|
||||||
{
|
{
|
||||||
|
@ -7380,7 +7380,7 @@ static INT LISTVIEW_SetSelectionMark(LISTVIEW_INFO *infoPtr, INT nIndex)
|
||||||
*/
|
*/
|
||||||
static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrTextBk)
|
static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrTextBk)
|
||||||
{
|
{
|
||||||
TRACE("(clrTextBk=%lx)\n", clrTextBk);
|
TRACE("(clrTextBk=%x)\n", clrTextBk);
|
||||||
|
|
||||||
if (infoPtr->clrTextBk != clrTextBk)
|
if (infoPtr->clrTextBk != clrTextBk)
|
||||||
{
|
{
|
||||||
|
@ -7405,7 +7405,7 @@ static BOOL LISTVIEW_SetTextBkColor(LISTVIEW_INFO *infoPtr, COLORREF clrTextBk)
|
||||||
*/
|
*/
|
||||||
static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF clrText)
|
static BOOL LISTVIEW_SetTextColor (LISTVIEW_INFO *infoPtr, COLORREF clrText)
|
||||||
{
|
{
|
||||||
TRACE("(clrText=%lx)\n", clrText);
|
TRACE("(clrText=%x)\n", clrText);
|
||||||
|
|
||||||
if (infoPtr->clrText != clrText)
|
if (infoPtr->clrText != clrText)
|
||||||
{
|
{
|
||||||
|
@ -8116,7 +8116,7 @@ static LRESULT LISTVIEW_KeyDown(LISTVIEW_INFO *infoPtr, INT nVirtualKey, LONG lK
|
||||||
INT nItem = -1;
|
INT nItem = -1;
|
||||||
NMLVKEYDOWN nmKeyDown;
|
NMLVKEYDOWN nmKeyDown;
|
||||||
|
|
||||||
TRACE("(nVirtualKey=%d, lKeyData=%ld)\n", nVirtualKey, lKeyData);
|
TRACE("(nVirtualKey=%d, lKeyData=%d)\n", nVirtualKey, lKeyData);
|
||||||
|
|
||||||
/* send LVN_KEYDOWN notification */
|
/* send LVN_KEYDOWN notification */
|
||||||
nmKeyDown.wVKey = nVirtualKey;
|
nmKeyDown.wVKey = nVirtualKey;
|
||||||
|
@ -8583,6 +8583,12 @@ static LRESULT LISTVIEW_HeaderNotification(LISTVIEW_INFO *infoPtr, const NMHEADE
|
||||||
lpColumnInfo->rcHeader.right += dx;
|
lpColumnInfo->rcHeader.right += dx;
|
||||||
if (lpnmh->iItem + 1 < DPA_GetPtrCount(infoPtr->hdpaColumns))
|
if (lpnmh->iItem + 1 < DPA_GetPtrCount(infoPtr->hdpaColumns))
|
||||||
LISTVIEW_ScrollColumns(infoPtr, lpnmh->iItem + 1, dx);
|
LISTVIEW_ScrollColumns(infoPtr, lpnmh->iItem + 1, dx);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* only needs to update the scrolls */
|
||||||
|
infoPtr->nItemWidth += dx;
|
||||||
|
LISTVIEW_UpdateScroll(infoPtr);
|
||||||
|
}
|
||||||
LISTVIEW_UpdateItemSize(infoPtr);
|
LISTVIEW_UpdateItemSize(infoPtr);
|
||||||
if (uView == LVS_REPORT && is_redrawing(infoPtr))
|
if (uView == LVS_REPORT && is_redrawing(infoPtr))
|
||||||
{
|
{
|
||||||
|
@ -8754,7 +8760,7 @@ static LRESULT LISTVIEW_Paint(LISTVIEW_INFO *infoPtr, HDC hdc)
|
||||||
*/
|
*/
|
||||||
static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD options)
|
static LRESULT LISTVIEW_PrintClient(LISTVIEW_INFO *infoPtr, HDC hdc, DWORD options)
|
||||||
{
|
{
|
||||||
FIXME("Partial Stub: (hdc=%p options=0x%08lx)\n", hdc, options);
|
FIXME("Partial Stub: (hdc=%p options=0x%08x)\n", hdc, options);
|
||||||
|
|
||||||
if ((options & PRF_CHECKVISIBLE) && !IsWindowVisible(infoPtr->hwndSelf))
|
if ((options & PRF_CHECKVISIBLE) && !IsWindowVisible(infoPtr->hwndSelf))
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -9122,7 +9128,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
|
||||||
UINT uNewView = lpss->styleNew & LVS_TYPEMASK;
|
UINT uNewView = lpss->styleNew & LVS_TYPEMASK;
|
||||||
UINT uOldView = lpss->styleOld & LVS_TYPEMASK;
|
UINT uOldView = lpss->styleOld & LVS_TYPEMASK;
|
||||||
|
|
||||||
TRACE("(styletype=%x, styleOld=0x%08lx, styleNew=0x%08lx)\n",
|
TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||||
|
|
||||||
if (wStyleType != GWL_STYLE) return 0;
|
if (wStyleType != GWL_STYLE) return 0;
|
||||||
|
@ -9160,7 +9166,7 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
|
||||||
{
|
{
|
||||||
if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy))
|
if ((infoPtr->iconSize.cx != oldIconSize.cx) || (infoPtr->iconSize.cy != oldIconSize.cy))
|
||||||
{
|
{
|
||||||
TRACE("icon old size=(%ld,%ld), new size=(%ld,%ld)\n",
|
TRACE("icon old size=(%d,%d), new size=(%d,%d)\n",
|
||||||
oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy);
|
oldIconSize.cx, oldIconSize.cy, infoPtr->iconSize.cx, infoPtr->iconSize.cy);
|
||||||
LISTVIEW_SetIconSpacing(infoPtr, 0, 0);
|
LISTVIEW_SetIconSpacing(infoPtr, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -343,7 +343,7 @@ static void MONTHCAL_DrawDay(MONTHCAL_INFO *infoPtr, HDC hdc, int day, int month
|
||||||
RECT r2;
|
RECT r2;
|
||||||
|
|
||||||
TRACE("%d %d %d\n",day, infoPtr->minSel.wDay, infoPtr->maxSel.wDay);
|
TRACE("%d %d %d\n",day, infoPtr->minSel.wDay, infoPtr->maxSel.wDay);
|
||||||
TRACE("%ld %ld %ld %ld\n", r.left, r.top, r.right, r.bottom);
|
TRACE("%d %d %d %d\n", r.left, r.top, r.right, r.bottom);
|
||||||
oldCol = SetTextColor(hdc, infoPtr->monthbk);
|
oldCol = SetTextColor(hdc, infoPtr->monthbk);
|
||||||
oldBk = SetBkColor(hdc, infoPtr->trailingtxt);
|
oldBk = SetBkColor(hdc, infoPtr->trailingtxt);
|
||||||
hbr = GetSysColorBrush(COLOR_GRAYTEXT);
|
hbr = GetSysColorBrush(COLOR_GRAYTEXT);
|
||||||
|
@ -1342,8 +1342,8 @@ MONTHCAL_RButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
strcpyW(buf, todayW);
|
strcpyW(buf, todayW);
|
||||||
}
|
}
|
||||||
AppendMenuW(hMenu, MF_STRING|MF_ENABLED,1, buf);
|
AppendMenuW(hMenu, MF_STRING|MF_ENABLED,1, buf);
|
||||||
menupoint.x=(INT)LOWORD(lParam);
|
menupoint.x=(short)LOWORD(lParam);
|
||||||
menupoint.y=(INT)HIWORD(lParam);
|
menupoint.y=(short)HIWORD(lParam);
|
||||||
ClientToScreen(infoPtr->hwndSelf, &menupoint);
|
ClientToScreen(infoPtr->hwndSelf, &menupoint);
|
||||||
if( TrackPopupMenu(hMenu,TPM_RIGHTBUTTON| TPM_NONOTIFY|TPM_RETURNCMD,
|
if( TrackPopupMenu(hMenu,TPM_RIGHTBUTTON| TPM_NONOTIFY|TPM_RETURNCMD,
|
||||||
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL))
|
menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL))
|
||||||
|
@ -1387,8 +1387,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ht.pt.x = (INT)LOWORD(lParam);
|
ht.pt.x = (short)LOWORD(lParam);
|
||||||
ht.pt.y = (INT)HIWORD(lParam);
|
ht.pt.y = (short)HIWORD(lParam);
|
||||||
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
||||||
|
|
||||||
/* FIXME: these flags should be checked by */
|
/* FIXME: these flags should be checked by */
|
||||||
|
@ -1524,8 +1524,8 @@ MONTHCAL_LButtonUp(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
redraw = TRUE;
|
redraw = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ht.pt.x = (INT)LOWORD(lParam);
|
ht.pt.x = (short)LOWORD(lParam);
|
||||||
ht.pt.y = (INT)HIWORD(lParam);
|
ht.pt.y = (short)HIWORD(lParam);
|
||||||
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
||||||
|
|
||||||
infoPtr->status = MC_SEL_LBUTUP;
|
infoPtr->status = MC_SEL_LBUTUP;
|
||||||
|
@ -1602,8 +1602,8 @@ MONTHCAL_MouseMove(MONTHCAL_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if(!(infoPtr->status & MC_SEL_LBUTDOWN)) return 0;
|
if(!(infoPtr->status & MC_SEL_LBUTDOWN)) return 0;
|
||||||
|
|
||||||
ht.pt.x = LOWORD(lParam);
|
ht.pt.x = (short)LOWORD(lParam);
|
||||||
ht.pt.y = HIWORD(lParam);
|
ht.pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
hit = MONTHCAL_HitTest(infoPtr, (LPARAM)&ht);
|
||||||
|
|
||||||
|
|
|
@ -337,7 +337,7 @@ PAGER_GetBorder(PAGER_INFO *infoPtr)
|
||||||
static inline COLORREF
|
static inline COLORREF
|
||||||
PAGER_GetBkColor(PAGER_INFO *infoPtr)
|
PAGER_GetBkColor(PAGER_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
TRACE("[%p] returns %06lx\n", infoPtr->hwndSelf, infoPtr->clrBk);
|
TRACE("[%p] returns %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
|
||||||
return infoPtr->clrBk;
|
return infoPtr->clrBk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +654,7 @@ PAGER_SetBkColor (PAGER_INFO* infoPtr, COLORREF clrBk)
|
||||||
COLORREF clrTemp = infoPtr->clrBk;
|
COLORREF clrTemp = infoPtr->clrBk;
|
||||||
|
|
||||||
infoPtr->clrBk = clrBk;
|
infoPtr->clrBk = clrBk;
|
||||||
TRACE("[%p] %06lx\n", infoPtr->hwndSelf, infoPtr->clrBk);
|
TRACE("[%p] %06x\n", infoPtr->hwndSelf, infoPtr->clrBk);
|
||||||
|
|
||||||
/* the native control seems to do things this way */
|
/* the native control seems to do things this way */
|
||||||
SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
|
SetWindowPos(infoPtr->hwndSelf, 0, 0, 0, 0, 0,
|
||||||
|
@ -885,11 +885,11 @@ PAGER_NCCalcSize(PAGER_INFO* infoPtr, WPARAM wParam, LPRECT lpRect)
|
||||||
lpRect->bottom -= infoPtr->nButtonSize;
|
lpRect->bottom -= infoPtr->nButtonSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("nPos=%d, nHeigth=%d, window=%s\n",
|
TRACE("nPos=%d, nHeight=%d, window=%s\n",
|
||||||
infoPtr->nPos, infoPtr->nHeight,
|
infoPtr->nPos, infoPtr->nHeight,
|
||||||
wine_dbgstr_rect(&rcWindow));
|
wine_dbgstr_rect(&rcWindow));
|
||||||
|
|
||||||
TRACE("[%p] client rect set to %ldx%ld at (%ld,%ld) BtnState[%d,%d]\n",
|
TRACE("[%p] client rect set to %dx%d at (%d,%d) BtnState[%d,%d]\n",
|
||||||
infoPtr->hwndSelf, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top,
|
infoPtr->hwndSelf, lpRect->right-lpRect->left, lpRect->bottom-lpRect->top,
|
||||||
lpRect->left, lpRect->top,
|
lpRect->left, lpRect->top,
|
||||||
infoPtr->TLbtnState, infoPtr->BRbtnState);
|
infoPtr->TLbtnState, infoPtr->BRbtnState);
|
||||||
|
@ -1010,7 +1010,7 @@ PAGER_MouseMove (PAGER_INFO* infoPtr, INT keys, INT x, INT y)
|
||||||
/* If in one of the buttons the capture and draw buttons */
|
/* If in one of the buttons the capture and draw buttons */
|
||||||
if (btnrect)
|
if (btnrect)
|
||||||
{
|
{
|
||||||
TRACE("[%p] draw btn (%ld,%ld)-(%ld,%ld), Capture %s, style %08lx\n",
|
TRACE("[%p] draw btn (%d,%d)-(%d,%d), Capture %s, style %08x\n",
|
||||||
infoPtr->hwndSelf, btnrect->left, btnrect->top,
|
infoPtr->hwndSelf, btnrect->left, btnrect->top,
|
||||||
btnrect->right, btnrect->bottom,
|
btnrect->right, btnrect->bottom,
|
||||||
(infoPtr->bCapture) ? "TRUE" : "FALSE",
|
(infoPtr->bCapture) ? "TRUE" : "FALSE",
|
||||||
|
@ -1179,7 +1179,7 @@ PAGER_Timer (PAGER_INFO* infoPtr, INT nTimerId)
|
||||||
else
|
else
|
||||||
dir = (infoPtr->dwStyle & PGS_HORZ) ?
|
dir = (infoPtr->dwStyle & PGS_HORZ) ?
|
||||||
PGF_SCROLLRIGHT : PGF_SCROLLDOWN;
|
PGF_SCROLLRIGHT : PGF_SCROLLDOWN;
|
||||||
TRACE("[%p] TIMERID1: style=%08lx, dir=%d\n",
|
TRACE("[%p] TIMERID1: style=%08x, dir=%d\n",
|
||||||
infoPtr->hwndSelf, infoPtr->dwStyle, dir);
|
infoPtr->hwndSelf, infoPtr->dwStyle, dir);
|
||||||
KillTimer(infoPtr->hwndSelf, TIMERID1);
|
KillTimer(infoPtr->hwndSelf, TIMERID1);
|
||||||
SetTimer(infoPtr->hwndSelf, TIMERID1, REPEAT_DELAY, 0);
|
SetTimer(infoPtr->hwndSelf, TIMERID1, REPEAT_DELAY, 0);
|
||||||
|
@ -1241,7 +1241,7 @@ PAGER_StyleChanged(PAGER_INFO *infoPtr, WPARAM wStyleType, LPSTYLESTRUCT lpss)
|
||||||
{
|
{
|
||||||
DWORD oldStyle = infoPtr->dwStyle;
|
DWORD oldStyle = infoPtr->dwStyle;
|
||||||
|
|
||||||
TRACE("(styletype=%x, styleOld=0x%08lx, styleNew=0x%08lx)\n",
|
TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
|
||||||
wStyleType, lpss->styleOld, lpss->styleNew);
|
wStyleType, lpss->styleOld, lpss->styleNew);
|
||||||
|
|
||||||
if (wStyleType != GWL_STYLE) return 0;
|
if (wStyleType != GWL_STYLE) return 0;
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
* - Wizard 97 header resizing
|
* - Wizard 97 header resizing
|
||||||
* - Enforcing of minimal wizard size
|
* - Enforcing of minimal wizard size
|
||||||
* - Messages:
|
* - Messages:
|
||||||
* o PSM_GETRESULT
|
|
||||||
* o PSM_INSERTPAGE
|
* o PSM_INSERTPAGE
|
||||||
* o PSM_RECALCPAGESIZES
|
* o PSM_RECALCPAGESIZES
|
||||||
* o PSM_SETHEADERSUBTITLE
|
* o PSM_SETHEADERSUBTITLE
|
||||||
|
@ -122,8 +121,6 @@ typedef struct tagPropSheetInfo
|
||||||
BOOL hasApply;
|
BOOL hasApply;
|
||||||
BOOL hasFinish;
|
BOOL hasFinish;
|
||||||
BOOL useCallback;
|
BOOL useCallback;
|
||||||
BOOL restartWindows;
|
|
||||||
BOOL rebootSystem;
|
|
||||||
BOOL activeValid;
|
BOOL activeValid;
|
||||||
PropPageInfo* proppage;
|
PropPageInfo* proppage;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
|
@ -132,6 +129,7 @@ typedef struct tagPropSheetInfo
|
||||||
int height;
|
int height;
|
||||||
HIMAGELIST hImageList;
|
HIMAGELIST hImageList;
|
||||||
BOOL ended;
|
BOOL ended;
|
||||||
|
INT result;
|
||||||
} PropSheetInfo;
|
} PropSheetInfo;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -303,7 +301,7 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
|
||||||
psInfo->isModeless = dwFlags & PSH_MODELESS;
|
psInfo->isModeless = dwFlags & PSH_MODELESS;
|
||||||
|
|
||||||
memcpy(&psInfo->ppshheader,lppsh,dwSize);
|
memcpy(&psInfo->ppshheader,lppsh,dwSize);
|
||||||
TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
|
TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%d\ndwFlags\t\t%08x\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
|
||||||
lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance,
|
lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance,
|
||||||
debugstr_a(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
|
debugstr_a(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
|
||||||
|
|
||||||
|
@ -333,8 +331,7 @@ static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
|
||||||
if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
|
if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
|
||||||
psInfo->active_page = 0;
|
psInfo->active_page = 0;
|
||||||
|
|
||||||
psInfo->restartWindows = FALSE;
|
psInfo->result = 0;
|
||||||
psInfo->rebootSystem = FALSE;
|
|
||||||
psInfo->hImageList = 0;
|
psInfo->hImageList = 0;
|
||||||
psInfo->activeValid = FALSE;
|
psInfo->activeValid = FALSE;
|
||||||
|
|
||||||
|
@ -359,7 +356,7 @@ static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
|
||||||
psInfo->isModeless = dwFlags & PSH_MODELESS;
|
psInfo->isModeless = dwFlags & PSH_MODELESS;
|
||||||
|
|
||||||
memcpy(&psInfo->ppshheader,lppsh,dwSize);
|
memcpy(&psInfo->ppshheader,lppsh,dwSize);
|
||||||
TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%ld\ndwFlags\t\t%08lx\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
|
TRACE("\n** PROPSHEETHEADER **\ndwSize\t\t%d\ndwFlags\t\t%08x\nhwndParent\t%p\nhInstance\t%p\npszCaption\t'%s'\nnPages\t\t%d\npfnCallback\t%p\n",
|
||||||
lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance, debugstr_w(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
|
lppsh->dwSize, lppsh->dwFlags, lppsh->hwndParent, lppsh->hInstance, debugstr_w(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
|
||||||
|
|
||||||
PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
|
PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
|
||||||
|
@ -388,8 +385,7 @@ static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
|
||||||
if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
|
if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
|
||||||
psInfo->active_page = 0;
|
psInfo->active_page = 0;
|
||||||
|
|
||||||
psInfo->restartWindows = FALSE;
|
psInfo->result = 0;
|
||||||
psInfo->rebootSystem = FALSE;
|
|
||||||
psInfo->hImageList = 0;
|
psInfo->hImageList = 0;
|
||||||
psInfo->activeValid = FALSE;
|
psInfo->activeValid = FALSE;
|
||||||
|
|
||||||
|
@ -707,7 +703,7 @@ static BOOL PROPSHEET_SizeMismatch(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
* Original tab size.
|
* Original tab size.
|
||||||
*/
|
*/
|
||||||
GetClientRect(hwndTabCtrl, &rcOrigTab);
|
GetClientRect(hwndTabCtrl, &rcOrigTab);
|
||||||
TRACE("orig tab %ld %ld %ld %ld\n", rcOrigTab.left, rcOrigTab.top,
|
TRACE("orig tab %d %d %d %d\n", rcOrigTab.left, rcOrigTab.top,
|
||||||
rcOrigTab.right, rcOrigTab.bottom);
|
rcOrigTab.right, rcOrigTab.bottom);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -719,7 +715,7 @@ static BOOL PROPSHEET_SizeMismatch(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
rcPage.bottom = psInfo->height;
|
rcPage.bottom = psInfo->height;
|
||||||
|
|
||||||
MapDialogRect(hwndDlg, &rcPage);
|
MapDialogRect(hwndDlg, &rcPage);
|
||||||
TRACE("biggest page %ld %ld %ld %ld\n", rcPage.left, rcPage.top,
|
TRACE("biggest page %d %d %d %d\n", rcPage.left, rcPage.top,
|
||||||
rcPage.right, rcPage.bottom);
|
rcPage.right, rcPage.bottom);
|
||||||
|
|
||||||
if ( (rcPage.right - rcPage.left) != (rcOrigTab.right - rcOrigTab.left) )
|
if ( (rcPage.right - rcPage.left) != (rcOrigTab.right - rcOrigTab.left) )
|
||||||
|
@ -789,14 +785,14 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
|
|
||||||
rc.right -= rc.left;
|
rc.right -= rc.left;
|
||||||
rc.bottom -= rc.top;
|
rc.bottom -= rc.top;
|
||||||
TRACE("setting tab %p, rc (0,0)-(%ld,%ld)\n",
|
TRACE("setting tab %p, rc (0,0)-(%d,%d)\n",
|
||||||
hwndTabCtrl, rc.right, rc.bottom);
|
hwndTabCtrl, rc.right, rc.bottom);
|
||||||
SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom,
|
SetWindowPos(hwndTabCtrl, 0, 0, 0, rc.right, rc.bottom,
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
|
||||||
GetClientRect(hwndTabCtrl, &rc);
|
GetClientRect(hwndTabCtrl, &rc);
|
||||||
|
|
||||||
TRACE("tab client rc %ld %ld %ld %ld\n",
|
TRACE("tab client rc %d %d %d %d\n",
|
||||||
rc.left, rc.top, rc.right, rc.bottom);
|
rc.left, rc.top, rc.right, rc.bottom);
|
||||||
|
|
||||||
rc.right += ((padding.x * 2) + tabOffsetX);
|
rc.right += ((padding.x * 2) + tabOffsetX);
|
||||||
|
@ -805,7 +801,7 @@ static BOOL PROPSHEET_AdjustSize(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
/*
|
/*
|
||||||
* Resize the property sheet.
|
* Resize the property sheet.
|
||||||
*/
|
*/
|
||||||
TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n",
|
TRACE("setting dialog %p, rc (0,0)-(%d,%d)\n",
|
||||||
hwndDlg, rc.right, rc.bottom);
|
hwndDlg, rc.right, rc.bottom);
|
||||||
SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
|
SetWindowPos(hwndDlg, 0, 0, 0, rc.right, rc.bottom,
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
@ -829,7 +825,7 @@ static BOOL PROPSHEET_AdjustSizeWizard(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
rc.bottom = psInfo->height;
|
rc.bottom = psInfo->height;
|
||||||
MapDialogRect(hwndDlg, &rc);
|
MapDialogRect(hwndDlg, &rc);
|
||||||
|
|
||||||
TRACE("Biggest page %ld %ld %ld %ld\n", rc.left, rc.top, rc.right, rc.bottom);
|
TRACE("Biggest page %d %d %d %d\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||||
|
|
||||||
/* Add space for the buttons row */
|
/* Add space for the buttons row */
|
||||||
GetWindowRect(hwndLine, &lineRect);
|
GetWindowRect(hwndLine, &lineRect);
|
||||||
|
@ -841,7 +837,7 @@ static BOOL PROPSHEET_AdjustSizeWizard(HWND hwndDlg, PropSheetInfo* psInfo)
|
||||||
AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE);
|
AdjustWindowRect(&rc, GetWindowLongW(hwndDlg, GWL_STYLE), FALSE);
|
||||||
|
|
||||||
/* Resize the property sheet */
|
/* Resize the property sheet */
|
||||||
TRACE("setting dialog %p, rc (0,0)-(%ld,%ld)\n",
|
TRACE("setting dialog %p, rc (0,0)-(%d,%d)\n",
|
||||||
hwndDlg, rc.right, rc.bottom);
|
hwndDlg, rc.right, rc.bottom);
|
||||||
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
|
SetWindowPos(hwndDlg, 0, 0, 0, rc.right - rc.left, rc.bottom - rc.top,
|
||||||
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
|
||||||
|
@ -1336,7 +1332,7 @@ static UINT GetTemplateSize(DLGTEMPLATE* pTemplate)
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
case 0xffff:
|
case 0xffff:
|
||||||
TRACE("class ordinal 0x%08lx\n",*(DWORD*)p);
|
TRACE("class ordinal 0x%08x\n",*(DWORD*)p);
|
||||||
p += 2;
|
p += 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1352,7 +1348,7 @@ static UINT GetTemplateSize(DLGTEMPLATE* pTemplate)
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
case 0xffff:
|
case 0xffff:
|
||||||
TRACE("text ordinal 0x%08lx\n",*(DWORD*)p);
|
TRACE("text ordinal 0x%08x\n",*(DWORD*)p);
|
||||||
p += 2;
|
p += 2;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1444,7 +1440,7 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent,
|
||||||
if (!temp)
|
if (!temp)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRACE("copying pTemplate %p into temp %p (%ld)\n", pTemplate, temp, resSize);
|
TRACE("copying pTemplate %p into temp %p (%d)\n", pTemplate, temp, resSize);
|
||||||
memcpy(temp, pTemplate, resSize);
|
memcpy(temp, pTemplate, resSize);
|
||||||
pTemplate = temp;
|
pTemplate = temp;
|
||||||
|
|
||||||
|
@ -2044,7 +2040,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
|
||||||
* NOTE: The resizing happens every time the page is selected and
|
* NOTE: The resizing happens every time the page is selected and
|
||||||
* not only when it's created (some applications depend on it). */
|
* not only when it's created (some applications depend on it). */
|
||||||
PROPSHEET_GetPageRect(psInfo, hwndDlg, &rc, ppshpage);
|
PROPSHEET_GetPageRect(psInfo, hwndDlg, &rc, ppshpage);
|
||||||
TRACE("setting page %p, rc (%ld,%ld)-(%ld,%ld) w=%ld, h=%ld\n",
|
TRACE("setting page %p, rc (%d,%d)-(%d,%d) w=%d, h=%d\n",
|
||||||
psInfo->proppage[index].hwndPage, rc.left, rc.top, rc.right, rc.bottom,
|
psInfo->proppage[index].hwndPage, rc.left, rc.top, rc.right, rc.bottom,
|
||||||
rc.right - rc.left, rc.bottom - rc.top);
|
rc.right - rc.left, rc.bottom - rc.top);
|
||||||
SetWindowPos(psInfo->proppage[index].hwndPage, HWND_TOP,
|
SetWindowPos(psInfo->proppage[index].hwndPage, HWND_TOP,
|
||||||
|
@ -2152,7 +2148,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
|
||||||
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
|
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwndDlg, PropSheetInfoStr);
|
||||||
WCHAR szTitle[256];
|
WCHAR szTitle[256];
|
||||||
|
|
||||||
TRACE("'%s' (style %08lx)\n", debugstr_w(lpszText), dwStyle);
|
TRACE("'%s' (style %08x)\n", debugstr_w(lpszText), dwStyle);
|
||||||
if (HIWORD(lpszText) == 0) {
|
if (HIWORD(lpszText) == 0) {
|
||||||
if (!LoadStringW(psInfo->ppshheader.hInstance,
|
if (!LoadStringW(psInfo->ppshheader.hInstance,
|
||||||
LOWORD(lpszText), szTitle, sizeof(szTitle)-sizeof(WCHAR)))
|
LOWORD(lpszText), szTitle, sizeof(szTitle)-sizeof(WCHAR)))
|
||||||
|
@ -2442,7 +2438,7 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
|
HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON);
|
||||||
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
|
HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON);
|
||||||
|
|
||||||
TRACE("%ld\n", dwFlags);
|
TRACE("%d\n", dwFlags);
|
||||||
|
|
||||||
EnableWindow(hwndBack, FALSE);
|
EnableWindow(hwndBack, FALSE);
|
||||||
EnableWindow(hwndNext, FALSE);
|
EnableWindow(hwndNext, FALSE);
|
||||||
|
@ -2644,8 +2640,9 @@ static LRESULT PROPSHEET_IndexToId(HWND hwndDlg, int iPageIndex)
|
||||||
*/
|
*/
|
||||||
static LRESULT PROPSHEET_GetResult(HWND hwndDlg)
|
static LRESULT PROPSHEET_GetResult(HWND hwndDlg)
|
||||||
{
|
{
|
||||||
FIXME("(%p): stub\n", hwndDlg);
|
PropSheetInfo * psInfo = (PropSheetInfo*) GetPropW(hwndDlg,
|
||||||
return -1;
|
PropSheetInfoStr);
|
||||||
|
return psInfo->result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -2763,6 +2760,9 @@ static INT do_loop(PropSheetInfo *psInfo)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ret != -1)
|
||||||
|
ret = psInfo->result;
|
||||||
|
|
||||||
DestroyWindow(hwnd);
|
DestroyWindow(hwnd);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -3147,14 +3147,10 @@ static BOOL PROPSHEET_DoCommand(HWND hwnd, WORD wID)
|
||||||
{
|
{
|
||||||
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
|
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd,
|
||||||
PropSheetInfoStr);
|
PropSheetInfoStr);
|
||||||
int result = TRUE;
|
|
||||||
|
|
||||||
if (psInfo->restartWindows)
|
/* don't overwrite ID_PSRESTARTWINDOWS or ID_PSREBOOTSYSTEM */
|
||||||
result = ID_PSRESTARTWINDOWS;
|
if (psInfo->result == 0)
|
||||||
|
psInfo->result = IDOK;
|
||||||
/* reboot system takes precedence over restart windows */
|
|
||||||
if (psInfo->rebootSystem)
|
|
||||||
result = ID_PSREBOOTSYSTEM;
|
|
||||||
|
|
||||||
if (psInfo->isModeless)
|
if (psInfo->isModeless)
|
||||||
psInfo->activeValid = FALSE;
|
psInfo->activeValid = FALSE;
|
||||||
|
@ -3630,7 +3626,10 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (!psInfo)
|
if (!psInfo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
psInfo->restartWindows = TRUE;
|
/* reboot system takes precedence over restart windows */
|
||||||
|
if (psInfo->result != ID_PSREBOOTSYSTEM)
|
||||||
|
psInfo->result = ID_PSRESTARTWINDOWS;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3642,7 +3641,8 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
if (!psInfo)
|
if (!psInfo)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
psInfo->rebootSystem = TRUE;
|
psInfo->result = ID_PSREBOOTSYSTEM;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,8 +188,7 @@ typedef struct
|
||||||
DWORD orgStyle; /* original style (dwStyle may change) */
|
DWORD orgStyle; /* original style (dwStyle may change) */
|
||||||
SIZE calcSize; /* calculated rebar size */
|
SIZE calcSize; /* calculated rebar size */
|
||||||
SIZE oldSize; /* previous calculated rebar size */
|
SIZE oldSize; /* previous calculated rebar size */
|
||||||
BOOL bUnicode; /* TRUE if this window is W type */
|
BOOL bUnicode; /* TRUE if parent wants notify in W format */
|
||||||
BOOL NtfUnicode; /* TRUE if parent wants notify in W format */
|
|
||||||
BOOL DoRedraw; /* TRUE to acutally draw bands */
|
BOOL DoRedraw; /* TRUE to acutally draw bands */
|
||||||
UINT fStatus; /* Status flags (see below) */
|
UINT fStatus; /* Status flags (see below) */
|
||||||
HCURSOR hcurArrow; /* handle to the arrow cursor */
|
HCURSOR hcurArrow; /* handle to the arrow cursor */
|
||||||
|
@ -288,6 +287,8 @@ typedef struct
|
||||||
|
|
||||||
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)GetWindowLongPtrW (hwnd, 0))
|
#define REBAR_GetInfoPtr(wndPtr) ((REBAR_INFO *)GetWindowLongPtrW (hwnd, 0))
|
||||||
|
|
||||||
|
static LRESULT REBAR_NotifyFormat(REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
|
||||||
/* "constant values" retrieved when DLL was initialized */
|
/* "constant values" retrieved when DLL was initialized */
|
||||||
/* FIXME we do this when the classes are registered. */
|
/* FIXME we do this when the classes are registered. */
|
||||||
|
@ -369,7 +370,7 @@ REBAR_DumpBandInfo( LPREBARBANDINFOA pB)
|
||||||
TRACE("ID=%u, ", pB->wID);
|
TRACE("ID=%u, ", pB->wID);
|
||||||
TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
|
TRACE("size=%u, child=%p", pB->cbSize, pB->hwndChild);
|
||||||
if (pB->fMask & RBBIM_COLORS)
|
if (pB->fMask & RBBIM_COLORS)
|
||||||
TRACE(", clrF=0x%06lx, clrB=0x%06lx", pB->clrFore, pB->clrBack);
|
TRACE(", clrF=0x%06x, clrB=0x%06x", pB->clrFore, pB->clrBack);
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask));
|
TRACE("band info: mask=0x%08x (%s)\n", pB->fMask, REBAR_FmtMask(pB->fMask));
|
||||||
|
@ -401,16 +402,16 @@ REBAR_DumpBand (REBAR_INFO *iP)
|
||||||
|
|
||||||
if(! TRACE_ON(rebar) ) return;
|
if(! TRACE_ON(rebar) ) return;
|
||||||
|
|
||||||
TRACE("hwnd=%p: color=%08lx/%08lx, bands=%u, rows=%u, cSize=%ld,%ld\n",
|
TRACE("hwnd=%p: color=%08x/%08x, bands=%u, rows=%u, cSize=%d,%d\n",
|
||||||
iP->hwndSelf, iP->clrText, iP->clrBk, iP->uNumBands, iP->uNumRows,
|
iP->hwndSelf, iP->clrText, iP->clrBk, iP->uNumBands, iP->uNumRows,
|
||||||
iP->calcSize.cx, iP->calcSize.cy);
|
iP->calcSize.cx, iP->calcSize.cy);
|
||||||
TRACE("hwnd=%p: flags=%08x, dragStart=%ld,%ld, dragNow=%ld,%ld, iGrabbedBand=%d\n",
|
TRACE("hwnd=%p: flags=%08x, dragStart=%d,%d, dragNow=%d,%d, iGrabbedBand=%d\n",
|
||||||
iP->hwndSelf, iP->fStatus, iP->dragStart.x, iP->dragStart.y,
|
iP->hwndSelf, iP->fStatus, iP->dragStart.x, iP->dragStart.y,
|
||||||
iP->dragNow.x, iP->dragNow.y,
|
iP->dragNow.x, iP->dragNow.y,
|
||||||
iP->iGrabbedBand);
|
iP->iGrabbedBand);
|
||||||
TRACE("hwnd=%p: style=%08lx, I'm Unicode=%s, notify in Unicode=%s, redraw=%s\n",
|
TRACE("hwnd=%p: style=%08x, notify in Unicode=%s, redraw=%s\n",
|
||||||
iP->hwndSelf, iP->dwStyle, (iP->bUnicode)?"TRUE":"FALSE",
|
iP->hwndSelf, iP->dwStyle, (iP->bUnicode)?"TRUE":"FALSE",
|
||||||
(iP->NtfUnicode)?"TRUE":"FALSE", (iP->DoRedraw)?"TRUE":"FALSE");
|
(iP->DoRedraw)?"TRUE":"FALSE");
|
||||||
for (i = 0; i < iP->uNumBands; i++) {
|
for (i = 0; i < iP->uNumBands; i++) {
|
||||||
pB = &iP->bands[i];
|
pB = &iP->bands[i];
|
||||||
TRACE("band # %u:", i);
|
TRACE("band # %u:", i);
|
||||||
|
@ -419,7 +420,7 @@ REBAR_DumpBand (REBAR_INFO *iP)
|
||||||
if (pB->fMask & RBBIM_CHILD)
|
if (pB->fMask & RBBIM_CHILD)
|
||||||
TRACE(" child=%p", pB->hwndChild);
|
TRACE(" child=%p", pB->hwndChild);
|
||||||
if (pB->fMask & RBBIM_COLORS)
|
if (pB->fMask & RBBIM_COLORS)
|
||||||
TRACE(" clrF=0x%06lx clrB=0x%06lx", pB->clrFore, pB->clrBack);
|
TRACE(" clrF=0x%06x clrB=0x%06x", pB->clrFore, pB->clrBack);
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask));
|
TRACE("band # %u: mask=0x%08x (%s)\n", i, pB->fMask, REBAR_FmtMask(pB->fMask));
|
||||||
if (pB->fMask & RBBIM_STYLE)
|
if (pB->fMask & RBBIM_STYLE)
|
||||||
|
@ -442,13 +443,13 @@ REBAR_DumpBand (REBAR_INFO *iP)
|
||||||
if (pB->fMask & RBBIM_TEXT)
|
if (pB->fMask & RBBIM_TEXT)
|
||||||
TRACE("band # %u: text=%s\n",
|
TRACE("band # %u: text=%s\n",
|
||||||
i, (pB->lpText) ? debugstr_w(pB->lpText) : "(null)");
|
i, (pB->lpText) ? debugstr_w(pB->lpText) : "(null)");
|
||||||
TRACE("band # %u: lcx=%u, ccx=%u, hcx=%u, lcy=%u, ccy=%u, hcy=%u, offChild=%ld,%ld\n",
|
TRACE("band # %u: lcx=%u, ccx=%u, hcx=%u, lcy=%u, ccy=%u, hcy=%u, offChild=%d,%d\n",
|
||||||
i, pB->lcx, pB->ccx, pB->hcx, pB->lcy, pB->ccy, pB->hcy, pB->offChild.cx, pB->offChild.cy);
|
i, pB->lcx, pB->ccx, pB->hcx, pB->lcy, pB->ccy, pB->hcy, pB->offChild.cx, pB->offChild.cy);
|
||||||
TRACE("band # %u: fStatus=%08x, fDraw=%08x, Band=(%ld,%ld)-(%ld,%ld), Grip=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("band # %u: fStatus=%08x, fDraw=%08x, Band=(%d,%d)-(%d,%d), Grip=(%d,%d)-(%d,%d)\n",
|
||||||
i, pB->fStatus, pB->fDraw,
|
i, pB->fStatus, pB->fDraw,
|
||||||
pB->rcBand.left, pB->rcBand.top, pB->rcBand.right, pB->rcBand.bottom,
|
pB->rcBand.left, pB->rcBand.top, pB->rcBand.right, pB->rcBand.bottom,
|
||||||
pB->rcGripper.left, pB->rcGripper.top, pB->rcGripper.right, pB->rcGripper.bottom);
|
pB->rcGripper.left, pB->rcGripper.top, pB->rcGripper.right, pB->rcGripper.bottom);
|
||||||
TRACE("band # %u: Img=(%ld,%ld)-(%ld,%ld), Txt=(%ld,%ld)-(%ld,%ld), Child=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("band # %u: Img=(%d,%d)-(%d,%d), Txt=(%d,%d)-(%d,%d), Child=(%d,%d)-(%d,%d)\n",
|
||||||
i,
|
i,
|
||||||
pB->rcCapImage.left, pB->rcCapImage.top, pB->rcCapImage.right, pB->rcCapImage.bottom,
|
pB->rcCapImage.left, pB->rcCapImage.top, pB->rcCapImage.right, pB->rcCapImage.bottom,
|
||||||
pB->rcCapText.left, pB->rcCapText.top, pB->rcCapText.right, pB->rcCapText.bottom,
|
pB->rcCapText.left, pB->rcCapText.top, pB->rcCapText.right, pB->rcCapText.bottom,
|
||||||
|
@ -502,15 +503,9 @@ REBAR_Notify (NMHDR *nmhdr, REBAR_INFO *infoPtr, UINT code)
|
||||||
nmhdr->hwndFrom = infoPtr->hwndSelf;
|
nmhdr->hwndFrom = infoPtr->hwndSelf;
|
||||||
nmhdr->code = code;
|
nmhdr->code = code;
|
||||||
|
|
||||||
TRACE("window %p, code=%08x, %s\n", parent, code,
|
TRACE("window %p, code=%08x, via %s\n", parent, code, (infoPtr->bUnicode)?"Unicode":"ANSI");
|
||||||
(infoPtr->NtfUnicode) ? "via Unicode" : "via ANSI");
|
|
||||||
|
|
||||||
if (infoPtr->NtfUnicode)
|
return SendMessageW(parent, WM_NOTIFY, (WPARAM)nmhdr->idFrom, (LPARAM)nmhdr);
|
||||||
return SendMessageW (parent, WM_NOTIFY, (WPARAM) nmhdr->idFrom,
|
|
||||||
(LPARAM)nmhdr);
|
|
||||||
else
|
|
||||||
return SendMessageA (parent, WM_NOTIFY, (WPARAM) nmhdr->idFrom,
|
|
||||||
(LPARAM)nmhdr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INT
|
static INT
|
||||||
|
@ -718,7 +713,7 @@ REBAR_FixVert (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend,
|
||||||
(lpBand->rcoldBand.right !=lpBand->rcBand.right) ||
|
(lpBand->rcoldBand.right !=lpBand->rcBand.right) ||
|
||||||
(lpBand->rcoldBand.bottom !=lpBand->rcBand.bottom)) {
|
(lpBand->rcoldBand.bottom !=lpBand->rcBand.bottom)) {
|
||||||
lpBand->fDraw |= NTF_INVALIDATE;
|
lpBand->fDraw |= NTF_INVALIDATE;
|
||||||
TRACE("band %d row=%d: changed to (%ld,%ld)-(%ld,%ld) from (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("band %d row=%d: changed to (%d,%d)-(%d,%d) from (%d,%d)-(%d,%d)\n",
|
||||||
i, lpBand->iRow,
|
i, lpBand->iRow,
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom,
|
lpBand->rcBand.right, lpBand->rcBand.bottom,
|
||||||
|
@ -726,7 +721,7 @@ REBAR_FixVert (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend,
|
||||||
lpBand->rcoldBand.right, lpBand->rcoldBand.bottom);
|
lpBand->rcoldBand.right, lpBand->rcoldBand.bottom);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
TRACE("band %d row=%d: unchanged (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("band %d row=%d: unchanged (%d,%d)-(%d,%d)\n",
|
||||||
i, lpBand->iRow,
|
i, lpBand->iRow,
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
||||||
|
@ -802,7 +797,7 @@ REBAR_AdjustBands (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend,
|
||||||
lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
|
lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
|
||||||
else
|
else
|
||||||
lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
|
lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
|
||||||
TRACE("Phase 1 band %d, (%ld,%ld)-(%ld,%ld), orig x=%d, xsep=%d\n",
|
TRACE("Phase 1 band %d, (%d,%d)-(%d,%d), orig x=%d, xsep=%d\n",
|
||||||
i, lpBand->rcBand.left, lpBand->rcBand.top,
|
i, lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
|
lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
|
||||||
x = rcBrb(lpBand);
|
x = rcBrb(lpBand);
|
||||||
|
@ -872,7 +867,7 @@ REBAR_AdjustBands (REBAR_INFO *infoPtr, UINT rowstart, UINT rowend,
|
||||||
lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
|
lpBand->rcBand.bottom = lpBand->rcBand.top + curwidth;
|
||||||
else
|
else
|
||||||
lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
|
lpBand->rcBand.right = lpBand->rcBand.left + curwidth;
|
||||||
TRACE("Phase 2 band %d, (%ld,%ld)-(%ld,%ld), orig x=%d, xsep=%d\n",
|
TRACE("Phase 2 band %d, (%d,%d)-(%d,%d), orig x=%d, xsep=%d\n",
|
||||||
i, lpBand->rcBand.left, lpBand->rcBand.top,
|
i, lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
|
lpBand->rcBand.right, lpBand->rcBand.bottom, x, xsep);
|
||||||
x = rcBrb(lpBand);
|
x = rcBrb(lpBand);
|
||||||
|
@ -1007,14 +1002,14 @@ REBAR_CalcHorzBand (REBAR_INFO *infoPtr, UINT rstart, UINT rend, BOOL notify)
|
||||||
((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
|
((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
|
||||||
(oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
|
(oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
|
||||||
TRACE("Child rectangle changed for band %u\n", i);
|
TRACE("Child rectangle changed for band %u\n", i);
|
||||||
TRACE(" from (%ld,%ld)-(%ld,%ld) to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE(" from (%d,%d)-(%d,%d) to (%d,%d)-(%d,%d)\n",
|
||||||
oldChild.left, oldChild.top,
|
oldChild.left, oldChild.top,
|
||||||
oldChild.right, oldChild.bottom,
|
oldChild.right, oldChild.bottom,
|
||||||
lpBand->rcChild.left, lpBand->rcChild.top,
|
lpBand->rcChild.left, lpBand->rcChild.top,
|
||||||
lpBand->rcChild.right, lpBand->rcChild.bottom);
|
lpBand->rcChild.right, lpBand->rcChild.bottom);
|
||||||
}
|
}
|
||||||
if (lpBand->fDraw & NTF_INVALIDATE) {
|
if (lpBand->fDraw & NTF_INVALIDATE) {
|
||||||
TRACE("invalidating (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("invalidating (%d,%d)-(%d,%d)\n",
|
||||||
lpBand->rcBand.left,
|
lpBand->rcBand.left,
|
||||||
lpBand->rcBand.top,
|
lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0),
|
lpBand->rcBand.right + ((lpBand->fDraw & DRAW_RIGHTSEP) ? SEP_WIDTH_SIZE : 0),
|
||||||
|
@ -1146,14 +1141,14 @@ REBAR_CalcVertBand (REBAR_INFO *infoPtr, UINT rstart, UINT rend, BOOL notify)
|
||||||
((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
|
((oldChild.right-oldChild.left != lpBand->rcChild.right-lpBand->rcChild.left) ||
|
||||||
(oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
|
(oldChild.bottom-oldChild.top != lpBand->rcChild.bottom-lpBand->rcChild.top))) {
|
||||||
TRACE("Child rectangle changed for band %u\n", i);
|
TRACE("Child rectangle changed for band %u\n", i);
|
||||||
TRACE(" from (%ld,%ld)-(%ld,%ld) to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE(" from (%d,%d)-(%d,%d) to (%d,%d)-(%d,%d)\n",
|
||||||
oldChild.left, oldChild.top,
|
oldChild.left, oldChild.top,
|
||||||
oldChild.right, oldChild.bottom,
|
oldChild.right, oldChild.bottom,
|
||||||
lpBand->rcChild.left, lpBand->rcChild.top,
|
lpBand->rcChild.left, lpBand->rcChild.top,
|
||||||
lpBand->rcChild.right, lpBand->rcChild.bottom);
|
lpBand->rcChild.right, lpBand->rcChild.bottom);
|
||||||
}
|
}
|
||||||
if (lpBand->fDraw & NTF_INVALIDATE) {
|
if (lpBand->fDraw & NTF_INVALIDATE) {
|
||||||
TRACE("invalidating (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("invalidating (%d,%d)-(%d,%d)\n",
|
||||||
lpBand->rcBand.left,
|
lpBand->rcBand.left,
|
||||||
lpBand->rcBand.top,
|
lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0),
|
lpBand->rcBand.right + ((lpBand->fDraw & DRAW_BOTTOMSEP) ? SEP_WIDTH_SIZE : 0),
|
||||||
|
@ -1181,7 +1176,7 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
|
||||||
|
|
||||||
GetClientRect (infoPtr->hwndSelf, &rc);
|
GetClientRect (infoPtr->hwndSelf, &rc);
|
||||||
|
|
||||||
TRACE( " old [%ld x %ld], new [%ld x %ld], client [%ld x %ld]\n",
|
TRACE( " old [%d x %d], new [%d x %d], client [%d x %d]\n",
|
||||||
infoPtr->oldSize.cx, infoPtr->oldSize.cy,
|
infoPtr->oldSize.cx, infoPtr->oldSize.cy,
|
||||||
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
||||||
rc.right, rc.bottom);
|
rc.right, rc.bottom);
|
||||||
|
@ -1264,7 +1259,7 @@ REBAR_ForceResize (REBAR_INFO *infoPtr)
|
||||||
y = infoPtr->origin.y;
|
y = infoPtr->origin.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("hwnd %p, style=%08lx, setting at (%d,%d) for (%d,%d)\n",
|
TRACE("hwnd %p, style=%08x, setting at (%d,%d) for (%d,%d)\n",
|
||||||
infoPtr->hwndSelf, infoPtr->dwStyle,
|
infoPtr->hwndSelf, infoPtr->dwStyle,
|
||||||
x, y, width, height);
|
x, y, width, height);
|
||||||
SetWindowPos (infoPtr->hwndSelf, 0, x, y, width, height,
|
SetWindowPos (infoPtr->hwndSelf, 0, x, y, width, height,
|
||||||
|
@ -1307,7 +1302,7 @@ REBAR_MoveChildWindows (REBAR_INFO *infoPtr, UINT start, UINT endplus)
|
||||||
REBAR_Notify ((NMHDR *)&rbcz, infoPtr, RBN_CHILDSIZE);
|
REBAR_Notify ((NMHDR *)&rbcz, infoPtr, RBN_CHILDSIZE);
|
||||||
if (!EqualRect (&lpBand->rcChild, &rbcz.rcChild)) {
|
if (!EqualRect (&lpBand->rcChild, &rbcz.rcChild)) {
|
||||||
TRACE("Child rect changed by NOTIFY for band %u\n", i);
|
TRACE("Child rect changed by NOTIFY for band %u\n", i);
|
||||||
TRACE(" from (%ld,%ld)-(%ld,%ld) to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE(" from (%d,%d)-(%d,%d) to (%d,%d)-(%d,%d)\n",
|
||||||
lpBand->rcChild.left, lpBand->rcChild.top,
|
lpBand->rcChild.left, lpBand->rcChild.top,
|
||||||
lpBand->rcChild.right, lpBand->rcChild.bottom,
|
lpBand->rcChild.right, lpBand->rcChild.bottom,
|
||||||
rbcz.rcChild.left, rbcz.rcChild.top,
|
rbcz.rcChild.left, rbcz.rcChild.top,
|
||||||
|
@ -1338,7 +1333,7 @@ REBAR_MoveChildWindows (REBAR_INFO *infoPtr, UINT start, UINT endplus)
|
||||||
yPos = (lpBand->rcChild.bottom + lpBand->rcChild.top - nEditHeight)/2;
|
yPos = (lpBand->rcChild.bottom + lpBand->rcChild.top - nEditHeight)/2;
|
||||||
|
|
||||||
/* center combo box inside child area */
|
/* center combo box inside child area */
|
||||||
TRACE("moving child (Combo(Ex)) %p to (%ld,%d) for (%ld,%d)\n",
|
TRACE("moving child (Combo(Ex)) %p to (%d,%d) for (%d,%d)\n",
|
||||||
lpBand->hwndChild,
|
lpBand->hwndChild,
|
||||||
lpBand->rcChild.left, yPos,
|
lpBand->rcChild.left, yPos,
|
||||||
lpBand->rcChild.right - lpBand->rcChild.left,
|
lpBand->rcChild.right - lpBand->rcChild.left,
|
||||||
|
@ -1353,7 +1348,7 @@ REBAR_MoveChildWindows (REBAR_INFO *infoPtr, UINT start, UINT endplus)
|
||||||
ERR("DeferWindowPos returned NULL\n");
|
ERR("DeferWindowPos returned NULL\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TRACE("moving child (Other) %p to (%ld,%ld) for (%ld,%ld)\n",
|
TRACE("moving child (Other) %p to (%d,%d) for (%d,%d)\n",
|
||||||
lpBand->hwndChild,
|
lpBand->hwndChild,
|
||||||
lpBand->rcChild.left, lpBand->rcChild.top,
|
lpBand->rcChild.left, lpBand->rcChild.top,
|
||||||
lpBand->rcChild.right - lpBand->rcChild.left,
|
lpBand->rcChild.right - lpBand->rcChild.left,
|
||||||
|
@ -1419,12 +1414,12 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
if (!infoPtr->DoRedraw) infoPtr->fStatus |= BAND_NEEDS_REDRAW;
|
if (!infoPtr->DoRedraw) infoPtr->fStatus |= BAND_NEEDS_REDRAW;
|
||||||
|
|
||||||
GetClientRect (infoPtr->hwndSelf, &rcClient);
|
GetClientRect (infoPtr->hwndSelf, &rcClient);
|
||||||
TRACE("Client is (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("Client is (%d,%d)-(%d,%d)\n",
|
||||||
rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
|
rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
|
||||||
|
|
||||||
if (lpRect) {
|
if (lpRect) {
|
||||||
rcAdj = *lpRect;
|
rcAdj = *lpRect;
|
||||||
TRACE("adjustment rect is (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("adjustment rect is (%d,%d)-(%d,%d)\n",
|
||||||
rcAdj.left, rcAdj.top, rcAdj.right, rcAdj.bottom);
|
rcAdj.left, rcAdj.top, rcAdj.right, rcAdj.bottom);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -1580,7 +1575,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
lpBand->uMinHeight = lpBand->lcy;
|
lpBand->uMinHeight = lpBand->lcy;
|
||||||
x = rightx;
|
x = rightx;
|
||||||
}
|
}
|
||||||
TRACE("P1 band %u, row %d, (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("P1 band %u, row %d, (%d,%d)-(%d,%d)\n",
|
||||||
i, row,
|
i, row,
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
||||||
|
@ -1722,11 +1717,11 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
current->rcBand.bottom = current->rcBand.top + new_rh;
|
current->rcBand.bottom = current->rcBand.top + new_rh;
|
||||||
y += adj_rh;
|
y += adj_rh;
|
||||||
}
|
}
|
||||||
TRACE("P2 moving band %d to own row at (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("P2 moving band %d to own row at (%d,%d)-(%d,%d)\n",
|
||||||
current_idx,
|
current_idx,
|
||||||
current->rcBand.left, current->rcBand.top,
|
current->rcBand.left, current->rcBand.top,
|
||||||
current->rcBand.right, current->rcBand.bottom);
|
current->rcBand.right, current->rcBand.bottom);
|
||||||
TRACE("P2 prev band %d at (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("P2 prev band %d at (%d,%d)-(%d,%d)\n",
|
||||||
prev_idx,
|
prev_idx,
|
||||||
prev->rcBand.left, prev->rcBand.top,
|
prev->rcBand.left, prev->rcBand.top,
|
||||||
prev->rcBand.right, prev->rcBand.bottom);
|
prev->rcBand.right, prev->rcBand.bottom);
|
||||||
|
@ -1824,7 +1819,7 @@ REBAR_Layout (REBAR_INFO *infoPtr, LPRECT lpRect, BOOL notify, BOOL resetclient)
|
||||||
lpBand->rcBand.right = lpBand->rcBand.left + j;
|
lpBand->rcBand.right = lpBand->rcBand.left + j;
|
||||||
else
|
else
|
||||||
lpBand->rcBand.bottom = lpBand->rcBand.top + j;
|
lpBand->rcBand.bottom = lpBand->rcBand.top + j;
|
||||||
TRACE("P2b band %d, row %d changed to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("P2b band %d, row %d changed to (%d,%d)-(%d,%d)\n",
|
||||||
i, lpBand->iRow,
|
i, lpBand->iRow,
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
lpBand->rcBand.right, lpBand->rcBand.bottom);
|
||||||
|
@ -2266,7 +2261,7 @@ REBAR_InternalEraseBkGnd (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, REC
|
||||||
else
|
else
|
||||||
DrawEdge (hdc, &rcRowSep, EDGE_ETCHED, BF_BOTTOM);
|
DrawEdge (hdc, &rcRowSep, EDGE_ETCHED, BF_BOTTOM);
|
||||||
}
|
}
|
||||||
TRACE ("drawing band separator bottom (%ld,%ld)-(%ld,%ld)\n",
|
TRACE ("drawing band separator bottom (%d,%d)-(%d,%d)\n",
|
||||||
rcRowSep.left, rcRowSep.top,
|
rcRowSep.left, rcRowSep.top,
|
||||||
rcRowSep.right, rcRowSep.bottom);
|
rcRowSep.right, rcRowSep.bottom);
|
||||||
}
|
}
|
||||||
|
@ -2290,7 +2285,7 @@ REBAR_InternalEraseBkGnd (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, REC
|
||||||
else
|
else
|
||||||
DrawEdge (hdc, &rcSep, EDGE_ETCHED, BF_RIGHT);
|
DrawEdge (hdc, &rcSep, EDGE_ETCHED, BF_RIGHT);
|
||||||
}
|
}
|
||||||
TRACE("drawing band separator right (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("drawing band separator right (%d,%d)-(%d,%d)\n",
|
||||||
rcSep.left, rcSep.top, rcSep.right, rcSep.bottom);
|
rcSep.left, rcSep.top, rcSep.right, rcSep.bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2326,7 +2321,7 @@ REBAR_InternalEraseBkGnd (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, REC
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
old = SetBkColor (hdc, new);
|
old = SetBkColor (hdc, new);
|
||||||
TRACE("%s background color=0x%06lx, band (%ld,%ld)-(%ld,%ld), clip (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("%s background color=0x%06x, band (%d,%d)-(%d,%d), clip (%d,%d)-(%d,%d)\n",
|
||||||
(lpBand->clrBack == CLR_NONE) ? "none" :
|
(lpBand->clrBack == CLR_NONE) ? "none" :
|
||||||
((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
|
((lpBand->clrBack == CLR_DEFAULT) ? "dft" : ""),
|
||||||
GetBkColor(hdc),
|
GetBkColor(hdc),
|
||||||
|
@ -2481,7 +2476,7 @@ REBAR_Shrink (REBAR_INFO *infoPtr, REBAR_BAND *band, INT movement, INT i)
|
||||||
LEADJ(band, Leadjust);
|
LEADJ(band, Leadjust);
|
||||||
READJ(band, Readjust);
|
READJ(band, Readjust);
|
||||||
|
|
||||||
TRACE("band %d: left=%d, right=%d, move=%d, rtn=%d, rcBand=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("band %d: left=%d, right=%d, move=%d, rtn=%d, rcBand=(%d,%d)-(%d,%d)\n",
|
||||||
i, Leadjust, Readjust, movement, ret,
|
i, Leadjust, Readjust, movement, ret,
|
||||||
band->rcBand.left, band->rcBand.top,
|
band->rcBand.left, band->rcBand.top,
|
||||||
band->rcBand.right, band->rcBand.bottom);
|
band->rcBand.right, band->rcBand.bottom);
|
||||||
|
@ -2563,7 +2558,7 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
|
||||||
infoPtr->ihitoffset);
|
infoPtr->ihitoffset);
|
||||||
infoPtr->dragNow = *ptsmove;
|
infoPtr->dragNow = *ptsmove;
|
||||||
|
|
||||||
TRACE("before: movement=%d (%ld,%ld), imindBand=%d, ihitBand=%d, imaxdBand=%d, LSum=%d, RSum=%d\n",
|
TRACE("before: movement=%d (%d,%d), imindBand=%d, ihitBand=%d, imaxdBand=%d, LSum=%d, RSum=%d\n",
|
||||||
movement, ptsmove->x, ptsmove->y, imindBand, ihitBand,
|
movement, ptsmove->x, ptsmove->y, imindBand, ihitBand,
|
||||||
imaxdBand, LHeaderSum, RHeaderSum);
|
imaxdBand, LHeaderSum, RHeaderSum);
|
||||||
REBAR_DumpBand (infoPtr);
|
REBAR_DumpBand (infoPtr);
|
||||||
|
@ -2971,7 +2966,7 @@ REBAR_GetBkColor (REBAR_INFO *infoPtr)
|
||||||
if (clr == CLR_DEFAULT)
|
if (clr == CLR_DEFAULT)
|
||||||
clr = infoPtr->clrBtnFace;
|
clr = infoPtr->clrBtnFace;
|
||||||
|
|
||||||
TRACE("background color 0x%06lx!\n", clr);
|
TRACE("background color 0x%06x!\n", clr);
|
||||||
|
|
||||||
return clr;
|
return clr;
|
||||||
}
|
}
|
||||||
|
@ -3005,7 +3000,7 @@ REBAR_GetRect (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
lpBand = &infoPtr->bands[iBand];
|
lpBand = &infoPtr->bands[iBand];
|
||||||
CopyRect (lprc, &lpBand->rcBand);
|
CopyRect (lprc, &lpBand->rcBand);
|
||||||
|
|
||||||
TRACE("band %d, (%ld,%ld)-(%ld,%ld)\n", iBand,
|
TRACE("band %d, (%d,%d)-(%d,%d)\n", iBand,
|
||||||
lprc->left, lprc->top, lprc->right, lprc->bottom);
|
lprc->left, lprc->top, lprc->right, lprc->bottom);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -3049,7 +3044,7 @@ REBAR_GetRowHeight (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
inline static LRESULT
|
inline static LRESULT
|
||||||
REBAR_GetTextColor (REBAR_INFO *infoPtr)
|
REBAR_GetTextColor (REBAR_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
TRACE("text color 0x%06lx!\n", infoPtr->clrText);
|
TRACE("text color 0x%06x!\n", infoPtr->clrText);
|
||||||
|
|
||||||
return infoPtr->clrText;
|
return infoPtr->clrText;
|
||||||
}
|
}
|
||||||
|
@ -3349,7 +3344,7 @@ REBAR_MinimizeBand (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
movement = lpBand->rcBand.right - lpBand->rcBand.left -
|
movement = lpBand->rcBand.right - lpBand->rcBand.left -
|
||||||
lpBand->cxHeader;
|
lpBand->cxHeader;
|
||||||
if (movement < 0) {
|
if (movement < 0) {
|
||||||
ERR("something is wrong, band=(%ld,%ld)-(%ld,%ld), cxheader=%d\n",
|
ERR("something is wrong, band=(%d,%d)-(%d,%d), cxheader=%d\n",
|
||||||
lpBand->rcBand.left, lpBand->rcBand.top,
|
lpBand->rcBand.left, lpBand->rcBand.top,
|
||||||
lpBand->rcBand.right, lpBand->rcBand.bottom,
|
lpBand->rcBand.right, lpBand->rcBand.bottom,
|
||||||
lpBand->cxHeader);
|
lpBand->cxHeader);
|
||||||
|
@ -3659,7 +3654,7 @@ REBAR_SetBarInfo (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->imageSize.cx = 0;
|
infoPtr->imageSize.cx = 0;
|
||||||
infoPtr->imageSize.cy = 0;
|
infoPtr->imageSize.cy = 0;
|
||||||
}
|
}
|
||||||
TRACE("new image cx=%ld, cy=%ld\n", infoPtr->imageSize.cx,
|
TRACE("new image cx=%d, cy=%d\n", infoPtr->imageSize.cx,
|
||||||
infoPtr->imageSize.cy);
|
infoPtr->imageSize.cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3681,7 +3676,7 @@ REBAR_SetBkColor (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
clrTemp = infoPtr->clrBk;
|
clrTemp = infoPtr->clrBk;
|
||||||
infoPtr->clrBk = (COLORREF)lParam;
|
infoPtr->clrBk = (COLORREF)lParam;
|
||||||
|
|
||||||
TRACE("background color 0x%06lx!\n", infoPtr->clrBk);
|
TRACE("background color 0x%06x!\n", infoPtr->clrBk);
|
||||||
|
|
||||||
return clrTemp;
|
return clrTemp;
|
||||||
}
|
}
|
||||||
|
@ -3710,7 +3705,7 @@ REBAR_SetTextColor (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
clrTemp = infoPtr->clrText;
|
clrTemp = infoPtr->clrText;
|
||||||
infoPtr->clrText = (COLORREF)lParam;
|
infoPtr->clrText = (COLORREF)lParam;
|
||||||
|
|
||||||
TRACE("text color 0x%06lx!\n", infoPtr->clrText);
|
TRACE("text color 0x%06x!\n", infoPtr->clrText);
|
||||||
|
|
||||||
return clrTemp;
|
return clrTemp;
|
||||||
}
|
}
|
||||||
|
@ -3790,15 +3785,15 @@ REBAR_SizeToRect (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
if (lpRect == NULL)
|
if (lpRect == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRACE("[%ld %ld %ld %ld]\n",
|
TRACE("[%d %d %d %d]\n",
|
||||||
lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
|
|
||||||
/* what is going on???? */
|
/* what is going on???? */
|
||||||
GetWindowRect(infoPtr->hwndSelf, &t1);
|
GetWindowRect(infoPtr->hwndSelf, &t1);
|
||||||
TRACE("window rect [%ld %ld %ld %ld]\n",
|
TRACE("window rect [%d %d %d %d]\n",
|
||||||
t1.left, t1.top, t1.right, t1.bottom);
|
t1.left, t1.top, t1.right, t1.bottom);
|
||||||
GetClientRect(infoPtr->hwndSelf, &t1);
|
GetClientRect(infoPtr->hwndSelf, &t1);
|
||||||
TRACE("client rect [%ld %ld %ld %ld]\n",
|
TRACE("client rect [%d %d %d %d]\n",
|
||||||
t1.left, t1.top, t1.right, t1.bottom);
|
t1.left, t1.top, t1.right, t1.bottom);
|
||||||
|
|
||||||
/* force full _Layout processing */
|
/* force full _Layout processing */
|
||||||
|
@ -3821,7 +3816,7 @@ REBAR_Create (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
if (TRACE_ON(rebar)) {
|
if (TRACE_ON(rebar)) {
|
||||||
GetWindowRect(infoPtr->hwndSelf, &wnrc1);
|
GetWindowRect(infoPtr->hwndSelf, &wnrc1);
|
||||||
GetClientRect(infoPtr->hwndSelf, &clrc1);
|
GetClientRect(infoPtr->hwndSelf, &clrc1);
|
||||||
TRACE("window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) cs=(%d,%d %dx%d)\n",
|
TRACE("window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) cs=(%d,%d %dx%d)\n",
|
||||||
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
||||||
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
||||||
cs->x, cs->y, cs->cx, cs->cy);
|
cs->x, cs->y, cs->cx, cs->cy);
|
||||||
|
@ -3938,8 +3933,8 @@ REBAR_LButtonDown (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
UINT htFlags;
|
UINT htFlags;
|
||||||
INT iHitBand;
|
INT iHitBand;
|
||||||
POINT ptMouseDown;
|
POINT ptMouseDown;
|
||||||
ptMouseDown.x = (INT)LOWORD(lParam);
|
ptMouseDown.x = (short)LOWORD(lParam);
|
||||||
ptMouseDown.y = (INT)HIWORD(lParam);
|
ptMouseDown.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
REBAR_InternalHitTest(infoPtr, &ptMouseDown, &htFlags, &iHitBand);
|
REBAR_InternalHitTest(infoPtr, &ptMouseDown, &htFlags, &iHitBand);
|
||||||
lpBand = &infoPtr->bands[iHitBand];
|
lpBand = &infoPtr->bands[iHitBand];
|
||||||
|
@ -4119,17 +4114,20 @@ inline static LRESULT
|
||||||
REBAR_NCCalcSize (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
REBAR_NCCalcSize (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HTHEME theme;
|
HTHEME theme;
|
||||||
|
RECT *rect = (RECT *)lParam;
|
||||||
|
|
||||||
if (infoPtr->dwStyle & WS_BORDER) {
|
if (infoPtr->dwStyle & WS_BORDER) {
|
||||||
InflateRect((LPRECT)lParam, -GetSystemMetrics(SM_CXEDGE),
|
rect->left = min(rect->left + GetSystemMetrics(SM_CXEDGE), rect->right);
|
||||||
-GetSystemMetrics(SM_CYEDGE));
|
rect->right = max(rect->right - GetSystemMetrics(SM_CXEDGE), rect->left);
|
||||||
|
rect->top = min(rect->top + GetSystemMetrics(SM_CYEDGE), rect->bottom);
|
||||||
|
rect->bottom = max(rect->bottom - GetSystemMetrics(SM_CYEDGE), rect->top);
|
||||||
}
|
}
|
||||||
else if ((theme = GetWindowTheme (infoPtr->hwndSelf)))
|
else if ((theme = GetWindowTheme (infoPtr->hwndSelf)))
|
||||||
{
|
{
|
||||||
((LPRECT)lParam)->top++;
|
/* FIXME: should use GetThemeInt */
|
||||||
|
rect->top = min(rect->top + 1, rect->bottom);
|
||||||
}
|
}
|
||||||
TRACE("new client=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("new client=(%d,%d)-(%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
|
||||||
((LPRECT)lParam)->left, ((LPRECT)lParam)->top,
|
|
||||||
((LPRECT)lParam)->right, ((LPRECT)lParam)->bottom);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4142,7 +4140,6 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
RECT wnrc1, clrc1;
|
RECT wnrc1, clrc1;
|
||||||
NONCLIENTMETRICSW ncm;
|
NONCLIENTMETRICSW ncm;
|
||||||
HFONT tfont;
|
HFONT tfont;
|
||||||
INT i;
|
|
||||||
|
|
||||||
if (infoPtr != NULL) {
|
if (infoPtr != NULL) {
|
||||||
ERR("Strange info structure pointer *not* NULL\n");
|
ERR("Strange info structure pointer *not* NULL\n");
|
||||||
|
@ -4152,7 +4149,7 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (TRACE_ON(rebar)) {
|
if (TRACE_ON(rebar)) {
|
||||||
GetWindowRect(hwnd, &wnrc1);
|
GetWindowRect(hwnd, &wnrc1);
|
||||||
GetClientRect(hwnd, &clrc1);
|
GetClientRect(hwnd, &clrc1);
|
||||||
TRACE("window=(%ld,%ld)-(%ld,%ld) client=(%ld,%ld)-(%ld,%ld) cs=(%d,%d %dx%d)\n",
|
TRACE("window=(%d,%d)-(%d,%d) client=(%d,%d)-(%d,%d) cs=(%d,%d %dx%d)\n",
|
||||||
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
wnrc1.left, wnrc1.top, wnrc1.right, wnrc1.bottom,
|
||||||
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
clrc1.left, clrc1.top, clrc1.right, clrc1.bottom,
|
||||||
cs->x, cs->y, cs->cx, cs->cy);
|
cs->x, cs->y, cs->cx, cs->cy);
|
||||||
|
@ -4176,18 +4173,11 @@ REBAR_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->hcurHorz = LoadCursorW (0, (LPWSTR)IDC_SIZEWE);
|
infoPtr->hcurHorz = LoadCursorW (0, (LPWSTR)IDC_SIZEWE);
|
||||||
infoPtr->hcurVert = LoadCursorW (0, (LPWSTR)IDC_SIZENS);
|
infoPtr->hcurVert = LoadCursorW (0, (LPWSTR)IDC_SIZENS);
|
||||||
infoPtr->hcurDrag = LoadCursorW (0, (LPWSTR)IDC_SIZE);
|
infoPtr->hcurDrag = LoadCursorW (0, (LPWSTR)IDC_SIZE);
|
||||||
infoPtr->bUnicode = IsWindowUnicode (hwnd);
|
|
||||||
infoPtr->fStatus = CREATE_RUNNING;
|
infoPtr->fStatus = CREATE_RUNNING;
|
||||||
infoPtr->hFont = GetStockObject (SYSTEM_FONT);
|
infoPtr->hFont = GetStockObject (SYSTEM_FONT);
|
||||||
|
|
||||||
/* issue WM_NOTIFYFORMAT to get unicode status of parent */
|
/* issue WM_NOTIFYFORMAT to get unicode status of parent */
|
||||||
i = SendMessageW(REBAR_GetNotifyParent (infoPtr),
|
REBAR_NotifyFormat(infoPtr, 0, NF_REQUERY);
|
||||||
WM_NOTIFYFORMAT, (WPARAM)hwnd, NF_QUERY);
|
|
||||||
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
|
|
||||||
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", i);
|
|
||||||
i = NFR_ANSI;
|
|
||||||
}
|
|
||||||
infoPtr->NtfUnicode = (i == NFR_UNICODE) ? 1 : 0;
|
|
||||||
|
|
||||||
/* Stow away the original style */
|
/* Stow away the original style */
|
||||||
infoPtr->orgStyle = cs->style;
|
infoPtr->orgStyle = cs->style;
|
||||||
|
@ -4264,7 +4254,7 @@ REBAR_NCHitTest (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
ret, i);
|
ret, i);
|
||||||
ret = (LRESULT) i;
|
ret = (LRESULT) i;
|
||||||
}
|
}
|
||||||
TRACE("returning %ld, client point (%ld,%ld)\n", ret, clpt.x, clpt.y);
|
TRACE("returning %ld, client point (%d,%d)\n", ret, clpt.x, clpt.y);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4286,7 +4276,7 @@ REBAR_NCPaint (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
GetWindowRect (infoPtr->hwndSelf, &rcWindow);
|
GetWindowRect (infoPtr->hwndSelf, &rcWindow);
|
||||||
OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
|
OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
|
||||||
TRACE("rect (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("rect (%d,%d)-(%d,%d)\n",
|
||||||
rcWindow.left, rcWindow.top,
|
rcWindow.left, rcWindow.top,
|
||||||
rcWindow.right, rcWindow.bottom);
|
rcWindow.right, rcWindow.bottom);
|
||||||
DrawEdge (hdc, &rcWindow, EDGE_ETCHED, BF_RECT);
|
DrawEdge (hdc, &rcWindow, EDGE_ETCHED, BF_RECT);
|
||||||
|
@ -4299,7 +4289,7 @@ REBAR_NCPaint (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
return 0;
|
return 0;
|
||||||
GetWindowRect (infoPtr->hwndSelf, &rcWindow);
|
GetWindowRect (infoPtr->hwndSelf, &rcWindow);
|
||||||
OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
|
OffsetRect (&rcWindow, -rcWindow.left, -rcWindow.top);
|
||||||
TRACE("rect (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("rect (%d,%d)-(%d,%d)\n",
|
||||||
rcWindow.left, rcWindow.top,
|
rcWindow.left, rcWindow.top,
|
||||||
rcWindow.right, rcWindow.bottom);
|
rcWindow.right, rcWindow.bottom);
|
||||||
DrawThemeEdge (theme, hdc, 0, 0, &rcWindow, BDR_RAISEDINNER, BF_TOP, NULL);
|
DrawThemeEdge (theme, hdc, 0, 0, &rcWindow, BDR_RAISEDINNER, BF_TOP, NULL);
|
||||||
|
@ -4318,11 +4308,11 @@ REBAR_NotifyFormat (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
if (lParam == NF_REQUERY) {
|
if (lParam == NF_REQUERY) {
|
||||||
i = SendMessageW(REBAR_GetNotifyParent (infoPtr),
|
i = SendMessageW(REBAR_GetNotifyParent (infoPtr),
|
||||||
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
|
WM_NOTIFYFORMAT, (WPARAM)infoPtr->hwndSelf, NF_QUERY);
|
||||||
if ((i < NFR_ANSI) || (i > NFR_UNICODE)) {
|
if ((i != NFR_ANSI) && (i != NFR_UNICODE)) {
|
||||||
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", i);
|
ERR("wrong response to WM_NOTIFYFORMAT (%d), assuming ANSI\n", i);
|
||||||
i = NFR_ANSI;
|
i = NFR_ANSI;
|
||||||
}
|
}
|
||||||
infoPtr->NtfUnicode = (i == NFR_UNICODE) ? 1 : 0;
|
infoPtr->bUnicode = (i == NFR_UNICODE) ? 1 : 0;
|
||||||
return (LRESULT)i;
|
return (LRESULT)i;
|
||||||
}
|
}
|
||||||
return (LRESULT)((infoPtr->bUnicode) ? NFR_UNICODE : NFR_ANSI);
|
return (LRESULT)((infoPtr->bUnicode) ? NFR_UNICODE : NFR_ANSI);
|
||||||
|
@ -4339,7 +4329,7 @@ REBAR_Paint (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
GetClientRect(infoPtr->hwndSelf, &rc);
|
GetClientRect(infoPtr->hwndSelf, &rc);
|
||||||
hdc = wParam==0 ? BeginPaint (infoPtr->hwndSelf, &ps) : (HDC)wParam;
|
hdc = wParam==0 ? BeginPaint (infoPtr->hwndSelf, &ps) : (HDC)wParam;
|
||||||
|
|
||||||
TRACE("painting (%ld,%ld)-(%ld,%ld) client (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("painting (%d,%d)-(%d,%d) client (%d,%d)-(%d,%d)\n",
|
||||||
ps.rcPaint.left, ps.rcPaint.top,
|
ps.rcPaint.left, ps.rcPaint.top,
|
||||||
ps.rcPaint.right, ps.rcPaint.bottom,
|
ps.rcPaint.right, ps.rcPaint.bottom,
|
||||||
rc.left, rc.top, rc.right, rc.bottom);
|
rc.left, rc.top, rc.right, rc.bottom);
|
||||||
|
@ -4464,14 +4454,14 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("still in CreateWindow\n");
|
TRACE("still in CreateWindow\n");
|
||||||
infoPtr->fStatus &= ~CREATE_RUNNING;
|
infoPtr->fStatus &= ~CREATE_RUNNING;
|
||||||
GetWindowRect ( infoPtr->hwndSelf, &rcWin);
|
GetWindowRect ( infoPtr->hwndSelf, &rcWin);
|
||||||
TRACE("win rect (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("win rect (%d,%d)-(%d,%d)\n",
|
||||||
rcWin.left, rcWin.top, rcWin.right, rcWin.bottom);
|
rcWin.left, rcWin.top, rcWin.right, rcWin.bottom);
|
||||||
|
|
||||||
if ((lParam == 0) && (rcWin.right-rcWin.left == 0) &&
|
if ((lParam == 0) && (rcWin.right-rcWin.left == 0) &&
|
||||||
(rcWin.bottom-rcWin.top == 0)) {
|
(rcWin.bottom-rcWin.top == 0)) {
|
||||||
/* native control seems to do this */
|
/* native control seems to do this */
|
||||||
GetClientRect (GetParent(infoPtr->hwndSelf), &rcClient);
|
GetClientRect (GetParent(infoPtr->hwndSelf), &rcClient);
|
||||||
TRACE("sizing rebar, message and client zero, parent client (%ld,%ld)\n",
|
TRACE("sizing rebar, message and client zero, parent client (%d,%d)\n",
|
||||||
rcClient.right, rcClient.bottom);
|
rcClient.right, rcClient.bottom);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -4485,7 +4475,7 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
/* do the actual WM_SIZE request */
|
/* do the actual WM_SIZE request */
|
||||||
GetClientRect (infoPtr->hwndSelf, &rcClient);
|
GetClientRect (infoPtr->hwndSelf, &rcClient);
|
||||||
TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%ld,%ld)\n",
|
TRACE("sizing rebar from (%d,%d) to (%d,%d), client (%d,%d)\n",
|
||||||
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
||||||
LOWORD(lParam), HIWORD(lParam),
|
LOWORD(lParam), HIWORD(lParam),
|
||||||
rcClient.right, rcClient.bottom);
|
rcClient.right, rcClient.bottom);
|
||||||
|
@ -4510,11 +4500,11 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
rcClient.right = 0;
|
rcClient.right = 0;
|
||||||
else
|
else
|
||||||
rcClient.bottom = 0;
|
rcClient.bottom = 0;
|
||||||
TRACE("sizing rebar to parent (%ld,%ld) size is zero but AUTOSIZE set\n",
|
TRACE("sizing rebar to parent (%d,%d) size is zero but AUTOSIZE set\n",
|
||||||
rcClient.right, rcClient.bottom);
|
rcClient.right, rcClient.bottom);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TRACE("sizing rebar from (%ld,%ld) to (%d,%d), client (%ld,%ld)\n",
|
TRACE("sizing rebar from (%d,%d) to (%d,%d), client (%d,%d)\n",
|
||||||
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
infoPtr->calcSize.cx, infoPtr->calcSize.cy,
|
||||||
LOWORD(lParam), HIWORD(lParam),
|
LOWORD(lParam), HIWORD(lParam),
|
||||||
rcClient.right, rcClient.bottom);
|
rcClient.right, rcClient.bottom);
|
||||||
|
@ -4528,7 +4518,7 @@ REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
autosize.fChanged = 0; /* ??? */
|
autosize.fChanged = 0; /* ??? */
|
||||||
autosize.rcActual = autosize.rcTarget; /* ??? */
|
autosize.rcActual = autosize.rcTarget; /* ??? */
|
||||||
REBAR_Notify((NMHDR *) &autosize, infoPtr, RBN_AUTOSIZE);
|
REBAR_Notify((NMHDR *) &autosize, infoPtr, RBN_AUTOSIZE);
|
||||||
TRACE("RBN_AUTOSIZE client=(%ld,%ld), lp=%08lx\n",
|
TRACE("RBN_AUTOSIZE client=(%d,%d), lp=%08lx\n",
|
||||||
autosize.rcTarget.right, autosize.rcTarget.bottom, lParam);
|
autosize.rcTarget.right, autosize.rcTarget.bottom, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4547,7 +4537,7 @@ REBAR_StyleChanged (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
STYLESTRUCT *ss = (STYLESTRUCT *)lParam;
|
STYLESTRUCT *ss = (STYLESTRUCT *)lParam;
|
||||||
|
|
||||||
TRACE("current style=%08lx, styleOld=%08lx, style being set to=%08lx\n",
|
TRACE("current style=%08x, styleOld=%08x, style being set to=%08x\n",
|
||||||
infoPtr->dwStyle, ss->styleOld, ss->styleNew);
|
infoPtr->dwStyle, ss->styleOld, ss->styleNew);
|
||||||
infoPtr->orgStyle = infoPtr->dwStyle = ss->styleNew;
|
infoPtr->orgStyle = infoPtr->dwStyle = ss->styleNew;
|
||||||
if (GetWindowTheme (infoPtr->hwndSelf))
|
if (GetWindowTheme (infoPtr->hwndSelf))
|
||||||
|
@ -4582,7 +4572,7 @@ REBAR_WindowPosChanged (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
ret = DefWindowProcW(infoPtr->hwndSelf, WM_WINDOWPOSCHANGED,
|
ret = DefWindowProcW(infoPtr->hwndSelf, WM_WINDOWPOSCHANGED,
|
||||||
wParam, lParam);
|
wParam, lParam);
|
||||||
GetWindowRect(infoPtr->hwndSelf, &rc);
|
GetWindowRect(infoPtr->hwndSelf, &rc);
|
||||||
TRACE("hwnd %p new pos (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("hwnd %p new pos (%d,%d)-(%d,%d)\n",
|
||||||
infoPtr->hwndSelf, rc.left, rc.top, rc.right, rc.bottom);
|
infoPtr->hwndSelf, rc.left, rc.top, rc.right, rc.bottom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -4721,12 +4711,7 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
case WM_DRAWITEM:
|
case WM_DRAWITEM:
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
if (infoPtr->NtfUnicode)
|
return SendMessageW(REBAR_GetNotifyParent (infoPtr), uMsg, wParam, lParam);
|
||||||
return SendMessageW (REBAR_GetNotifyParent (infoPtr),
|
|
||||||
uMsg, wParam, lParam);
|
|
||||||
else
|
|
||||||
return SendMessageA (REBAR_GetNotifyParent (infoPtr),
|
|
||||||
uMsg, wParam, lParam);
|
|
||||||
|
|
||||||
|
|
||||||
/* case WM_CHARTOITEM: supported according to ControlSpy */
|
/* case WM_CHARTOITEM: supported according to ControlSpy */
|
||||||
|
|
|
@ -112,7 +112,7 @@ BOOL WINAPI SmoothScrollWindow( SMOOTHSCROLLSTRUCT *smooth ) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
FIXME("(hwnd=%p,flags=%lx,x2=%lx): should smooth scroll here.\n",
|
FIXME("(hwnd=%p,flags=%x,x2=%x): should smooth scroll here.\n",
|
||||||
smooth->hwnd,flags,smooth->x2
|
smooth->hwnd,flags,smooth->x2
|
||||||
);
|
);
|
||||||
/* FIXME: do timer based smooth scrolling */
|
/* FIXME: do timer based smooth scrolling */
|
||||||
|
|
|
@ -114,7 +114,7 @@ STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
|
||||||
POINT pt;
|
POINT pt;
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
TRACE("draw size grip %ld,%ld - %ld,%ld\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
TRACE("draw size grip %d,%d - %d,%d\n", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom);
|
||||||
|
|
||||||
if (theme)
|
if (theme)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ STATUSBAR_DrawPart (STATUS_INFO *infoPtr, HDC hdc, STATUSWINDOWPART *part, int i
|
||||||
HTHEME theme = GetWindowTheme (infoPtr->Self);
|
HTHEME theme = GetWindowTheme (infoPtr->Self);
|
||||||
int themePart = SP_PANE;
|
int themePart = SP_PANE;
|
||||||
|
|
||||||
TRACE("part bound %ld,%ld - %ld,%ld\n", r.left, r.top, r.right, r.bottom);
|
TRACE("part bound %d,%d - %d,%d\n", r.left, r.top, r.right, r.bottom);
|
||||||
if (part->style & SBT_POPOUT)
|
if (part->style & SBT_POPOUT)
|
||||||
border = BDR_RAISEDOUTER;
|
border = BDR_RAISEDOUTER;
|
||||||
else if (part->style & SBT_NOBORDERS)
|
else if (part->style & SBT_NOBORDERS)
|
||||||
|
@ -319,7 +319,7 @@ STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr)
|
||||||
|
|
||||||
/* get our window size */
|
/* get our window size */
|
||||||
GetClientRect (infoPtr->Self, &rect);
|
GetClientRect (infoPtr->Self, &rect);
|
||||||
TRACE("client wnd size is %ld,%ld - %ld,%ld\n", rect.left, rect.top, rect.right, rect.bottom);
|
TRACE("client wnd size is %d,%d - %d,%d\n", rect.left, rect.top, rect.right, rect.bottom);
|
||||||
|
|
||||||
rect.left += infoPtr->horizontalBorder;
|
rect.left += infoPtr->horizontalBorder;
|
||||||
rect.top += infoPtr->verticalBorder;
|
rect.top += infoPtr->verticalBorder;
|
||||||
|
@ -367,8 +367,8 @@ STATUSBAR_Relay2Tip (STATUS_INFO *infoPtr, UINT uMsg,
|
||||||
msg.wParam = wParam;
|
msg.wParam = wParam;
|
||||||
msg.lParam = lParam;
|
msg.lParam = lParam;
|
||||||
msg.time = GetMessageTime ();
|
msg.time = GetMessageTime ();
|
||||||
msg.pt.x = LOWORD(GetMessagePos ());
|
msg.pt.x = (short)LOWORD(GetMessagePos ());
|
||||||
msg.pt.y = HIWORD(GetMessagePos ());
|
msg.pt.y = (short)HIWORD(GetMessagePos ());
|
||||||
|
|
||||||
return SendMessageW (infoPtr->hwndToolTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
return SendMessageW (infoPtr->hwndToolTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
||||||
}
|
}
|
||||||
|
@ -575,7 +575,7 @@ STATUSBAR_SetBkColor (STATUS_INFO *infoPtr, COLORREF color)
|
||||||
infoPtr->clrBk = color;
|
infoPtr->clrBk = color;
|
||||||
InvalidateRect(infoPtr->Self, NULL, FALSE);
|
InvalidateRect(infoPtr->Self, NULL, FALSE);
|
||||||
|
|
||||||
TRACE("CREF: %08lx -> %08lx\n", oldBkColor, infoPtr->clrBk);
|
TRACE("CREF: %08x -> %08x\n", oldBkColor, infoPtr->clrBk);
|
||||||
return oldBkColor;
|
return oldBkColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -992,7 +992,7 @@ STATUSBAR_WMCreate (HWND hwnd, LPCREATESTRUCTA lpCreate)
|
||||||
|
|
||||||
if (dwStyle & SBT_TOOLTIPS) {
|
if (dwStyle & SBT_TOOLTIPS) {
|
||||||
infoPtr->hwndToolTip =
|
infoPtr->hwndToolTip =
|
||||||
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0,
|
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, WS_POPUP | TTS_ALWAYSTIP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, hwnd, 0,
|
CW_USEDEFAULT, hwnd, 0,
|
||||||
(HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL);
|
(HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), NULL);
|
||||||
|
@ -1330,8 +1330,8 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
return STATUSBAR_Relay2Tip (infoPtr, msg, wParam, lParam);
|
return STATUSBAR_Relay2Tip (infoPtr, msg, wParam, lParam);
|
||||||
|
|
||||||
case WM_NCHITTEST:
|
case WM_NCHITTEST:
|
||||||
res = STATUSBAR_WMNCHitTest(infoPtr, (INT)LOWORD(lParam),
|
res = STATUSBAR_WMNCHitTest(infoPtr, (short)LOWORD(lParam),
|
||||||
(INT)HIWORD(lParam));
|
(short)HIWORD(lParam));
|
||||||
if (res != HTERROR) return res;
|
if (res != HTERROR) return res;
|
||||||
return DefWindowProcW (hwnd, msg, wParam, lParam);
|
return DefWindowProcW (hwnd, msg, wParam, lParam);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
|
|
||||||
|
#include "comctl32.h"
|
||||||
|
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
|
@ -144,6 +146,143 @@ static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
|
||||||
return COMCTL32_ChrCmpHelperW(ch1, ch2, NORM_IGNORECASE);
|
return COMCTL32_ChrCmpHelperW(ch1, ch2, NORM_IGNORECASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Str_GetPtrA [COMCTL32.233]
|
||||||
|
*
|
||||||
|
* Copies a string into a destination buffer.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* lpSrc [I] Source string
|
||||||
|
* lpDest [O] Destination buffer
|
||||||
|
* nMaxLen [I] Size of buffer in characters
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* The number of characters copied.
|
||||||
|
*/
|
||||||
|
INT WINAPI Str_GetPtrA (LPCSTR lpSrc, LPSTR lpDest, INT nMaxLen)
|
||||||
|
{
|
||||||
|
INT len;
|
||||||
|
|
||||||
|
TRACE("(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
||||||
|
|
||||||
|
if ((!lpDest || nMaxLen == 0) && lpSrc)
|
||||||
|
return (strlen(lpSrc) + 1);
|
||||||
|
|
||||||
|
if (nMaxLen == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (lpSrc == NULL) {
|
||||||
|
lpDest[0] = '\0';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
len = strlen(lpSrc) + 1;
|
||||||
|
if (len >= nMaxLen)
|
||||||
|
len = nMaxLen;
|
||||||
|
|
||||||
|
RtlMoveMemory (lpDest, lpSrc, len - 1);
|
||||||
|
lpDest[len - 1] = '\0';
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Str_SetPtrA [COMCTL32.234]
|
||||||
|
*
|
||||||
|
* Makes a copy of a string, allocating memory if necessary.
|
||||||
|
*
|
||||||
|
* PARAMS
|
||||||
|
* lppDest [O] Pointer to destination string
|
||||||
|
* lpSrc [I] Source string
|
||||||
|
*
|
||||||
|
* RETURNS
|
||||||
|
* Success: TRUE
|
||||||
|
* Failure: FALSE
|
||||||
|
*
|
||||||
|
* NOTES
|
||||||
|
* Set lpSrc to NULL to free the memory allocated by a previous call
|
||||||
|
* to this function.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI Str_SetPtrA (LPSTR *lppDest, LPCSTR lpSrc)
|
||||||
|
{
|
||||||
|
TRACE("(%p %p)\n", lppDest, lpSrc);
|
||||||
|
|
||||||
|
if (lpSrc) {
|
||||||
|
LPSTR ptr = ReAlloc (*lppDest, strlen (lpSrc) + 1);
|
||||||
|
if (!ptr)
|
||||||
|
return FALSE;
|
||||||
|
strcpy (ptr, lpSrc);
|
||||||
|
*lppDest = ptr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (*lppDest) {
|
||||||
|
Free (*lppDest);
|
||||||
|
*lppDest = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Str_GetPtrW [COMCTL32.235]
|
||||||
|
*
|
||||||
|
* See Str_GetPtrA.
|
||||||
|
*/
|
||||||
|
INT WINAPI Str_GetPtrW (LPCWSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
|
||||||
|
{
|
||||||
|
INT len;
|
||||||
|
|
||||||
|
TRACE("(%p %p %d)\n", lpSrc, lpDest, nMaxLen);
|
||||||
|
|
||||||
|
if (!lpDest && lpSrc)
|
||||||
|
return strlenW (lpSrc);
|
||||||
|
|
||||||
|
if (nMaxLen == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (lpSrc == NULL) {
|
||||||
|
lpDest[0] = L'\0';
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
len = strlenW (lpSrc);
|
||||||
|
if (len >= nMaxLen)
|
||||||
|
len = nMaxLen - 1;
|
||||||
|
|
||||||
|
RtlMoveMemory (lpDest, lpSrc, len*sizeof(WCHAR));
|
||||||
|
lpDest[len] = L'\0';
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Str_SetPtrW [COMCTL32.236]
|
||||||
|
*
|
||||||
|
* See Str_SetPtrA.
|
||||||
|
*/
|
||||||
|
BOOL WINAPI Str_SetPtrW (LPWSTR *lppDest, LPCWSTR lpSrc)
|
||||||
|
{
|
||||||
|
TRACE("(%p %p)\n", lppDest, lpSrc);
|
||||||
|
|
||||||
|
if (lpSrc) {
|
||||||
|
INT len = strlenW (lpSrc) + 1;
|
||||||
|
LPWSTR ptr = ReAlloc (*lppDest, len * sizeof(WCHAR));
|
||||||
|
if (!ptr)
|
||||||
|
return FALSE;
|
||||||
|
strcpyW (ptr, lpSrc);
|
||||||
|
*lppDest = ptr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (*lppDest) {
|
||||||
|
Free (*lppDest);
|
||||||
|
*lppDest = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
* StrChrA [COMCTL32.350]
|
* StrChrA [COMCTL32.350]
|
||||||
*
|
*
|
||||||
|
|
|
@ -1580,15 +1580,15 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
|
||||||
case WM_LBUTTONDOWN:
|
case WM_LBUTTONDOWN:
|
||||||
{
|
{
|
||||||
POINT pt;
|
POINT pt;
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
return SYSLINK_LButtonDown(infoPtr, wParam, &pt);
|
return SYSLINK_LButtonDown(infoPtr, wParam, &pt);
|
||||||
}
|
}
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
{
|
{
|
||||||
POINT pt;
|
POINT pt;
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
return SYSLINK_LButtonUp(infoPtr, wParam, &pt);
|
return SYSLINK_LButtonUp(infoPtr, wParam, &pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1639,8 +1639,8 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
|
||||||
{
|
{
|
||||||
POINT pt;
|
POINT pt;
|
||||||
RECT rc;
|
RECT rc;
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
GetClientRect(infoPtr->Self, &rc);
|
GetClientRect(infoPtr->Self, &rc);
|
||||||
ScreenToClient(infoPtr->Self, &pt);
|
ScreenToClient(infoPtr->Self, &pt);
|
||||||
|
|
|
@ -193,8 +193,8 @@ TAB_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
|
||||||
msg.wParam = wParam;
|
msg.wParam = wParam;
|
||||||
msg.lParam = lParam;
|
msg.lParam = lParam;
|
||||||
msg.time = GetMessageTime ();
|
msg.time = GetMessageTime ();
|
||||||
msg.pt.x = LOWORD(GetMessagePos ());
|
msg.pt.x = (short)LOWORD(GetMessagePos ());
|
||||||
msg.pt.y = HIWORD(GetMessagePos ());
|
msg.pt.y = (short)HIWORD(GetMessagePos ());
|
||||||
|
|
||||||
SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ static void
|
||||||
TAB_DumpItemExternalT(TCITEMW *pti, UINT iItem, BOOL isW)
|
TAB_DumpItemExternalT(TCITEMW *pti, UINT iItem, BOOL isW)
|
||||||
{
|
{
|
||||||
if (TRACE_ON(tab)) {
|
if (TRACE_ON(tab)) {
|
||||||
TRACE("external tab %d, mask=0x%08x, dwState=0x%08lx, dwStateMask=0x%08lx, cchTextMax=0x%08x\n",
|
TRACE("external tab %d, mask=0x%08x, dwState=0x%08x, dwStateMask=0x%08x, cchTextMax=0x%08x\n",
|
||||||
iItem, pti->mask, pti->dwState, pti->dwStateMask, pti->cchTextMax);
|
iItem, pti->mask, pti->dwState, pti->dwStateMask, pti->cchTextMax);
|
||||||
TRACE("external tab %d, iImage=%d, lParam=0x%08lx, pszTextW=%s\n",
|
TRACE("external tab %d, iImage=%d, lParam=0x%08lx, pszTextW=%s\n",
|
||||||
iItem, pti->iImage, pti->lParam, isW ? debugstr_w(pti->pszText) : debugstr_a((LPSTR)pti->pszText));
|
iItem, pti->iImage, pti->lParam, isW ? debugstr_w(pti->pszText) : debugstr_a((LPSTR)pti->pszText));
|
||||||
|
@ -217,10 +217,10 @@ TAB_DumpItemInternal(TAB_INFO *infoPtr, UINT iItem)
|
||||||
TAB_ITEM *ti;
|
TAB_ITEM *ti;
|
||||||
|
|
||||||
ti = TAB_GetItem(infoPtr, iItem);
|
ti = TAB_GetItem(infoPtr, iItem);
|
||||||
TRACE("tab %d, mask=0x%08x, dwState=0x%08lx, pszText=%s, iImage=%d\n",
|
TRACE("tab %d, mask=0x%08x, dwState=0x%08x, pszText=%s, iImage=%d\n",
|
||||||
iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
|
iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
|
||||||
ti->iImage);
|
ti->iImage);
|
||||||
TRACE("tab %d, rect.left=%ld, rect.top(row)=%ld\n",
|
TRACE("tab %d, rect.left=%d, rect.top(row)=%d\n",
|
||||||
iItem, ti->rect.left, ti->rect.top);
|
iItem, ti->rect.left, ti->rect.top);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,7 @@ static BOOL TAB_InternalGetItemRect(
|
||||||
SELECTED_TAB_OFFSET,
|
SELECTED_TAB_OFFSET,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
TRACE("item %d tab h=%d, rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("item %d tab h=%d, rect=(%d,%d)-(%d,%d)\n",
|
||||||
itemIndex, infoPtr->tabHeight,
|
itemIndex, infoPtr->tabHeight,
|
||||||
itemRect->left, itemRect->top, itemRect->right, itemRect->bottom);
|
itemRect->left, itemRect->top, itemRect->right, itemRect->bottom);
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ static void TAB_FocusChanging(const TAB_INFO *infoPtr)
|
||||||
*/
|
*/
|
||||||
if (isVisible)
|
if (isVisible)
|
||||||
{
|
{
|
||||||
TRACE("invalidate (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("invalidate (%d,%d)-(%d,%d)\n",
|
||||||
selectedRect.left,selectedRect.top,
|
selectedRect.left,selectedRect.top,
|
||||||
selectedRect.right,selectedRect.bottom);
|
selectedRect.right,selectedRect.bottom);
|
||||||
InvalidateRect(infoPtr->hwnd, &selectedRect, TRUE);
|
InvalidateRect(infoPtr->hwnd, &selectedRect, TRUE);
|
||||||
|
@ -589,8 +589,8 @@ TAB_NCHitTest (TAB_INFO *infoPtr, LPARAM lParam)
|
||||||
POINT pt;
|
POINT pt;
|
||||||
UINT dummyflag;
|
UINT dummyflag;
|
||||||
|
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
ScreenToClient(infoPtr->hwnd, &pt);
|
ScreenToClient(infoPtr->hwnd, &pt);
|
||||||
|
|
||||||
if (TAB_InternalHitTest(infoPtr, pt, &dummyflag) == -1)
|
if (TAB_InternalHitTest(infoPtr, pt, &dummyflag) == -1)
|
||||||
|
@ -618,8 +618,8 @@ TAB_LButtonDown (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd,
|
TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd,
|
||||||
WM_LBUTTONDOWN, wParam, lParam);
|
WM_LBUTTONDOWN, wParam, lParam);
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
newItem = TAB_InternalHitTest (infoPtr, pt, &dummy);
|
newItem = TAB_InternalHitTest (infoPtr, pt, &dummy);
|
||||||
|
|
||||||
|
@ -790,8 +790,8 @@ TAB_RecalcHotTrack
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pt.x = LOWORD(*pos);
|
pt.x = (short)LOWORD(*pos);
|
||||||
pt.y = HIWORD(*pos);
|
pt.y = (short)HIWORD(*pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
item = TAB_InternalHitTest(infoPtr, pt, &flags);
|
item = TAB_InternalHitTest(infoPtr, pt, &flags);
|
||||||
|
@ -876,7 +876,7 @@ static LRESULT TAB_AdjustRect(
|
||||||
DWORD lStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
|
DWORD lStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
|
||||||
LONG *iRightBottom, *iLeftTop;
|
LONG *iRightBottom, *iLeftTop;
|
||||||
|
|
||||||
TRACE ("hwnd=%p fLarger=%d (%ld,%ld)-(%ld,%ld)\n", infoPtr->hwnd, fLarger, prc->left, prc->top, prc->right, prc->bottom);
|
TRACE ("hwnd=%p fLarger=%d (%d,%d)-(%d,%d)\n", infoPtr->hwnd, fLarger, prc->left, prc->top, prc->right, prc->bottom);
|
||||||
|
|
||||||
if(lStyle & TCS_VERTICAL)
|
if(lStyle & TCS_VERTICAL)
|
||||||
{
|
{
|
||||||
|
@ -1145,11 +1145,11 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
((lStyle & TCS_BUTTONS) ? 2 : 1) *
|
((lStyle & TCS_BUTTONS) ? 2 : 1) *
|
||||||
infoPtr->uVItemPadding;
|
infoPtr->uVItemPadding;
|
||||||
|
|
||||||
TRACE("tabH=%d, tmH=%ld, iconh=%d\n",
|
TRACE("tabH=%d, tmH=%d, iconh=%d\n",
|
||||||
infoPtr->tabHeight, fontMetrics.tmHeight, icon_height);
|
infoPtr->tabHeight, fontMetrics.tmHeight, icon_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("client right=%ld\n", clientRect.right);
|
TRACE("client right=%d\n", clientRect.right);
|
||||||
|
|
||||||
/* Get the icon width */
|
/* Get the icon width */
|
||||||
if (infoPtr->himl)
|
if (infoPtr->himl)
|
||||||
|
@ -1206,7 +1206,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
tabwidth = max(tabwidth, infoPtr->tabMinWidth);
|
tabwidth = max(tabwidth, infoPtr->tabMinWidth);
|
||||||
|
|
||||||
curr->rect.right = curr->rect.left + tabwidth;
|
curr->rect.right = curr->rect.left + tabwidth;
|
||||||
TRACE("for <%s>, l,r=%ld,%ld\n",
|
TRACE("for <%s>, l,r=%d,%d\n",
|
||||||
debugstr_w(curr->pszText), curr->rect.left, curr->rect.right);
|
debugstr_w(curr->pszText), curr->rect.left, curr->rect.right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1226,14 +1226,14 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
|
|
||||||
curr->rect.left = 0;
|
curr->rect.left = 0;
|
||||||
curItemRowCount++;
|
curItemRowCount++;
|
||||||
TRACE("wrapping <%s>, l,r=%ld,%ld\n", debugstr_w(curr->pszText),
|
TRACE("wrapping <%s>, l,r=%d,%d\n", debugstr_w(curr->pszText),
|
||||||
curr->rect.left, curr->rect.right);
|
curr->rect.left, curr->rect.right);
|
||||||
}
|
}
|
||||||
|
|
||||||
curr->rect.bottom = 0;
|
curr->rect.bottom = 0;
|
||||||
curr->rect.top = curItemRowCount - 1;
|
curr->rect.top = curItemRowCount - 1;
|
||||||
|
|
||||||
TRACE("Rect: T %li, L %li, B %li, R %li\n", curr->rect.top,
|
TRACE("Rect: T %i, L %i, B %i, R %i\n", curr->rect.top,
|
||||||
curr->rect.left, curr->rect.bottom, curr->rect.right);
|
curr->rect.left, curr->rect.bottom, curr->rect.right);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1304,7 +1304,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
curr->rect.right -= curr->rect.left;
|
curr->rect.right -= curr->rect.left;
|
||||||
curr->rect.left = 0;
|
curr->rect.left = 0;
|
||||||
|
|
||||||
TRACE("r=%ld, cl=%d, cl.r=%ld, iCount=%d, iRow=%d, uNumRows=%d, remTab=%d, tabPerRow=%d\n",
|
TRACE("r=%d, cl=%d, cl.r=%d, iCount=%d, iRow=%d, uNumRows=%d, remTab=%d, tabPerRow=%d\n",
|
||||||
curr->rect.right, curItemLeftPos, clientRect.right,
|
curr->rect.right, curItemLeftPos, clientRect.right,
|
||||||
iCount, iRow, infoPtr->uNumRows, remTab, tabPerRow);
|
iCount, iRow, infoPtr->uNumRows, remTab, tabPerRow);
|
||||||
|
|
||||||
|
@ -1341,7 +1341,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
else
|
else
|
||||||
curItemLeftPos = curr->rect.right;
|
curItemLeftPos = curr->rect.right;
|
||||||
|
|
||||||
TRACE("arranging <%s>, l,r=%ld,%ld, row=%ld\n",
|
TRACE("arranging <%s>, l,r=%d,%d, row=%d\n",
|
||||||
debugstr_w(curr->pszText), curr->rect.left,
|
debugstr_w(curr->pszText), curr->rect.left,
|
||||||
curr->rect.right, curr->rect.top);
|
curr->rect.right, curr->rect.top);
|
||||||
}
|
}
|
||||||
|
@ -1393,7 +1393,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
item->rect.left += iCount * widthDiff;
|
item->rect.left += iCount * widthDiff;
|
||||||
item->rect.right += (iCount + 1) * widthDiff;
|
item->rect.right += (iCount + 1) * widthDiff;
|
||||||
|
|
||||||
TRACE("adjusting 1 <%s>, l,r=%ld,%ld\n",
|
TRACE("adjusting 1 <%s>, l,r=%d,%d\n",
|
||||||
debugstr_w(item->pszText),
|
debugstr_w(item->pszText),
|
||||||
item->rect.left, item->rect.right);
|
item->rect.left, item->rect.right);
|
||||||
|
|
||||||
|
@ -1405,7 +1405,7 @@ static void TAB_SetItemBounds (TAB_INFO *infoPtr)
|
||||||
start->rect.left = clientRect.left;
|
start->rect.left = clientRect.left;
|
||||||
start->rect.right = clientRect.right - 4;
|
start->rect.right = clientRect.right - 4;
|
||||||
|
|
||||||
TRACE("adjusting 2 <%s>, l,r=%ld,%ld\n",
|
TRACE("adjusting 2 <%s>, l,r=%d,%d\n",
|
||||||
debugstr_w(start->pszText),
|
debugstr_w(start->pszText),
|
||||||
start->rect.left, start->rect.right);
|
start->rect.left, start->rect.right);
|
||||||
|
|
||||||
|
@ -1626,7 +1626,7 @@ TAB_DrawItemInterior
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TRACE("drawRect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("drawRect=(%d,%d)-(%d,%d)\n",
|
||||||
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom);
|
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom);
|
||||||
|
|
||||||
/* Clear interior */
|
/* Clear interior */
|
||||||
|
@ -1770,7 +1770,7 @@ TAB_DrawItemInterior
|
||||||
if (center_offset_v < 0)
|
if (center_offset_v < 0)
|
||||||
center_offset_v = 0;
|
center_offset_v = 0;
|
||||||
|
|
||||||
TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%ld,%ld)-(%ld,%ld), textlen=%ld\n",
|
TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%d,%d)-(%d,%d), textlen=%d\n",
|
||||||
debugstr_w(item->pszText), center_offset_h, center_offset_v,
|
debugstr_w(item->pszText), center_offset_h, center_offset_v,
|
||||||
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom,
|
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom,
|
||||||
(rcText.right-rcText.left));
|
(rcText.right-rcText.left));
|
||||||
|
@ -1797,7 +1797,7 @@ TAB_DrawItemInterior
|
||||||
drawRect->left += cx + infoPtr->uHItemPadding;
|
drawRect->left += cx + infoPtr->uHItemPadding;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("drawing image=%d, left=%ld, top=%ld\n",
|
TRACE("drawing image=%d, left=%d, top=%d\n",
|
||||||
item->iImage, rcImage.left, rcImage.top-1);
|
item->iImage, rcImage.left, rcImage.top-1);
|
||||||
ImageList_Draw
|
ImageList_Draw
|
||||||
(
|
(
|
||||||
|
@ -1901,7 +1901,7 @@ TAB_DrawItemInterior
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%ld,%ld)-(%ld,%ld), textlen=%ld\n",
|
TRACE("for <%s>, c_o_h=%d, c_o_v=%d, draw=(%d,%d)-(%d,%d), textlen=%d\n",
|
||||||
debugstr_w(item->pszText), center_offset_h, center_offset_v,
|
debugstr_w(item->pszText), center_offset_h, center_offset_v,
|
||||||
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom,
|
drawRect->left, drawRect->top, drawRect->right, drawRect->bottom,
|
||||||
(rcText.right-rcText.left));
|
(rcText.right-rcText.left));
|
||||||
|
@ -2092,7 +2092,7 @@ static void TAB_DrawItem(
|
||||||
/* Adjust both rectangles to match native */
|
/* Adjust both rectangles to match native */
|
||||||
r.left += (1-ZZ);
|
r.left += (1-ZZ);
|
||||||
|
|
||||||
TRACE("<right> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("<right> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
|
||||||
iItem,
|
iItem,
|
||||||
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
||||||
r.left,r.top,r.right,r.bottom);
|
r.left,r.top,r.right,r.bottom);
|
||||||
|
@ -2133,7 +2133,7 @@ static void TAB_DrawItem(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRACE("<left> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("<left> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
|
||||||
iItem,
|
iItem,
|
||||||
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
||||||
r.left,r.top,r.right,r.bottom);
|
r.left,r.top,r.right,r.bottom);
|
||||||
|
@ -2187,7 +2187,7 @@ static void TAB_DrawItem(
|
||||||
r.top -= 1;
|
r.top -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("<bottom> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("<bottom> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
|
||||||
iItem,
|
iItem,
|
||||||
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
||||||
r.left,r.top,r.right,r.bottom);
|
r.left,r.top,r.right,r.bottom);
|
||||||
|
@ -2241,7 +2241,7 @@ static void TAB_DrawItem(
|
||||||
r.bottom += 2;
|
r.bottom += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("<top> item=%d, fill=(%ld,%ld)-(%ld,%ld), edge=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("<top> item=%d, fill=(%d,%d)-(%d,%d), edge=(%d,%d)-(%d,%d)\n",
|
||||||
iItem,
|
iItem,
|
||||||
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
fillRect.left,fillRect.top,fillRect.right,fillRect.bottom,
|
||||||
r.left,r.top,r.right,r.bottom);
|
r.left,r.top,r.right,r.bottom);
|
||||||
|
@ -2312,7 +2312,7 @@ static void TAB_DrawBorder (TAB_INFO *infoPtr, HDC hdc)
|
||||||
rect.top += infoPtr->tabHeight * infoPtr->uNumRows + CONTROL_BORDER_SIZEX;
|
rect.top += infoPtr->tabHeight * infoPtr->uNumRows + CONTROL_BORDER_SIZEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("border=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("border=(%d,%d)-(%d,%d)\n",
|
||||||
rect.left, rect.top, rect.right, rect.bottom);
|
rect.left, rect.top, rect.right, rect.bottom);
|
||||||
|
|
||||||
if (theme)
|
if (theme)
|
||||||
|
@ -2554,7 +2554,7 @@ static void TAB_InvalidateTabArea(TAB_INFO* infoPtr)
|
||||||
rInvalidate.right = clientRect.right - r.left;
|
rInvalidate.right = clientRect.right - r.left;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("invalidate (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("invalidate (%d,%d)-(%d,%d)\n",
|
||||||
rInvalidate.left, rInvalidate.top,
|
rInvalidate.left, rInvalidate.top,
|
||||||
rInvalidate.right, rInvalidate.bottom);
|
rInvalidate.right, rInvalidate.bottom);
|
||||||
|
|
||||||
|
@ -2571,7 +2571,7 @@ static inline LRESULT TAB_Paint (TAB_INFO *infoPtr, HDC hdcPaint)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hdc = BeginPaint (infoPtr->hwnd, &ps);
|
hdc = BeginPaint (infoPtr->hwnd, &ps);
|
||||||
TRACE("erase %d, rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("erase %d, rect=(%d,%d)-(%d,%d)\n",
|
||||||
ps.fErase,
|
ps.fErase,
|
||||||
ps.rcPaint.left,ps.rcPaint.top,ps.rcPaint.right,ps.rcPaint.bottom);
|
ps.rcPaint.left,ps.rcPaint.top,ps.rcPaint.right,ps.rcPaint.bottom);
|
||||||
}
|
}
|
||||||
|
@ -2593,7 +2593,7 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnicode)
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
|
||||||
GetClientRect (infoPtr->hwnd, &rect);
|
GetClientRect (infoPtr->hwnd, &rect);
|
||||||
TRACE("Rect: %p T %li, L %li, B %li, R %li\n", infoPtr->hwnd,
|
TRACE("Rect: %p T %i, L %i, B %i, R %i\n", infoPtr->hwnd,
|
||||||
rect.top, rect.left, rect.bottom, rect.right);
|
rect.top, rect.left, rect.bottom, rect.right);
|
||||||
|
|
||||||
pti = (TCITEMW *)lParam;
|
pti = (TCITEMW *)lParam;
|
||||||
|
@ -3038,7 +3038,7 @@ static LRESULT TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (dwStyle & TCS_TOOLTIPS) {
|
if (dwStyle & TCS_TOOLTIPS) {
|
||||||
/* Create tooltip control */
|
/* Create tooltip control */
|
||||||
infoPtr->hwndToolTip =
|
infoPtr->hwndToolTip =
|
||||||
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0,
|
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
hwnd, 0, 0, 0);
|
hwnd, 0, 0, 0);
|
||||||
|
|
|
@ -280,8 +280,10 @@ LRESULT CALLBACK THEMING_ComboSubclassProc (HWND hwnd, UINT msg,
|
||||||
{
|
{
|
||||||
/* Dropdown button hot-tracking */
|
/* Dropdown button hot-tracking */
|
||||||
COMBOBOXINFO cbi;
|
COMBOBOXINFO cbi;
|
||||||
POINT pt = {LOWORD(lParam), HIWORD(lParam)};
|
POINT pt;
|
||||||
|
|
||||||
|
pt.x = (short)LOWORD(lParam);
|
||||||
|
pt.y = (short)HIWORD(lParam);
|
||||||
cbi.cbSize = sizeof (cbi);
|
cbi.cbSize = sizeof (cbi);
|
||||||
SendMessageW (hwnd, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbi);
|
SendMessageW (hwnd, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbi);
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,8 @@ static LRESULT CALLBACK subclass_proc ## N (HWND wnd, UINT msg, \
|
||||||
{ \
|
{ \
|
||||||
LRESULT result; \
|
LRESULT result; \
|
||||||
ULONG_PTR refData; \
|
ULONG_PTR refData; \
|
||||||
SetPropW (wnd, MAKEINTATOMW (atSubclassProp), (HANDLE)N); \
|
SetPropW (wnd, (LPCWSTR)MAKEINTATOM(atSubclassProp), (HANDLE)N); \
|
||||||
refData = (ULONG_PTR)GetPropW (wnd, MAKEINTATOMW (atRefDataProp)); \
|
refData = (ULONG_PTR)GetPropW (wnd, (LPCWSTR)MAKEINTATOM(atRefDataProp)); \
|
||||||
TRACE ("%d; (%p, %x, %x, %lx, %lx)\n", N, wnd, msg, wParam, lParam, \
|
TRACE ("%d; (%p, %x, %x, %lx, %lx)\n", N, wnd, msg, wParam, lParam, \
|
||||||
refData); \
|
refData); \
|
||||||
result = subclasses[N].subclassProc (wnd, msg, wParam, lParam, refData);\
|
result = subclasses[N].subclassProc (wnd, msg, wParam, lParam, refData);\
|
||||||
|
@ -138,7 +138,7 @@ void THEMING_Initialize (void)
|
||||||
|
|
||||||
if (!RegisterClassExW (&class))
|
if (!RegisterClassExW (&class))
|
||||||
{
|
{
|
||||||
ERR("Could not re-register class %s: %lx\n",
|
ERR("Could not re-register class %s: %x\n",
|
||||||
debugstr_w (subclasses[i].className), GetLastError ());
|
debugstr_w (subclasses[i].className), GetLastError ());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -173,7 +173,7 @@ void THEMING_Uninitialize (void)
|
||||||
*/
|
*/
|
||||||
LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
INT_PTR subclass = (INT_PTR)GetPropW (wnd, MAKEINTATOMW (atSubclassProp));
|
INT_PTR subclass = (INT_PTR)GetPropW (wnd, (LPCWSTR)MAKEINTATOM(atSubclassProp));
|
||||||
WNDPROC oldProc = originalProcs[subclass];
|
WNDPROC oldProc = originalProcs[subclass];
|
||||||
return CallWindowProcW (oldProc, wnd, msg, wParam, lParam);
|
return CallWindowProcW (oldProc, wnd, msg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
@ -185,5 +185,5 @@ LRESULT THEMING_CallOriginalClass (HWND wnd, UINT msg, WPARAM wParam, LPARAM lPa
|
||||||
*/
|
*/
|
||||||
void THEMING_SetSubclassData (HWND wnd, ULONG_PTR refData)
|
void THEMING_SetSubclassData (HWND wnd, ULONG_PTR refData)
|
||||||
{
|
{
|
||||||
SetPropW (wnd, MAKEINTATOMW (atRefDataProp), (HANDLE)refData);
|
SetPropW (wnd, (LPCWSTR)MAKEINTATOM(atRefDataProp), (HANDLE)refData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ typedef struct
|
||||||
BYTE fsStyle;
|
BYTE fsStyle;
|
||||||
BYTE bHot;
|
BYTE bHot;
|
||||||
BYTE bDropDownPressed;
|
BYTE bDropDownPressed;
|
||||||
DWORD dwData;
|
DWORD_PTR dwData;
|
||||||
INT_PTR iString;
|
INT_PTR iString;
|
||||||
INT nRow;
|
INT nRow;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
|
@ -125,6 +125,7 @@ typedef struct
|
||||||
INT nButtonHeight;
|
INT nButtonHeight;
|
||||||
INT nButtonWidth;
|
INT nButtonWidth;
|
||||||
INT nBitmapHeight;
|
INT nBitmapHeight;
|
||||||
|
INT nVBitmapHeight; /* see TOOLBAR_Create for an explanation */
|
||||||
INT nBitmapWidth;
|
INT nBitmapWidth;
|
||||||
INT nIndent;
|
INT nIndent;
|
||||||
INT nRows; /* number of button rows */
|
INT nRows; /* number of button rows */
|
||||||
|
@ -140,6 +141,7 @@ typedef struct
|
||||||
INT nOldHit;
|
INT nOldHit;
|
||||||
INT nHotItem; /* index of the "hot" item */
|
INT nHotItem; /* index of the "hot" item */
|
||||||
SIZE szPadding; /* padding values around button */
|
SIZE szPadding; /* padding values around button */
|
||||||
|
INT iTopMargin; /* the top margin */
|
||||||
INT iListGap; /* default gap between text and image for toolbar with list style */
|
INT iListGap; /* default gap between text and image for toolbar with list style */
|
||||||
HFONT hDefaultFont;
|
HFONT hDefaultFont;
|
||||||
HFONT hFont; /* text font */
|
HFONT hFont; /* text font */
|
||||||
|
@ -246,6 +248,7 @@ static VOID TOOLBAR_DeleteImageList(PIMLENTRY **pies, INT *cies);
|
||||||
static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIST himl, INT id);
|
static HIMAGELIST TOOLBAR_InsertImageList(PIMLENTRY **pies, INT *cies, HIMAGELIST himl, INT id);
|
||||||
static LRESULT TOOLBAR_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam);
|
static LRESULT TOOLBAR_LButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam);
|
||||||
static void TOOLBAR_SetHotItemEx (TOOLBAR_INFO *infoPtr, INT nHit, DWORD dwReason);
|
static void TOOLBAR_SetHotItemEx (TOOLBAR_INFO *infoPtr, INT nHit, DWORD dwReason);
|
||||||
|
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_TooltipSetRect(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *button);
|
static void TOOLBAR_TooltipSetRect(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *button);
|
||||||
|
@ -253,6 +256,10 @@ static void TOOLBAR_TooltipSetRect(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *button);
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_NotifyFormat(TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam);
|
TOOLBAR_NotifyFormat(TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
inline static int default_top_margin(TOOLBAR_INFO *infoPtr)
|
||||||
|
{
|
||||||
|
return (infoPtr->dwStyle & TBSTYLE_FLAT ? 0 : TOP_BORDER);
|
||||||
|
}
|
||||||
|
|
||||||
static LPWSTR
|
static LPWSTR
|
||||||
TOOLBAR_GetText(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
|
TOOLBAR_GetText(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
|
||||||
|
@ -277,7 +284,7 @@ TOOLBAR_DumpButton(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *bP, INT btn_num, BOOL in
|
||||||
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)
|
if (internal)
|
||||||
TRACE("button %d id %d, hot=%s, row=%d, rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("button %d id %d, hot=%s, row=%d, rect=(%d,%d)-(%d,%d)\n",
|
||||||
btn_num, bP->idCommand,
|
btn_num, bP->idCommand,
|
||||||
(bP->bHot) ? "TRUE":"FALSE", bP->nRow,
|
(bP->bHot) ? "TRUE":"FALSE", bP->nRow,
|
||||||
bP->rect.left, bP->rect.top,
|
bP->rect.left, bP->rect.top,
|
||||||
|
@ -292,7 +299,7 @@ TOOLBAR_DumpToolbar(TOOLBAR_INFO *iP, INT line)
|
||||||
if (TRACE_ON(toolbar)) {
|
if (TRACE_ON(toolbar)) {
|
||||||
INT i;
|
INT i;
|
||||||
|
|
||||||
TRACE("toolbar %p at line %d, exStyle=%08lx, buttons=%d, bitmaps=%d, strings=%d, style=%08lx\n",
|
TRACE("toolbar %p at line %d, exStyle=%08x, buttons=%d, bitmaps=%d, strings=%d, style=%08x\n",
|
||||||
iP->hwndSelf, line,
|
iP->hwndSelf, line,
|
||||||
iP->dwExStyle, iP->nNumButtons, iP->nNumBitmaps,
|
iP->dwExStyle, iP->nNumButtons, iP->nNumBitmaps,
|
||||||
iP->nNumStrings, iP->dwStyle);
|
iP->nNumStrings, iP->dwStyle);
|
||||||
|
@ -365,7 +372,7 @@ TOOLBAR_GetBitmapIndex(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr)
|
||||||
if (nmgd.dwMask & TBNF_DI_SETITEM)
|
if (nmgd.dwMask & TBNF_DI_SETITEM)
|
||||||
btnPtr->iBitmap = nmgd.iImage;
|
btnPtr->iBitmap = nmgd.iImage;
|
||||||
ret = nmgd.iImage;
|
ret = nmgd.iImage;
|
||||||
TRACE("TBN_GETDISPINFO returned bitmap id %d, mask=%08lx, nNumBitmaps=%d\n",
|
TRACE("TBN_GETDISPINFO returned bitmap id %d, mask=%08x, nNumBitmaps=%d\n",
|
||||||
ret, nmgd.dwMask, infoPtr->nNumBitmaps);
|
ret, nmgd.dwMask, infoPtr->nNumBitmaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,7 +508,7 @@ TOOLBAR_DrawDDFlatSeparator (LPRECT lpRect, HDC hdc, TBUTTON_INFO *btnPtr, TOOLB
|
||||||
|
|
||||||
InflateRect (&myrect, -2, 0);
|
InflateRect (&myrect, -2, 0);
|
||||||
|
|
||||||
TRACE("rect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("rect=(%d,%d)-(%d,%d)\n",
|
||||||
myrect.left, myrect.top, myrect.right, myrect.bottom);
|
myrect.left, myrect.top, myrect.right, myrect.bottom);
|
||||||
|
|
||||||
newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
|
newcolor = (infoPtr->clrBtnShadow == CLR_DEFAULT) ?
|
||||||
|
@ -560,7 +567,7 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, RECT *rcText, LPWSTR lpText,
|
||||||
|
|
||||||
/* draw text */
|
/* draw text */
|
||||||
if (lpText) {
|
if (lpText) {
|
||||||
TRACE("string=%s rect=(%ld,%ld)-(%ld,%ld)\n", debugstr_w(lpText),
|
TRACE("string=%s rect=(%d,%d)-(%d,%d)\n", debugstr_w(lpText),
|
||||||
rcText->left, rcText->top, rcText->right, rcText->bottom);
|
rcText->left, rcText->top, rcText->right, rcText->bottom);
|
||||||
|
|
||||||
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
||||||
|
@ -889,15 +896,15 @@ TOOLBAR_DrawButton (HWND hwnd, TBUTTON_INFO *btnPtr, HDC hdc, DWORD dwBaseCustDr
|
||||||
rcBitmap.left += GetSystemMetrics(SM_CXEDGE) + infoPtr->iListGap / 2;
|
rcBitmap.left += GetSystemMetrics(SM_CXEDGE) + infoPtr->iListGap / 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rcBitmap.left += (infoPtr->nButtonWidth - infoPtr->nBitmapWidth) / 2;
|
rcBitmap.left += ((rc.right - rc.left) - infoPtr->nBitmapWidth) / 2;
|
||||||
|
|
||||||
rcBitmap.top += infoPtr->szPadding.cy / 2;
|
rcBitmap.top += infoPtr->szPadding.cy / 2;
|
||||||
|
|
||||||
TRACE("iBitmap=%d, start=(%ld,%ld) w=%d, h=%d\n",
|
TRACE("iBitmap=%d, start=(%d,%d) w=%d, h=%d\n",
|
||||||
btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
|
btnPtr->iBitmap, rcBitmap.left, rcBitmap.top,
|
||||||
infoPtr->nBitmapWidth, infoPtr->nBitmapHeight);
|
infoPtr->nBitmapWidth, infoPtr->nBitmapHeight);
|
||||||
TRACE("Text=%s\n", debugstr_w(lpText));
|
TRACE("Text=%s\n", debugstr_w(lpText));
|
||||||
TRACE("iListGap=%d, padding = { %ld, %ld }\n", infoPtr->iListGap, infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
TRACE("iListGap=%d, padding = { %d, %d }\n", infoPtr->iListGap, infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
||||||
|
|
||||||
/* calculate text position */
|
/* calculate text position */
|
||||||
if (lpText)
|
if (lpText)
|
||||||
|
@ -1111,6 +1118,8 @@ TOOLBAR_Refresh (HWND hwnd, HDC hdc, PAINTSTRUCT* ps)
|
||||||
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++)
|
for (i = 0; i < infoPtr->nNumButtons; i++, btnPtr++)
|
||||||
{
|
{
|
||||||
BOOL bDraw;
|
BOOL bDraw;
|
||||||
|
if (!RectVisible(hdc, &btnPtr->rect))
|
||||||
|
continue;
|
||||||
if (infoPtr->dwExStyle & TBSTYLE_EX_HIDECLIPPEDBUTTONS)
|
if (infoPtr->dwExStyle & TBSTYLE_EX_HIDECLIPPEDBUTTONS)
|
||||||
{
|
{
|
||||||
IntersectRect(&rcTemp, &rcClient, &btnPtr->rect);
|
IntersectRect(&rcTemp, &rcClient, &btnPtr->rect);
|
||||||
|
@ -1196,7 +1205,7 @@ TOOLBAR_MeasureString(TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("string size %ld x %ld!\n", lpSize->cx, lpSize->cy);
|
TRACE("string size %d x %d!\n", lpSize->cx, lpSize->cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1224,7 +1233,7 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
|
||||||
hdc = GetDC (hwnd);
|
hdc = GetDC (hwnd);
|
||||||
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
hOldFont = SelectObject (hdc, infoPtr->hFont);
|
||||||
|
|
||||||
if (infoPtr->nNumButtons == 0)
|
if (infoPtr->nNumButtons == 0 && infoPtr->nNumStrings > 0)
|
||||||
{
|
{
|
||||||
TEXTMETRICW tm;
|
TEXTMETRICW tm;
|
||||||
|
|
||||||
|
@ -1247,7 +1256,7 @@ TOOLBAR_CalcStrings (HWND hwnd, LPSIZE lpSize)
|
||||||
SelectObject (hdc, hOldFont);
|
SelectObject (hdc, hOldFont);
|
||||||
ReleaseDC (hwnd, hdc);
|
ReleaseDC (hwnd, hdc);
|
||||||
|
|
||||||
TRACE("max string size %ld x %ld!\n", lpSize->cx, lpSize->cy);
|
TRACE("max string size %d x %d!\n", lpSize->cx, lpSize->cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1551,7 +1560,7 @@ static inline SIZE TOOLBAR_MeasureButton(TOOLBAR_INFO *infoPtr, SIZE sizeString,
|
||||||
if (infoPtr->dwStyle & TBSTYLE_LIST)
|
if (infoPtr->dwStyle & TBSTYLE_LIST)
|
||||||
{
|
{
|
||||||
/* set button height from bitmap / text height... */
|
/* set button height from bitmap / text height... */
|
||||||
sizeButton.cy = max((bHasBitmap ? infoPtr->nBitmapHeight : 0),
|
sizeButton.cy = max((bHasBitmap ? infoPtr->nVBitmapHeight : 0),
|
||||||
sizeString.cy);
|
sizeString.cy);
|
||||||
|
|
||||||
/* ... add on the necessary padding */
|
/* ... add on the necessary padding */
|
||||||
|
@ -1580,8 +1589,9 @@ static inline SIZE TOOLBAR_MeasureButton(TOOLBAR_INFO *infoPtr, SIZE sizeString,
|
||||||
{
|
{
|
||||||
if (bHasBitmap)
|
if (bHasBitmap)
|
||||||
{
|
{
|
||||||
sizeButton.cy = infoPtr->nBitmapHeight + 1 +
|
sizeButton.cy = infoPtr->nVBitmapHeight + DEFPAD_CY;
|
||||||
sizeString.cy + DEFPAD_CY;
|
if (sizeString.cy > 0)
|
||||||
|
sizeButton.cy += 1 + sizeString.cy;
|
||||||
sizeButton.cx = infoPtr->szPadding.cx +
|
sizeButton.cx = infoPtr->szPadding.cx +
|
||||||
max(sizeString.cx, infoPtr->nBitmapWidth);
|
max(sizeString.cx, infoPtr->nBitmapWidth);
|
||||||
}
|
}
|
||||||
|
@ -1611,14 +1621,8 @@ static void
|
||||||
TOOLBAR_CalcToolbar (HWND hwnd)
|
TOOLBAR_CalcToolbar (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
||||||
DWORD dwStyle = infoPtr->dwStyle;
|
|
||||||
TBUTTON_INFO *btnPtr;
|
|
||||||
INT i, nRows, nSepRows;
|
|
||||||
INT x, y, cx, cy;
|
|
||||||
SIZE sizeString, sizeButton;
|
SIZE sizeString, sizeButton;
|
||||||
BOOL bWrap;
|
|
||||||
BOOL validImageList = FALSE;
|
BOOL validImageList = FALSE;
|
||||||
BOOL hasDropDownArrows = TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle);
|
|
||||||
|
|
||||||
TOOLBAR_CalcStrings (hwnd, &sizeString);
|
TOOLBAR_CalcStrings (hwnd, &sizeString);
|
||||||
|
|
||||||
|
@ -1629,21 +1633,32 @@ TOOLBAR_CalcToolbar (HWND hwnd)
|
||||||
sizeButton = TOOLBAR_MeasureButton(infoPtr, sizeString, TRUE, validImageList);
|
sizeButton = TOOLBAR_MeasureButton(infoPtr, sizeString, TRUE, validImageList);
|
||||||
infoPtr->nButtonWidth = sizeButton.cx;
|
infoPtr->nButtonWidth = sizeButton.cx;
|
||||||
infoPtr->nButtonHeight = sizeButton.cy;
|
infoPtr->nButtonHeight = sizeButton.cy;
|
||||||
|
infoPtr->iTopMargin = default_top_margin(infoPtr);
|
||||||
|
|
||||||
if ( infoPtr->cxMin >= 0 && infoPtr->nButtonWidth < infoPtr->cxMin )
|
if ( infoPtr->cxMin >= 0 && infoPtr->nButtonWidth < infoPtr->cxMin )
|
||||||
infoPtr->nButtonWidth = infoPtr->cxMin;
|
infoPtr->nButtonWidth = infoPtr->cxMin;
|
||||||
if ( infoPtr->cxMax > 0 && infoPtr->nButtonWidth > infoPtr->cxMax )
|
if ( infoPtr->cxMax > 0 && infoPtr->nButtonWidth > infoPtr->cxMax )
|
||||||
infoPtr->nButtonWidth = infoPtr->cxMax;
|
infoPtr->nButtonWidth = infoPtr->cxMax;
|
||||||
|
|
||||||
TOOLBAR_WrapToolbar( hwnd, dwStyle );
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
TOOLBAR_LayoutToolbar(HWND hwnd)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
||||||
|
TBUTTON_INFO *btnPtr;
|
||||||
|
SIZE sizeButton;
|
||||||
|
INT i, nRows, nSepRows;
|
||||||
|
INT x, y, cx, cy;
|
||||||
|
BOOL bWrap;
|
||||||
|
BOOL validImageList = TOOLBAR_IsValidImageList(infoPtr, 0);
|
||||||
|
BOOL hasDropDownArrows = TOOLBAR_HasDropDownArrows(infoPtr->dwExStyle);
|
||||||
|
|
||||||
|
TOOLBAR_WrapToolbar(hwnd, infoPtr->dwStyle);
|
||||||
|
|
||||||
x = infoPtr->nIndent;
|
x = infoPtr->nIndent;
|
||||||
if (infoPtr->dwStyle & TBSTYLE_FLAT)
|
y = infoPtr->iTopMargin;
|
||||||
y = 0;
|
|
||||||
else
|
|
||||||
y = TOP_BORDER;
|
|
||||||
|
|
||||||
/* from above, minimum is a button, and possible text */
|
|
||||||
cx = infoPtr->nButtonWidth;
|
cx = infoPtr->nButtonWidth;
|
||||||
cy = infoPtr->nButtonHeight;
|
cy = infoPtr->nButtonHeight;
|
||||||
|
|
||||||
|
@ -1885,8 +1900,8 @@ TOOLBAR_RelayEvent (HWND hwndTip, HWND hwndMsg, UINT uMsg,
|
||||||
msg.wParam = wParam;
|
msg.wParam = wParam;
|
||||||
msg.lParam = lParam;
|
msg.lParam = lParam;
|
||||||
msg.time = GetMessageTime ();
|
msg.time = GetMessageTime ();
|
||||||
msg.pt.x = LOWORD(GetMessagePos ());
|
msg.pt.x = (short)LOWORD(GetMessagePos ());
|
||||||
msg.pt.y = HIWORD(GetMessagePos ());
|
msg.pt.y = (short)HIWORD(GetMessagePos ());
|
||||||
|
|
||||||
SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
SendMessageW (hwndTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
|
||||||
}
|
}
|
||||||
|
@ -1948,7 +1963,7 @@ TOOLBAR_TooltipCreateControl(TOOLBAR_INFO *infoPtr)
|
||||||
int i;
|
int i;
|
||||||
NMTOOLTIPSCREATED nmttc;
|
NMTOOLTIPSCREATED nmttc;
|
||||||
|
|
||||||
infoPtr->hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, 0,
|
infoPtr->hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
infoPtr->hwndSelf, 0, 0, 0);
|
infoPtr->hwndSelf, 0, 0, 0);
|
||||||
|
|
||||||
|
@ -2863,6 +2878,7 @@ 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 nOldButtons, nNewButtons, nAddButtons, nCount;
|
||||||
|
BOOL fHasString = FALSE;
|
||||||
|
|
||||||
TRACE("adding %d buttons (unicode=%d)!\n", wParam, fUnicode);
|
TRACE("adding %d buttons (unicode=%d)!\n", wParam, fUnicode);
|
||||||
|
|
||||||
|
@ -2888,6 +2904,7 @@ TOOLBAR_AddButtonsT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
|
||||||
Str_SetPtrW ((LPWSTR*)&btnPtr->iString, (LPWSTR)lpTbb[nCount].iString );
|
Str_SetPtrW ((LPWSTR*)&btnPtr->iString, (LPWSTR)lpTbb[nCount].iString );
|
||||||
else
|
else
|
||||||
Str_SetPtrAtoW((LPWSTR*)&btnPtr->iString, (LPSTR)lpTbb[nCount].iString);
|
Str_SetPtrAtoW((LPWSTR*)&btnPtr->iString, (LPSTR)lpTbb[nCount].iString);
|
||||||
|
fHasString = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
btnPtr->iString = lpTbb[nCount].iString;
|
btnPtr->iString = lpTbb[nCount].iString;
|
||||||
|
@ -2895,7 +2912,10 @@ TOOLBAR_AddButtonsT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
|
||||||
TOOLBAR_TooltipAddTool(infoPtr, btnPtr);
|
TOOLBAR_TooltipAddTool(infoPtr, btnPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLBAR_CalcToolbar (hwnd);
|
if (infoPtr->nNumStrings > 0 || fHasString)
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
|
else
|
||||||
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
TOOLBAR_AutoSize (hwnd);
|
TOOLBAR_AutoSize (hwnd);
|
||||||
|
|
||||||
TOOLBAR_DumpToolbar (infoPtr, __LINE__);
|
TOOLBAR_DumpToolbar (infoPtr, __LINE__);
|
||||||
|
@ -2911,6 +2931,7 @@ TOOLBAR_AddStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
#define MAX_RESOURCE_STRING_LENGTH 512
|
#define MAX_RESOURCE_STRING_LENGTH 512
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
BOOL fFirstString = (infoPtr->nNumStrings == 0);
|
||||||
INT nIndex = infoPtr->nNumStrings;
|
INT nIndex = infoPtr->nNumStrings;
|
||||||
|
|
||||||
if ((wParam) && (HIWORD(lParam) == 0)) {
|
if ((wParam) && (HIWORD(lParam) == 0)) {
|
||||||
|
@ -2967,6 +2988,8 @@ TOOLBAR_AddStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fFirstString)
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
return nIndex;
|
return nIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2975,6 +2998,7 @@ static LRESULT
|
||||||
TOOLBAR_AddStringA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_AddStringA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
BOOL fFirstString = (infoPtr->nNumStrings == 0);
|
||||||
LPSTR p;
|
LPSTR p;
|
||||||
INT nIndex;
|
INT nIndex;
|
||||||
INT len;
|
INT len;
|
||||||
|
@ -2999,6 +3023,8 @@ TOOLBAR_AddStringA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
p += (len+1);
|
p += (len+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fFirstString)
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
return nIndex;
|
return nIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3012,7 +3038,7 @@ TOOLBAR_AutoSize (HWND hwnd)
|
||||||
INT x, y;
|
INT x, y;
|
||||||
INT cx, cy;
|
INT cx, cy;
|
||||||
|
|
||||||
TRACE("auto sizing, style=%lx!\n", infoPtr->dwStyle);
|
TRACE("auto sizing, style=%x!\n", infoPtr->dwStyle);
|
||||||
|
|
||||||
parent = GetParent (hwnd);
|
parent = GetParent (hwnd);
|
||||||
|
|
||||||
|
@ -3031,7 +3057,7 @@ TOOLBAR_AutoSize (HWND hwnd)
|
||||||
|
|
||||||
if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_EX_UNDOC1))
|
if ((infoPtr->dwStyle & TBSTYLE_WRAPABLE) || (infoPtr->dwExStyle & TBSTYLE_EX_UNDOC1))
|
||||||
{
|
{
|
||||||
TOOLBAR_CalcToolbar(hwnd);
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
InvalidateRect( hwnd, NULL, TRUE );
|
InvalidateRect( hwnd, NULL, TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3257,7 +3283,7 @@ TOOLBAR_DeleteButton (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
Free (oldButtons);
|
Free (oldButtons);
|
||||||
}
|
}
|
||||||
|
|
||||||
TOOLBAR_CalcToolbar (hwnd);
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
|
|
||||||
InvalidateRect (hwnd, NULL, TRUE);
|
InvalidateRect (hwnd, NULL, TRUE);
|
||||||
|
|
||||||
|
@ -3458,11 +3484,8 @@ TOOLBAR_GetButtonSize (HWND hwnd)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
if (infoPtr->nNumButtons > 0)
|
|
||||||
return MAKELONG((WORD)infoPtr->nButtonWidth,
|
return MAKELONG((WORD)infoPtr->nButtonWidth,
|
||||||
(WORD)infoPtr->nButtonHeight);
|
(WORD)infoPtr->nButtonHeight);
|
||||||
else
|
|
||||||
return MAKELONG(23,22);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3630,7 +3653,7 @@ TOOLBAR_GetMaxSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
lpSize->cx = infoPtr->rcBound.right - infoPtr->rcBound.left;
|
lpSize->cx = infoPtr->rcBound.right - infoPtr->rcBound.left;
|
||||||
lpSize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
|
lpSize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
|
||||||
|
|
||||||
TRACE("maximum size %ld x %ld\n",
|
TRACE("maximum size %d x %d\n",
|
||||||
infoPtr->rcBound.right - infoPtr->rcBound.left,
|
infoPtr->rcBound.right - infoPtr->rcBound.left,
|
||||||
infoPtr->rcBound.bottom - infoPtr->rcBound.top);
|
infoPtr->rcBound.bottom - infoPtr->rcBound.top);
|
||||||
|
|
||||||
|
@ -3724,6 +3747,8 @@ TOOLBAR_GetToolTips (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
|
if ((infoPtr->dwStyle & TBSTYLE_TOOLTIPS) && (infoPtr->hwndToolTip == NULL))
|
||||||
|
TOOLBAR_TooltipCreateControl(infoPtr);
|
||||||
return (LRESULT)infoPtr->hwndToolTip;
|
return (LRESULT)infoPtr->hwndToolTip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3861,7 +3886,10 @@ TOOLBAR_InsertButtonT(HWND hwnd, WPARAM wParam, LPARAM lParam, BOOL fUnicode)
|
||||||
|
|
||||||
TOOLBAR_TooltipAddTool(infoPtr, &infoPtr->buttons[nIndex]);
|
TOOLBAR_TooltipAddTool(infoPtr, &infoPtr->buttons[nIndex]);
|
||||||
|
|
||||||
TOOLBAR_CalcToolbar (hwnd);
|
if (infoPtr->nNumStrings > 0)
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
|
else
|
||||||
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
TOOLBAR_AutoSize (hwnd);
|
TOOLBAR_AutoSize (hwnd);
|
||||||
|
|
||||||
InvalidateRect (hwnd, NULL, TRUE);
|
InvalidateRect (hwnd, NULL, TRUE);
|
||||||
|
@ -4471,8 +4499,7 @@ TOOLBAR_SetBitmapSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
LOWORD(lParam), HIWORD(lParam));
|
LOWORD(lParam), HIWORD(lParam));
|
||||||
|
|
||||||
infoPtr->nBitmapWidth = (INT)LOWORD(lParam);
|
infoPtr->nBitmapWidth = (INT)LOWORD(lParam);
|
||||||
infoPtr->nBitmapHeight = (INT)HIWORD(lParam);
|
infoPtr->nVBitmapHeight = infoPtr->nBitmapHeight = (INT)HIWORD(lParam);
|
||||||
|
|
||||||
|
|
||||||
if ((himlDef == infoPtr->himlInt) &&
|
if ((himlDef == infoPtr->himlInt) &&
|
||||||
(ImageList_GetImageCount(infoPtr->himlInt) == 0))
|
(ImageList_GetImageCount(infoPtr->himlInt) == 0))
|
||||||
|
@ -4481,6 +4508,7 @@ TOOLBAR_SetBitmapSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->nBitmapHeight);
|
infoPtr->nBitmapHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -4597,11 +4625,11 @@ static LRESULT
|
||||||
TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
INT cx = LOWORD(lParam), cy = HIWORD(lParam);
|
INT cx = (short)LOWORD(lParam), cy = (short)HIWORD(lParam);
|
||||||
|
|
||||||
if ((cx < 0) || (cy < 0))
|
if ((cx < 0) || (cy < 0))
|
||||||
{
|
{
|
||||||
ERR("invalid parameter 0x%08lx\n", (DWORD)lParam);
|
ERR("invalid parameter 0x%08x\n", (DWORD)lParam);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4618,8 +4646,17 @@ TOOLBAR_SetButtonSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
* either size, the system changes it to the default of 24 wide and
|
* either size, the system changes it to the default of 24 wide and
|
||||||
* 22 high. Demonstarted in ControlSpy Toolbar. GLA 3/02
|
* 22 high. Demonstarted in ControlSpy Toolbar. GLA 3/02
|
||||||
*/
|
*/
|
||||||
infoPtr->nButtonWidth = (cx) ? cx : 24;
|
if (cx == 0) cx = 24;
|
||||||
infoPtr->nButtonHeight = (cy) ? cy : 22;
|
if (cy == 0) cx = 22;
|
||||||
|
|
||||||
|
cx = max(cx, infoPtr->szPadding.cx + infoPtr->nBitmapWidth);
|
||||||
|
cy = max(cy, infoPtr->szPadding.cy + infoPtr->nVBitmapHeight);
|
||||||
|
|
||||||
|
infoPtr->nButtonWidth = cx;
|
||||||
|
infoPtr->nButtonHeight = cy;
|
||||||
|
|
||||||
|
infoPtr->iTopMargin = default_top_margin(infoPtr);
|
||||||
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4630,16 +4667,16 @@ TOOLBAR_SetButtonWidth (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
/* if setting to current values, ignore */
|
/* if setting to current values, ignore */
|
||||||
if ((infoPtr->cxMin == (INT)LOWORD(lParam)) &&
|
if ((infoPtr->cxMin == (short)LOWORD(lParam)) &&
|
||||||
(infoPtr->cxMax == (INT)HIWORD(lParam))) {
|
(infoPtr->cxMax == (short)HIWORD(lParam))) {
|
||||||
TRACE("matches current width, min=%d, max=%d, no recalc\n",
|
TRACE("matches current width, min=%d, max=%d, no recalc\n",
|
||||||
infoPtr->cxMin, infoPtr->cxMax);
|
infoPtr->cxMin, infoPtr->cxMax);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* save new values */
|
/* save new values */
|
||||||
infoPtr->cxMin = (INT)LOWORD(lParam);
|
infoPtr->cxMin = (short)LOWORD(lParam);
|
||||||
infoPtr->cxMax = (INT)HIWORD(lParam);
|
infoPtr->cxMax = (short)HIWORD(lParam);
|
||||||
|
|
||||||
/* otherwise we need to recalc the toolbar and in some cases
|
/* otherwise we need to recalc the toolbar and in some cases
|
||||||
recalc the bounding rectangle (does DrawText w/ DT_CALCRECT
|
recalc the bounding rectangle (does DrawText w/ DT_CALCRECT
|
||||||
|
@ -4702,7 +4739,7 @@ TOOLBAR_SetDrawTextFlags (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
DWORD dwTemp;
|
DWORD dwTemp;
|
||||||
|
|
||||||
TRACE("hwnd = %p, dwMask = 0x%08lx, dwDTFlags = 0x%08lx\n", hwnd, (DWORD)wParam, (DWORD)lParam);
|
TRACE("hwnd = %p, dwMask = 0x%08x, dwDTFlags = 0x%08x\n", hwnd, (DWORD)wParam, (DWORD)lParam);
|
||||||
|
|
||||||
dwTemp = infoPtr->dwDTFlags;
|
dwTemp = infoPtr->dwDTFlags;
|
||||||
infoPtr->dwDTFlags =
|
infoPtr->dwDTFlags =
|
||||||
|
@ -4727,10 +4764,10 @@ TOOLBAR_SetExtendedStyle (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->dwExStyle &= ~wParam;
|
infoPtr->dwExStyle &= ~wParam;
|
||||||
infoPtr->dwExStyle |= (DWORD)lParam;
|
infoPtr->dwExStyle |= (DWORD)lParam;
|
||||||
|
|
||||||
TRACE("new style 0x%08lx\n", infoPtr->dwExStyle);
|
TRACE("new style 0x%08x\n", infoPtr->dwExStyle);
|
||||||
|
|
||||||
if (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL)
|
if (infoPtr->dwExStyle & ~TBSTYLE_EX_ALL)
|
||||||
FIXME("Unknown Toolbar Extended Style 0x%08lx. 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);
|
TOOLBAR_CalcToolbar (hwnd);
|
||||||
|
@ -4778,42 +4815,46 @@ TOOLBAR_SetHotItemEx (TOOLBAR_INFO *infoPtr, INT nHit, DWORD dwReason)
|
||||||
{
|
{
|
||||||
NMTBHOTITEM nmhotitem;
|
NMTBHOTITEM nmhotitem;
|
||||||
TBUTTON_INFO *btnPtr = NULL, *oldBtnPtr = NULL;
|
TBUTTON_INFO *btnPtr = NULL, *oldBtnPtr = NULL;
|
||||||
LRESULT no_highlight;
|
|
||||||
|
|
||||||
/* Remove the effect of an old hot button if the button was
|
nmhotitem.dwFlags = dwReason;
|
||||||
drawn with the hot button effect */
|
|
||||||
if(infoPtr->nHotItem >= 0)
|
if(infoPtr->nHotItem >= 0)
|
||||||
{
|
{
|
||||||
oldBtnPtr = &infoPtr->buttons[infoPtr->nHotItem];
|
oldBtnPtr = &infoPtr->buttons[infoPtr->nHotItem];
|
||||||
oldBtnPtr->bHot = FALSE;
|
nmhotitem.idOld = oldBtnPtr->idCommand;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nmhotitem.dwFlags |= HICF_ENTERING;
|
||||||
|
nmhotitem.idOld = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
infoPtr->nHotItem = nHit;
|
|
||||||
|
|
||||||
/* It's not a separator or in nowhere. It's a hot button. */
|
|
||||||
if (nHit >= 0)
|
if (nHit >= 0)
|
||||||
btnPtr = &infoPtr->buttons[nHit];
|
|
||||||
|
|
||||||
nmhotitem.dwFlags = dwReason;
|
|
||||||
if (oldBtnPtr)
|
|
||||||
nmhotitem.idOld = oldBtnPtr->idCommand;
|
|
||||||
else
|
|
||||||
nmhotitem.dwFlags |= HICF_ENTERING;
|
|
||||||
if (btnPtr)
|
|
||||||
nmhotitem.idNew = btnPtr->idCommand;
|
|
||||||
else
|
|
||||||
nmhotitem.dwFlags |= HICF_LEAVING;
|
|
||||||
|
|
||||||
no_highlight = TOOLBAR_SendNotify(&nmhotitem.hdr, infoPtr, TBN_HOTITEMCHANGE);
|
|
||||||
|
|
||||||
/* now invalidate the old and new buttons so they will be painted,
|
|
||||||
* but only if they are enabled - disabled buttons cannot become hot */
|
|
||||||
if (oldBtnPtr && (oldBtnPtr->fsState & TBSTATE_ENABLED))
|
|
||||||
InvalidateRect(infoPtr->hwndSelf, &oldBtnPtr->rect, TRUE);
|
|
||||||
if (btnPtr && !no_highlight && (btnPtr->fsState & TBSTATE_ENABLED))
|
|
||||||
{
|
{
|
||||||
|
btnPtr = &infoPtr->buttons[nHit];
|
||||||
|
nmhotitem.idNew = btnPtr->idCommand;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nmhotitem.dwFlags |= HICF_LEAVING;
|
||||||
|
nmhotitem.idNew = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* now change the hot and invalidate the old and new buttons - if the
|
||||||
|
* parent agrees */
|
||||||
|
if (!TOOLBAR_SendNotify(&nmhotitem.hdr, infoPtr, TBN_HOTITEMCHANGE))
|
||||||
|
{
|
||||||
|
if (oldBtnPtr) {
|
||||||
|
oldBtnPtr->bHot = FALSE;
|
||||||
|
InvalidateRect(infoPtr->hwndSelf, &oldBtnPtr->rect, TRUE);
|
||||||
|
}
|
||||||
|
/* setting disabled buttons as hot fails even if the notify contains the button id */
|
||||||
|
if (btnPtr && (btnPtr->fsState & TBSTATE_ENABLED)) {
|
||||||
btnPtr->bHot = TRUE;
|
btnPtr->bHot = TRUE;
|
||||||
InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE);
|
InvalidateRect(infoPtr->hwndSelf, &btnPtr->rect, TRUE);
|
||||||
|
infoPtr->nHotItem = nHit;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
infoPtr->nHotItem = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4826,13 +4867,15 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam)
|
||||||
|
|
||||||
TRACE("hwnd = %p, nHit = %d\n", hwnd, (INT)wParam);
|
TRACE("hwnd = %p, nHit = %d\n", hwnd, (INT)wParam);
|
||||||
|
|
||||||
if ((INT) wParam < 0 || (INT)wParam > infoPtr->nNumButtons)
|
if ((INT)wParam > infoPtr->nNumButtons)
|
||||||
|
return infoPtr->nHotItem;
|
||||||
|
|
||||||
|
if ((INT)wParam < 0)
|
||||||
wParam = -1;
|
wParam = -1;
|
||||||
|
|
||||||
/* NOTE: an application can still remove the hot item even if anchor
|
/* NOTE: an application can still remove the hot item even if anchor
|
||||||
* highlighting is enabled */
|
* highlighting is enabled */
|
||||||
|
|
||||||
if ((infoPtr->dwStyle & TBSTYLE_FLAT) || GetWindowTheme (infoPtr->hwndSelf))
|
|
||||||
TOOLBAR_SetHotItemEx(infoPtr, wParam, HICF_OTHER);
|
TOOLBAR_SetHotItemEx(infoPtr, wParam, HICF_OTHER);
|
||||||
|
|
||||||
if (nOldHotItem < 0)
|
if (nOldHotItem < 0)
|
||||||
|
@ -4866,6 +4909,7 @@ TOOLBAR_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->nBitmapWidth = 1;
|
infoPtr->nBitmapWidth = 1;
|
||||||
infoPtr->nBitmapHeight = 1;
|
infoPtr->nBitmapHeight = 1;
|
||||||
}
|
}
|
||||||
|
infoPtr->nVBitmapHeight = infoPtr->nBitmapHeight;
|
||||||
|
|
||||||
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,
|
||||||
|
@ -4904,11 +4948,11 @@ TOOLBAR_SetInsertMark (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam;
|
TBINSERTMARK *lptbim = (TBINSERTMARK*)lParam;
|
||||||
|
|
||||||
TRACE("hwnd = %p, lptbim = { %d, 0x%08lx}\n", hwnd, lptbim->iButton, lptbim->dwFlags);
|
TRACE("hwnd = %p, lptbim = { %d, 0x%08x}\n", hwnd, lptbim->iButton, lptbim->dwFlags);
|
||||||
|
|
||||||
if ((lptbim->dwFlags & ~TBIMHT_AFTER) != 0)
|
if ((lptbim->dwFlags & ~TBIMHT_AFTER) != 0)
|
||||||
{
|
{
|
||||||
FIXME("Unrecognized flag(s): 0x%08lx\n", (lptbim->dwFlags & ~TBIMHT_AFTER));
|
FIXME("Unrecognized flag(s): 0x%08x\n", (lptbim->dwFlags & ~TBIMHT_AFTER));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4973,7 +5017,7 @@ TOOLBAR_SetPadding (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
oldPad = MAKELONG(infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
oldPad = MAKELONG(infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
||||||
infoPtr->szPadding.cx = min(LOWORD((DWORD)lParam), GetSystemMetrics(SM_CXEDGE));
|
infoPtr->szPadding.cx = min(LOWORD((DWORD)lParam), GetSystemMetrics(SM_CXEDGE));
|
||||||
infoPtr->szPadding.cy = min(HIWORD((DWORD)lParam), GetSystemMetrics(SM_CYEDGE));
|
infoPtr->szPadding.cy = min(HIWORD((DWORD)lParam), GetSystemMetrics(SM_CYEDGE));
|
||||||
TRACE("cx=%ld, cy=%ld\n",
|
TRACE("cx=%d, cy=%d\n",
|
||||||
infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
infoPtr->szPadding.cx, infoPtr->szPadding.cy);
|
||||||
return (LRESULT) oldPad;
|
return (LRESULT) oldPad;
|
||||||
}
|
}
|
||||||
|
@ -5117,7 +5161,7 @@ TOOLBAR_SetColorScheme (HWND hwnd, LPCOLORSCHEME lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
|
|
||||||
TRACE("new colors Hl=%lx Shd=%lx, old colors Hl=%lx Shd=%lx\n",
|
TRACE("new colors Hl=%x Shd=%x, old colors Hl=%x Shd=%x\n",
|
||||||
lParam->clrBtnHighlight, lParam->clrBtnShadow,
|
lParam->clrBtnHighlight, lParam->clrBtnShadow,
|
||||||
infoPtr->clrBtnHighlight, infoPtr->clrBtnShadow);
|
infoPtr->clrBtnHighlight, infoPtr->clrBtnShadow);
|
||||||
|
|
||||||
|
@ -5161,7 +5205,7 @@ TOOLBAR_GetStringA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("returning %s\n", debugstr_a(str));
|
TRACE("returning %s\n", debugstr_a(str));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ERR("String index %d out of range (largest is %d)\n", iString, infoPtr->nNumStrings - 1);
|
WARN("String index %d out of range (largest is %d)\n", iString, infoPtr->nNumStrings - 1);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -5198,7 +5242,7 @@ TOOLBAR_GetStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT TOOLBAR_Unkwn45D(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
static LRESULT TOOLBAR_Unkwn45D(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
SIZE * pSize = (SIZE*)lParam;
|
SIZE * pSize = (SIZE*)lParam;
|
||||||
FIXME("hwnd=%p, wParam=0x%08x, size.cx=%ld, size.cy=%ld stub!\n", hwnd, wParam, pSize->cx, pSize->cy);
|
FIXME("hwnd=%p, wParam=0x%08x, size.cx=%d, size.cy=%d stub!\n", hwnd, wParam, pSize->cx, pSize->cy);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5213,7 +5257,7 @@ TOOLBAR_Unkwn45E (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
||||||
INT nOldHotItem = infoPtr->nHotItem;
|
INT nOldHotItem = infoPtr->nHotItem;
|
||||||
|
|
||||||
TRACE("old item=%d, new item=%d, flags=%08lx\n",
|
TRACE("old item=%d, new item=%d, flags=%08x\n",
|
||||||
nOldHotItem, infoPtr->nHotItem, (DWORD)lParam);
|
nOldHotItem, infoPtr->nHotItem, (DWORD)lParam);
|
||||||
|
|
||||||
if ((INT) wParam < 0 || (INT)wParam > infoPtr->nNumButtons)
|
if ((INT) wParam < 0 || (INT)wParam > infoPtr->nNumButtons)
|
||||||
|
@ -5275,7 +5319,7 @@ TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
* lParam pointer to SIZE structure
|
* lParam pointer to SIZE structure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
TRACE("[0463] wParam %d, lParam 0x%08lx -> 0x%08lx 0x%08lx\n",
|
TRACE("[0463] wParam %d, lParam 0x%08lx -> 0x%08x 0x%08x\n",
|
||||||
wParam, lParam, lpsize->cx, lpsize->cy);
|
wParam, lParam, lpsize->cx, lpsize->cy);
|
||||||
|
|
||||||
switch(wParam) {
|
switch(wParam) {
|
||||||
|
@ -5290,7 +5334,7 @@ TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
GetWindowRect(hwnd, &rc);
|
GetWindowRect(hwnd, &rc);
|
||||||
MapWindowPoints(0, hwndParent, (LPPOINT)&rc, 2);
|
MapWindowPoints(0, hwndParent, (LPPOINT)&rc, 2);
|
||||||
TRACE("mapped to (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("mapped to (%d,%d)-(%d,%d)\n",
|
||||||
rc.left, rc.top, rc.right, rc.bottom);
|
rc.left, rc.top, rc.right, rc.bottom);
|
||||||
lpsize->cx = max(rc.right-rc.left,
|
lpsize->cx = max(rc.right-rc.left,
|
||||||
infoPtr->rcBound.right - infoPtr->rcBound.left);
|
infoPtr->rcBound.right - infoPtr->rcBound.left);
|
||||||
|
@ -5307,7 +5351,7 @@ TOOLBAR_Unkwn463 (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
wParam);
|
wParam);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
TRACE("[0463] set to -> 0x%08lx 0x%08lx\n",
|
TRACE("[0463] set to -> 0x%08x 0x%08x\n",
|
||||||
lpsize->cx, lpsize->cy);
|
lpsize->cx, lpsize->cy);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -5331,10 +5375,15 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("hwnd = %p\n", hwnd);
|
TRACE("hwnd = %p\n", hwnd);
|
||||||
|
|
||||||
/* initialize info structure */
|
/* initialize info structure */
|
||||||
|
infoPtr->nButtonWidth = 23;
|
||||||
infoPtr->nButtonHeight = 22;
|
infoPtr->nButtonHeight = 22;
|
||||||
infoPtr->nButtonWidth = 24;
|
|
||||||
infoPtr->nBitmapHeight = 15;
|
infoPtr->nBitmapHeight = 15;
|
||||||
infoPtr->nBitmapWidth = 16;
|
infoPtr->nBitmapWidth = 16;
|
||||||
|
/* By default Windows creates an image list with 16x15 icons but computes the button size as
|
||||||
|
* if the icons were 16x16. That's why we keep infoPtr->nVBitmapHeight. After a call to
|
||||||
|
* TB_SETBITMAPSIZE or TB_SETIMAGELIST the nVBitmapHeight = nBitmapHeight.
|
||||||
|
*/
|
||||||
|
infoPtr->nVBitmapHeight = 16;
|
||||||
|
|
||||||
infoPtr->nMaxTextRows = 1;
|
infoPtr->nMaxTextRows = 1;
|
||||||
infoPtr->cxMin = -1;
|
infoPtr->cxMin = -1;
|
||||||
|
@ -5359,6 +5408,7 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
infoPtr->szPadding.cx = DEFPAD_CX;
|
infoPtr->szPadding.cx = DEFPAD_CX;
|
||||||
infoPtr->szPadding.cy = DEFPAD_CY;
|
infoPtr->szPadding.cy = DEFPAD_CY;
|
||||||
infoPtr->iListGap = DEFLISTGAP;
|
infoPtr->iListGap = DEFLISTGAP;
|
||||||
|
infoPtr->iTopMargin = default_top_margin(infoPtr);
|
||||||
infoPtr->dwStyle = dwStyle;
|
infoPtr->dwStyle = dwStyle;
|
||||||
infoPtr->tbim.iButton = -1;
|
infoPtr->tbim.iButton = -1;
|
||||||
GetClientRect(hwnd, &infoPtr->client_rect);
|
GetClientRect(hwnd, &infoPtr->client_rect);
|
||||||
|
@ -5373,8 +5423,6 @@ TOOLBAR_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
TOOLBAR_CheckStyle (hwnd, dwStyle);
|
TOOLBAR_CheckStyle (hwnd, dwStyle);
|
||||||
|
|
||||||
TOOLBAR_CalcToolbar(hwnd);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5415,7 +5463,6 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot);
|
TOOLBAR_DeleteImageList(&infoPtr->himlHot, &infoPtr->cimlHot);
|
||||||
|
|
||||||
/* delete default font */
|
/* delete default font */
|
||||||
if (infoPtr->hFont)
|
|
||||||
DeleteObject (infoPtr->hDefaultFont);
|
DeleteObject (infoPtr->hDefaultFont);
|
||||||
|
|
||||||
CloseThemeData (GetWindowTheme (hwnd));
|
CloseThemeData (GetWindowTheme (hwnd));
|
||||||
|
@ -5457,7 +5504,7 @@ TOOLBAR_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
case CDRF_SKIPDEFAULT:
|
case CDRF_SKIPDEFAULT:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
FIXME("[%p] response %ld not handled to NM_CUSTOMDRAW (CDDS_PREERASE)\n",
|
FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_PREERASE)\n",
|
||||||
hwnd, ntfret);
|
hwnd, ntfret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5494,7 +5541,7 @@ TOOLBAR_EraseBackground (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
case CDRF_SKIPDEFAULT:
|
case CDRF_SKIPDEFAULT:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
FIXME("[%p] response %ld not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)\n",
|
FIXME("[%p] response %d not handled to NM_CUSTOMDRAW (CDDS_POSTERASE)\n",
|
||||||
hwnd, ntfret);
|
hwnd, ntfret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5588,8 +5635,8 @@ TOOLBAR_LButtonDblClk (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
POINT pt;
|
POINT pt;
|
||||||
INT nHit;
|
INT nHit;
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
||||||
|
|
||||||
if (nHit >= 0)
|
if (nHit >= 0)
|
||||||
|
@ -5623,8 +5670,8 @@ TOOLBAR_LButtonDown (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
||||||
WM_LBUTTONDOWN, wParam, lParam);
|
WM_LBUTTONDOWN, wParam, lParam);
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
||||||
|
|
||||||
btnPtr = &infoPtr->buttons[nHit];
|
btnPtr = &infoPtr->buttons[nHit];
|
||||||
|
@ -5759,8 +5806,8 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
||||||
WM_LBUTTONUP, wParam, lParam);
|
WM_LBUTTONUP, wParam, lParam);
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
||||||
|
|
||||||
if (!infoPtr->bAnchor || (nHit >= 0))
|
if (!infoPtr->bAnchor || (nHit >= 0))
|
||||||
|
@ -5912,8 +5959,8 @@ TOOLBAR_RButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
NMMOUSE nmmouse;
|
NMMOUSE nmmouse;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
|
|
||||||
pt.x = LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
nHit = TOOLBAR_InternalHitTest(hwnd, &pt);
|
nHit = TOOLBAR_InternalHitTest(hwnd, &pt);
|
||||||
nmmouse.dwHitInfo = nHit;
|
nmmouse.dwHitInfo = nHit;
|
||||||
|
@ -5971,14 +6018,15 @@ static LRESULT
|
||||||
TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
|
||||||
TBUTTON_INFO *hotBtnPtr;
|
|
||||||
|
|
||||||
hotBtnPtr = &infoPtr->buttons[infoPtr->nOldHit];
|
|
||||||
|
|
||||||
/* don't remove hot effects when in anchor highlighting mode or when a
|
/* don't remove hot effects when in anchor highlighting mode or when a
|
||||||
* drop-down button is pressed */
|
* drop-down button is pressed */
|
||||||
if (!infoPtr->bAnchor && (infoPtr->nOldHit < 0 || !hotBtnPtr->bDropDownPressed))
|
if (infoPtr->nHotItem >= 0 && !infoPtr->bAnchor)
|
||||||
|
{
|
||||||
|
TBUTTON_INFO *hotBtnPtr = &infoPtr->buttons[infoPtr->nHotItem];
|
||||||
|
if (!hotBtnPtr->bDropDownPressed)
|
||||||
TOOLBAR_SetHotItemEx(infoPtr, TOOLBAR_NOWHERE, HICF_MOUSE);
|
TOOLBAR_SetHotItemEx(infoPtr, TOOLBAR_NOWHERE, HICF_MOUSE);
|
||||||
|
}
|
||||||
|
|
||||||
if (infoPtr->nOldHit < 0)
|
if (infoPtr->nOldHit < 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -5994,7 +6042,7 @@ TOOLBAR_MouseLeave (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
btnPtr->fsState &= ~TBSTATE_PRESSED;
|
||||||
|
|
||||||
rc1 = hotBtnPtr->rect;
|
rc1 = btnPtr->rect;
|
||||||
InflateRect (&rc1, 1, 1);
|
InflateRect (&rc1, 1, 1);
|
||||||
InvalidateRect (hwnd, &rc1, TRUE);
|
InvalidateRect (hwnd, &rc1, TRUE);
|
||||||
}
|
}
|
||||||
|
@ -6048,8 +6096,8 @@ TOOLBAR_MouseMove (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
TOOLBAR_RelayEvent (infoPtr->hwndToolTip, hwnd,
|
||||||
WM_MOUSEMOVE, wParam, lParam);
|
WM_MOUSEMOVE, wParam, lParam);
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
nHit = TOOLBAR_InternalHitTest (hwnd, &pt);
|
||||||
|
|
||||||
|
@ -6430,7 +6478,7 @@ TOOLBAR_Paint (HWND hwnd, WPARAM wParam)
|
||||||
|
|
||||||
hdc = wParam==0 ? BeginPaint(hwnd, &ps) : (HDC)wParam;
|
hdc = wParam==0 ? BeginPaint(hwnd, &ps) : (HDC)wParam;
|
||||||
|
|
||||||
TRACE("psrect=(%ld,%ld)-(%ld,%ld)\n",
|
TRACE("psrect=(%d,%d)-(%d,%d)\n",
|
||||||
ps.rcPaint.left, ps.rcPaint.top,
|
ps.rcPaint.left, ps.rcPaint.top,
|
||||||
ps.rcPaint.right, ps.rcPaint.bottom);
|
ps.rcPaint.right, ps.rcPaint.bottom);
|
||||||
|
|
||||||
|
@ -6455,6 +6503,24 @@ TOOLBAR_SetFocus (HWND hwnd, WPARAM wParam)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LRESULT
|
||||||
|
TOOLBAR_SetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
|
||||||
|
|
||||||
|
TRACE("font=%p redraw=%ld\n", (HFONT)wParam, lParam);
|
||||||
|
|
||||||
|
if (wParam == 0)
|
||||||
|
infoPtr->hFont = infoPtr->hDefaultFont;
|
||||||
|
else
|
||||||
|
infoPtr->hFont = (HFONT)wParam;
|
||||||
|
|
||||||
|
TOOLBAR_CalcToolbar(hwnd);
|
||||||
|
|
||||||
|
if (lParam)
|
||||||
|
InvalidateRect(hwnd, NULL, TRUE);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLBAR_SetRedraw (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
|
@ -6553,10 +6619,13 @@ TOOLBAR_StyleChanged (HWND hwnd, INT nType, LPSTYLESTRUCT lpStyle)
|
||||||
|
|
||||||
TOOLBAR_CheckStyle (hwnd, lpStyle->styleNew);
|
TOOLBAR_CheckStyle (hwnd, lpStyle->styleNew);
|
||||||
|
|
||||||
TRACE("new style 0x%08lx\n", lpStyle->styleNew);
|
TRACE("new style 0x%08x\n", lpStyle->styleNew);
|
||||||
|
|
||||||
infoPtr->dwStyle = lpStyle->styleNew;
|
infoPtr->dwStyle = lpStyle->styleNew;
|
||||||
|
|
||||||
|
if ((dwOldStyle ^ lpStyle->styleNew) & (TBSTYLE_WRAPABLE | CCS_VERT))
|
||||||
|
TOOLBAR_LayoutToolbar(hwnd);
|
||||||
|
|
||||||
/* only resize if one of the CCS_* styles was changed */
|
/* only resize if one of the CCS_* styles was changed */
|
||||||
if ((dwOldStyle ^ lpStyle->styleNew) & COMMON_STYLES)
|
if ((dwOldStyle ^ lpStyle->styleNew) & COMMON_STYLES)
|
||||||
{
|
{
|
||||||
|
@ -6965,6 +7034,9 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
return TOOLBAR_SetFocus (hwnd, wParam);
|
return TOOLBAR_SetFocus (hwnd, wParam);
|
||||||
|
|
||||||
|
case WM_SETFONT:
|
||||||
|
return TOOLBAR_SetFont(hwnd, wParam, lParam);
|
||||||
|
|
||||||
case WM_SETREDRAW:
|
case WM_SETREDRAW:
|
||||||
return TOOLBAR_SetRedraw (hwnd, wParam, lParam);
|
return TOOLBAR_SetRedraw (hwnd, wParam, lParam);
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,9 @@ static void
|
||||||
TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
TTTOOL_INFO *toolPtr;
|
TTTOOL_INFO *toolPtr;
|
||||||
RECT rect, wndrect;
|
HMONITOR monitor;
|
||||||
|
MONITORINFO mon_info;
|
||||||
|
RECT rect;
|
||||||
SIZE size;
|
SIZE size;
|
||||||
NMHDR hdr;
|
NMHDR hdr;
|
||||||
int ptfx = 0;
|
int ptfx = 0;
|
||||||
|
@ -530,7 +532,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
|
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
|
||||||
|
|
||||||
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
||||||
TRACE("size %ld x %ld\n", size.cx, size.cy);
|
TRACE("size %d x %d\n", size.cx, size.cy);
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_CENTERTIP) {
|
if (toolPtr->uFlags & TTF_CENTERTIP) {
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
@ -587,19 +589,24 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("pos %ld - %ld\n", rect.left, rect.top);
|
TRACE("pos %d - %d\n", rect.left, rect.top);
|
||||||
|
|
||||||
rect.right = rect.left + size.cx;
|
rect.right = rect.left + size.cx;
|
||||||
rect.bottom = rect.top + size.cy;
|
rect.bottom = rect.top + size.cy;
|
||||||
|
|
||||||
/* check position */
|
/* check position */
|
||||||
wndrect.right = GetSystemMetrics( SM_CXSCREEN );
|
|
||||||
if( rect.right > wndrect.right ) {
|
monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY );
|
||||||
rect.left -= rect.right - wndrect.right + 2;
|
mon_info.cbSize = sizeof(mon_info);
|
||||||
rect.right = wndrect.right - 2;
|
GetMonitorInfoW( monitor, &mon_info );
|
||||||
|
|
||||||
|
if( rect.right > mon_info.rcWork.right ) {
|
||||||
|
rect.left -= rect.right - mon_info.rcWork.right + 2;
|
||||||
|
rect.right = mon_info.rcWork.right - 2;
|
||||||
}
|
}
|
||||||
wndrect.bottom = GetSystemMetrics( SM_CYSCREEN );
|
if (rect.left < mon_info.rcWork.left) rect.left = mon_info.rcWork.left;
|
||||||
if( rect.bottom > wndrect.bottom ) {
|
|
||||||
|
if( rect.bottom > mon_info.rcWork.bottom ) {
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_IDISHWND)
|
if (toolPtr->uFlags & TTF_IDISHWND)
|
||||||
|
@ -744,7 +751,7 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
|
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
|
||||||
|
|
||||||
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
||||||
TRACE("size %ld x %ld\n", size.cx, size.cy);
|
TRACE("size %d x %d\n", size.cx, size.cy);
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_ABSOLUTE) {
|
if (toolPtr->uFlags & TTF_ABSOLUTE) {
|
||||||
rect.left = infoPtr->xTrackPos;
|
rect.left = infoPtr->xTrackPos;
|
||||||
|
@ -779,7 +786,7 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
rect.left = rcTool.right;
|
rect.left = rcTool.right;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("pos %ld - %ld\n", rect.left, rect.top);
|
TRACE("pos %d - %d\n", rect.left, rect.top);
|
||||||
|
|
||||||
rect.right = rect.left + size.cx;
|
rect.right = rect.left + size.cx;
|
||||||
rect.bottom = rect.top + size.cy;
|
rect.bottom = rect.top + size.cy;
|
||||||
|
@ -1364,7 +1371,7 @@ TOOLTIPS_GetBubbleSize (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
TRACE("tool %d\n", nTool);
|
TRACE("tool %d\n", nTool);
|
||||||
|
|
||||||
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
||||||
TRACE("size %ld x %ld\n", size.cx, size.cy);
|
TRACE("size %d x %d\n", size.cx, size.cy);
|
||||||
|
|
||||||
return MAKELRESULT(size.cx, size.cy);
|
return MAKELRESULT(size.cx, size.cy);
|
||||||
}
|
}
|
||||||
|
@ -1787,14 +1794,14 @@ TOOLTIPS_RelayEvent (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
pt.x = LOWORD(lpMsg->lParam);
|
pt.x = (short)LOWORD(lpMsg->lParam);
|
||||||
pt.y = HIWORD(lpMsg->lParam);
|
pt.y = (short)HIWORD(lpMsg->lParam);
|
||||||
nOldTool = infoPtr->nTool;
|
nOldTool = infoPtr->nTool;
|
||||||
infoPtr->nTool = TOOLTIPS_GetToolFromPoint(infoPtr, lpMsg->hwnd,
|
infoPtr->nTool = TOOLTIPS_GetToolFromPoint(infoPtr, lpMsg->hwnd,
|
||||||
&pt);
|
&pt);
|
||||||
TRACE("tool (%p) %d %d %d\n", hwnd, nOldTool,
|
TRACE("tool (%p) %d %d %d\n", hwnd, nOldTool,
|
||||||
infoPtr->nTool, infoPtr->nCurrentTool);
|
infoPtr->nTool, infoPtr->nCurrentTool);
|
||||||
TRACE("WM_MOUSEMOVE (%p %ld %ld)\n", hwnd, pt.x, pt.y);
|
TRACE("WM_MOUSEMOVE (%p %d %d)\n", hwnd, pt.x, pt.y);
|
||||||
|
|
||||||
if (infoPtr->nTool != nOldTool) {
|
if (infoPtr->nTool != nOldTool) {
|
||||||
if(infoPtr->nTool == -1) { /* Moved out of all tools */
|
if(infoPtr->nTool == -1) { /* Moved out of all tools */
|
||||||
|
|
|
@ -441,7 +441,7 @@ TRACKBAR_CalcSelection (TRACKBAR_INFO *infoPtr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("selection[left=%ld, top=%ld, right=%ld, bottom=%ld]\n",
|
TRACE("selection[left=%d, top=%d, right=%d, bottom=%d]\n",
|
||||||
selection->left, selection->top, selection->right, selection->bottom);
|
selection->left, selection->top, selection->right, selection->bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ TRACKBAR_AutoPage (TRACKBAR_INFO *infoPtr, POINT clickPoint)
|
||||||
LONG dir = TRACKBAR_GetAutoPageDirection(infoPtr, clickPoint);
|
LONG dir = TRACKBAR_GetAutoPageDirection(infoPtr, clickPoint);
|
||||||
LONG prevPos = infoPtr->lPos;
|
LONG prevPos = infoPtr->lPos;
|
||||||
|
|
||||||
TRACE("x=%ld, y=%ld, dir=%ld\n", clickPoint.x, clickPoint.y, dir);
|
TRACE("x=%d, y=%d, dir=%d\n", clickPoint.x, clickPoint.y, dir);
|
||||||
|
|
||||||
if (dir > 0 && (infoPtr->flags & TB_AUTO_PAGE_RIGHT))
|
if (dir > 0 && (infoPtr->flags & TB_AUTO_PAGE_RIGHT))
|
||||||
TRACKBAR_PageDown(infoPtr);
|
TRACKBAR_PageDown(infoPtr);
|
||||||
|
@ -1051,7 +1051,7 @@ static int comp_tics(const void *ap, const void *bp)
|
||||||
const DWORD a = *(const DWORD *)ap;
|
const DWORD a = *(const DWORD *)ap;
|
||||||
const DWORD b = *(const DWORD *)bp;
|
const DWORD b = *(const DWORD *)bp;
|
||||||
|
|
||||||
TRACE("(a=%ld, b=%ld)\n", a, b);
|
TRACE("(a=%d, b=%d)\n", a, b);
|
||||||
if (a < b) return -1;
|
if (a < b) return -1;
|
||||||
if (a > b) return 1;
|
if (a > b) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1292,7 +1292,7 @@ TRACKBAR_SetTic (TRACKBAR_INFO *infoPtr, LONG lPos)
|
||||||
if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax))
|
if ((lPos < infoPtr->lRangeMin) || (lPos> infoPtr->lRangeMax))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRACE("lPos=%ld\n", lPos);
|
TRACE("lPos=%d\n", lPos);
|
||||||
|
|
||||||
infoPtr->uNumTics++;
|
infoPtr->uNumTics++;
|
||||||
infoPtr->tics=ReAlloc( infoPtr->tics,
|
infoPtr->tics=ReAlloc( infoPtr->tics,
|
||||||
|
@ -1415,7 +1415,7 @@ TRACKBAR_Create (HWND hwnd, LPCREATESTRUCTW lpcs)
|
||||||
if (dwStyle & TBS_TOOLTIPS) {
|
if (dwStyle & TBS_TOOLTIPS) {
|
||||||
|
|
||||||
infoPtr->hwndToolTip =
|
infoPtr->hwndToolTip =
|
||||||
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, 0,
|
CreateWindowExW (0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT,
|
CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
hwnd, 0, 0, 0);
|
hwnd, 0, 0, 0);
|
||||||
|
|
|
@ -627,7 +627,7 @@ TREEVIEW_SendCustomDrawNotify(TREEVIEW_INFO *infoPtr, DWORD dwDrawStage,
|
||||||
NMTVCUSTOMDRAW nmcdhdr;
|
NMTVCUSTOMDRAW nmcdhdr;
|
||||||
LPNMCUSTOMDRAW nmcd;
|
LPNMCUSTOMDRAW nmcd;
|
||||||
|
|
||||||
TRACE("drawstage:%lx hdc:%p\n", dwDrawStage, hdc);
|
TRACE("drawstage:%x hdc:%p\n", dwDrawStage, hdc);
|
||||||
|
|
||||||
nmcd = &nmcdhdr.nmcd;
|
nmcd = &nmcdhdr.nmcd;
|
||||||
nmcd->hdr.hwndFrom = hwnd;
|
nmcd->hdr.hwndFrom = hwnd;
|
||||||
|
@ -686,7 +686,7 @@ TREEVIEW_SendCustomDrawItemNotify(TREEVIEW_INFO *infoPtr, HDC hdc,
|
||||||
nmcd->lItemlParam = wineItem->lParam;
|
nmcd->lItemlParam = wineItem->lParam;
|
||||||
nmcdhdr->iLevel = wineItem->iLevel;
|
nmcdhdr->iLevel = wineItem->iLevel;
|
||||||
|
|
||||||
TRACE("drawstage:%lx hdc:%p item:%lx, itemstate:%x, lItemlParam:%lx\n",
|
TRACE("drawstage:%x hdc:%p item:%lx, itemstate:%x, lItemlParam:%lx\n",
|
||||||
nmcd->dwDrawStage, nmcd->hdc, nmcd->dwItemSpec,
|
nmcd->dwDrawStage, nmcd->hdc, nmcd->dwItemSpec,
|
||||||
nmcd->uItemState, nmcd->lItemlParam);
|
nmcd->uItemState, nmcd->lItemlParam);
|
||||||
|
|
||||||
|
@ -1966,7 +1966,7 @@ TREEVIEW_SetInsertMarkColor(TREEVIEW_INFO *infoPtr, COLORREF color)
|
||||||
{
|
{
|
||||||
COLORREF prevColor = infoPtr->clrInsertMark;
|
COLORREF prevColor = infoPtr->clrInsertMark;
|
||||||
|
|
||||||
TRACE("%lx\n", color);
|
TRACE("%x\n", color);
|
||||||
infoPtr->clrInsertMark = color;
|
infoPtr->clrInsertMark = color;
|
||||||
|
|
||||||
return (LRESULT)prevColor;
|
return (LRESULT)prevColor;
|
||||||
|
@ -2030,7 +2030,7 @@ TREEVIEW_GetItemRect(TREEVIEW_INFO *infoPtr, BOOL fTextRect, LPRECT lpRect)
|
||||||
*lpRect = wineItem->rect;
|
*lpRect = wineItem->rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("%s [L:%ld R:%ld T:%ld B:%ld]\n", fTextRect ? "text" : "item",
|
TRACE("%s [L:%d R:%d T:%d B:%d]\n", fTextRect ? "text" : "item",
|
||||||
lpRect->left, lpRect->right, lpRect->top, lpRect->bottom);
|
lpRect->left, lpRect->right, lpRect->top, lpRect->bottom);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -2575,7 +2575,7 @@ TREEVIEW_DrawItem(TREEVIEW_INFO *infoPtr, HDC hdc, TREEVIEW_ITEM *wineItem)
|
||||||
rcText.left = wineItem->textOffset;
|
rcText.left = wineItem->textOffset;
|
||||||
rcText.right = rcText.left + wineItem->textWidth + 4;
|
rcText.right = rcText.left + wineItem->textWidth + 4;
|
||||||
|
|
||||||
TRACE("drawing text %s at (%ld,%ld)-(%ld,%ld)\n",
|
TRACE("drawing text %s at (%d,%d)-(%d,%d)\n",
|
||||||
debugstr_w(wineItem->pszText),
|
debugstr_w(wineItem->pszText),
|
||||||
rcText.left, rcText.top, rcText.right, rcText.bottom);
|
rcText.left, rcText.top, rcText.right, rcText.bottom);
|
||||||
|
|
||||||
|
@ -3494,7 +3494,7 @@ TREEVIEW_HitTest(TREEVIEW_INFO *infoPtr, LPTVHITTESTINFO lpht)
|
||||||
}
|
}
|
||||||
|
|
||||||
lpht->hItem = wineItem;
|
lpht->hItem = wineItem;
|
||||||
TRACE("(%ld,%ld):result %x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
|
TRACE("(%d,%d):result %x\n", lpht->pt.x, lpht->pt.y, lpht->flags);
|
||||||
|
|
||||||
return (LRESULT)wineItem;
|
return (LRESULT)wineItem;
|
||||||
}
|
}
|
||||||
|
@ -4172,7 +4172,7 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
hOldFont = SelectObject(hdc, infoPtr->hFont);
|
hOldFont = SelectObject(hdc, infoPtr->hFont);
|
||||||
GetTextExtentPoint32W(hdc, dragItem->pszText, strlenW(dragItem->pszText),
|
GetTextExtentPoint32W(hdc, dragItem->pszText, strlenW(dragItem->pszText),
|
||||||
&size);
|
&size);
|
||||||
TRACE("%ld %ld %s %d\n", size.cx, size.cy, debugstr_w(dragItem->pszText),
|
TRACE("%d %d %s %d\n", size.cx, size.cy, debugstr_w(dragItem->pszText),
|
||||||
strlenW(dragItem->pszText));
|
strlenW(dragItem->pszText));
|
||||||
hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy);
|
hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy);
|
||||||
hOldbmp = SelectObject(hdc, hbmp);
|
hOldbmp = SelectObject(hdc, hbmp);
|
||||||
|
@ -4509,7 +4509,7 @@ TREEVIEW_EnsureVisible(TREEVIEW_INFO *infoPtr, HTREEITEM item, BOOL bHScroll)
|
||||||
|
|
||||||
viscount = TREEVIEW_GetVisibleCount(infoPtr);
|
viscount = TREEVIEW_GetVisibleCount(infoPtr);
|
||||||
|
|
||||||
TRACE("%p (%s) %ld - %ld viscount(%d)\n", item, TREEVIEW_ItemName(item), item->visibleOrder,
|
TRACE("%p (%s) %d - %d viscount(%d)\n", item, TREEVIEW_ItemName(item), item->visibleOrder,
|
||||||
hasFirstVisible ? infoPtr->firstVisible->visibleOrder : -1, viscount);
|
hasFirstVisible ? infoPtr->firstVisible->visibleOrder : -1, viscount);
|
||||||
|
|
||||||
if (hasFirstVisible)
|
if (hasFirstVisible)
|
||||||
|
@ -4828,7 +4828,7 @@ TREEVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
TREEVIEW_INFO *infoPtr;
|
TREEVIEW_INFO *infoPtr;
|
||||||
LOGFONTW lf;
|
LOGFONTW lf;
|
||||||
|
|
||||||
TRACE("wnd %p, style %lx\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
|
TRACE("wnd %p, style %x\n", hwnd, GetWindowLongW(hwnd, GWL_STYLE));
|
||||||
|
|
||||||
infoPtr = (TREEVIEW_INFO *)Alloc(sizeof(TREEVIEW_INFO));
|
infoPtr = (TREEVIEW_INFO *)Alloc(sizeof(TREEVIEW_INFO));
|
||||||
|
|
||||||
|
@ -5203,8 +5203,8 @@ TREEVIEW_MouseMove (TREEVIEW_INFO * infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
_TrackMouseEvent(&trackinfo);
|
_TrackMouseEvent(&trackinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
pt.x = (INT)LOWORD(lParam);
|
pt.x = (short)LOWORD(lParam);
|
||||||
pt.y = (INT)HIWORD(lParam);
|
pt.y = (short)HIWORD(lParam);
|
||||||
|
|
||||||
item = TREEVIEW_HitTestPoint(infoPtr, pt);
|
item = TREEVIEW_HitTestPoint(infoPtr, pt);
|
||||||
|
|
||||||
|
@ -5266,12 +5266,12 @@ TREEVIEW_Notify(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
if (lppgc->dwFlag == PGF_CALCWIDTH) {
|
if (lppgc->dwFlag == PGF_CALCWIDTH) {
|
||||||
lppgc->iWidth = infoPtr->treeWidth;
|
lppgc->iWidth = infoPtr->treeWidth;
|
||||||
TRACE("got PGN_CALCSIZE, returning horz size = %ld, client=%ld\n",
|
TRACE("got PGN_CALCSIZE, returning horz size = %d, client=%d\n",
|
||||||
infoPtr->treeWidth, infoPtr->clientWidth);
|
infoPtr->treeWidth, infoPtr->clientWidth);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
lppgc->iHeight = infoPtr->treeHeight;
|
lppgc->iHeight = infoPtr->treeHeight;
|
||||||
TRACE("got PGN_CALCSIZE, returning vert size = %ld, client=%ld\n",
|
TRACE("got PGN_CALCSIZE, returning vert size = %d, client=%d\n",
|
||||||
infoPtr->treeHeight, infoPtr->clientHeight);
|
infoPtr->treeHeight, infoPtr->clientHeight);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -3815,6 +3815,9 @@ int WINAPI MessageBoxIndirectA(CONST MSGBOXPARAMSA*);
|
||||||
int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*);
|
int WINAPI MessageBoxIndirectW(CONST MSGBOXPARAMSW*);
|
||||||
BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
|
BOOL WINAPI ModifyMenuA(HMENU,UINT,UINT,UINT,LPCSTR);
|
||||||
BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
|
BOOL WINAPI ModifyMenuW(HMENU,UINT,UINT,UINT,LPCWSTR);
|
||||||
|
HMONITOR WINAPI MonitorFromPoint(POINT,DWORD);
|
||||||
|
HMONITOR WINAPI MonitorFromRect(LPCRECT,DWORD);
|
||||||
|
HMONITOR WINAPI MonitorFromWindow(HWND,DWORD);
|
||||||
void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR);
|
void WINAPI mouse_event(DWORD,DWORD,DWORD,DWORD,ULONG_PTR);
|
||||||
BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
|
BOOL WINAPI MoveWindow(HWND,int,int,int,int,BOOL);
|
||||||
DWORD WINAPI MsgWaitForMultipleObjects(DWORD,CONST HANDLE*,BOOL,DWORD,DWORD);
|
DWORD WINAPI MsgWaitForMultipleObjects(DWORD,CONST HANDLE*,BOOL,DWORD,DWORD);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue