Autosyncing with Wine HEAD
svn path=/trunk/; revision=30936
|
@ -1240,6 +1240,7 @@ static LRESULT COMBOEX_Command (COMBOEX_INFO *infoPtr, WPARAM wParam, LPARAM lPa
|
||||||
return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
|
return SendMessageW (parent, WM_COMMAND, wParam, (LPARAM)infoPtr->hwndSelf);
|
||||||
|
|
||||||
case CBN_SELENDOK:
|
case CBN_SELENDOK:
|
||||||
|
case CBN_SELENDCANCEL:
|
||||||
/*
|
/*
|
||||||
* We have to change the handle since we are the control
|
* We have to change the handle since we are the control
|
||||||
* issuing the message. IE4 depends on this.
|
* issuing the message. IE4 depends on this.
|
||||||
|
@ -1577,15 +1578,10 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
|
static void COMBOEX_ResetContent (COMBOEX_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
if (infoPtr->hwndCombo)
|
if (infoPtr->items)
|
||||||
DestroyWindow (infoPtr->hwndCombo);
|
{
|
||||||
|
|
||||||
Free (infoPtr->edit);
|
|
||||||
infoPtr->edit = 0;
|
|
||||||
|
|
||||||
if (infoPtr->items) {
|
|
||||||
CBE_ITEMDATA *item, *next;
|
CBE_ITEMDATA *item, *next;
|
||||||
|
|
||||||
item = infoPtr->items;
|
item = infoPtr->items;
|
||||||
|
@ -1598,6 +1594,21 @@ static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
|
||||||
infoPtr->items = 0;
|
infoPtr->items = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
infoPtr->selected = -1;
|
||||||
|
infoPtr->nb_items = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr)
|
||||||
|
{
|
||||||
|
if (infoPtr->hwndCombo)
|
||||||
|
DestroyWindow (infoPtr->hwndCombo);
|
||||||
|
|
||||||
|
Free (infoPtr->edit);
|
||||||
|
infoPtr->edit = 0;
|
||||||
|
|
||||||
|
COMBOEX_ResetContent (infoPtr);
|
||||||
|
|
||||||
if (infoPtr->defaultFont)
|
if (infoPtr->defaultFont)
|
||||||
DeleteObject (infoPtr->defaultFont);
|
DeleteObject (infoPtr->defaultFont);
|
||||||
|
|
||||||
|
@ -2225,6 +2236,7 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
case WM_SETTEXT:
|
case WM_SETTEXT:
|
||||||
case WM_GETTEXT:
|
case WM_GETTEXT:
|
||||||
|
case WM_GETTEXTLENGTH:
|
||||||
return SendMessageW(infoPtr->hwndEdit, uMsg, wParam, lParam);
|
return SendMessageW(infoPtr->hwndEdit, uMsg, wParam, lParam);
|
||||||
|
|
||||||
case CB_GETLBTEXT:
|
case CB_GETLBTEXT:
|
||||||
|
@ -2233,12 +2245,15 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case CB_GETLBTEXTLEN:
|
case CB_GETLBTEXTLEN:
|
||||||
return COMBOEX_GetListboxText(infoPtr, wParam, NULL);
|
return COMBOEX_GetListboxText(infoPtr, wParam, NULL);
|
||||||
|
|
||||||
|
case CB_RESETCONTENT:
|
||||||
|
COMBOEX_ResetContent(infoPtr);
|
||||||
|
/* fall through */
|
||||||
|
|
||||||
/* Combo messages we are not sure if we need to process or just forward */
|
/* Combo messages we are not sure if we need to process or just forward */
|
||||||
case CB_GETDROPPEDCONTROLRECT:
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
case CB_GETITEMHEIGHT:
|
case CB_GETITEMHEIGHT:
|
||||||
case CB_GETEXTENDEDUI:
|
case CB_GETEXTENDEDUI:
|
||||||
case CB_LIMITTEXT:
|
case CB_LIMITTEXT:
|
||||||
case CB_RESETCONTENT:
|
|
||||||
case CB_SELECTSTRING:
|
case CB_SELECTSTRING:
|
||||||
|
|
||||||
/* Combo messages OK to just forward to the regular COMBO */
|
/* Combo messages OK to just forward to the regular COMBO */
|
||||||
|
|
|
@ -5,12 +5,9 @@
|
||||||
<importlibrary definition="comctl32.spec.def" />
|
<importlibrary definition="comctl32.spec.def" />
|
||||||
<include base="comctl32">.</include>
|
<include base="comctl32">.</include>
|
||||||
<include base="ReactOS">include/reactos/wine</include>
|
<include base="ReactOS">include/reactos/wine</include>
|
||||||
<define name="__REACTOS__" />
|
|
||||||
<define name="__WINESRC__" />
|
<define name="__WINESRC__" />
|
||||||
<define name="__USE_W32API" />
|
<define name="WINVER">0x600</define>
|
||||||
<define name="_WIN32_IE">0x600</define>
|
<define name="_WIN32_WINNT">0x600</define>
|
||||||
<define name="_WIN32_WINNT">0x501</define>
|
|
||||||
<define name="WINVER">0x501</define>
|
|
||||||
<library>wine</library>
|
<library>wine</library>
|
||||||
<library>user32</library>
|
<library>user32</library>
|
||||||
<library>gdi32</library>
|
<library>gdi32</library>
|
||||||
|
|
|
@ -82,7 +82,7 @@ Index: propsheet.c
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@@ -3555,6 +3558,8 @@
|
@@ -3521,6 +3525,8 @@
|
||||||
* from which to switch to the next page */
|
* from which to switch to the next page */
|
||||||
SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0);
|
SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0);
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ Index: tooltips.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- tooltips.c (revision 25790)
|
--- tooltips.c (revision 25790)
|
||||||
+++ tooltips.c (working copy)
|
+++ tooltips.c (working copy)
|
||||||
@@ -2471,7 +2471,34 @@
|
@@ -2440,7 +2440,34 @@
|
||||||
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
||||||
|
@ -170,7 +170,7 @@ Index: monthcal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- monthcal.c (revision 29360)
|
--- monthcal.c (revision 29360)
|
||||||
+++ monthcal.c (working copy)
|
+++ monthcal.c (working copy)
|
||||||
@@ -1703,11 +1703,12 @@
|
@@ -1719,11 +1719,12 @@
|
||||||
|
|
||||||
|
|
||||||
static LRESULT
|
static LRESULT
|
||||||
|
@ -185,7 +185,7 @@ Index: monthcal.c
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2015,7 +2016,7 @@
|
@@ -2031,7 +2032,7 @@
|
||||||
return DLGC_WANTARROWS | DLGC_WANTCHARS;
|
return DLGC_WANTARROWS | DLGC_WANTCHARS;
|
||||||
|
|
||||||
case WM_KILLFOCUS:
|
case WM_KILLFOCUS:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002 Won-kyu Park <wkpark@kldp.org>
|
* Copyright 2002 Won-kyu Park <wkpark@kldp.org>
|
||||||
* Copyright 2005 YunSong Hwang
|
* Copyright 2005,2007 YunSong Hwang
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -57,11 +57,11 @@ BEGIN
|
||||||
PUSHBUTTON "다시(&E)", IDC_RESET_BTN,308,23,44,14
|
PUSHBUTTON "다시(&E)", IDC_RESET_BTN,308,23,44,14
|
||||||
PUSHBUTTON "도움말(&H)", IDC_HELP_BTN,308,40,44,14
|
PUSHBUTTON "도움말(&H)", IDC_HELP_BTN,308,40,44,14
|
||||||
PUSHBUTTON "위로 이동(&U)", IDC_MOVEUP_BTN,308,74,44,14
|
PUSHBUTTON "위로 이동(&U)", IDC_MOVEUP_BTN,308,74,44,14
|
||||||
PUSHBUTTON "아래로 이동(&D)", IDC_MOVEDN_BTN,308,91,44,14
|
PUSHBUTTON "아래로이동(&D)", IDC_MOVEDN_BTN,308,91,49,14
|
||||||
LTEXT "가능한 버튼(&V)", -1,4,5,84,10
|
LTEXT "가능한 버튼(&V)", -1,4,5,84,10
|
||||||
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
LISTBOX IDC_AVAILBTN_LBOX,4,17,120,100, LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
PUSHBUTTON "더하기(&A) ->", IDOK, 131, 42, 44, 14
|
PUSHBUTTON "더하기(&A) ->", IDOK, 131, 42, 44, 14
|
||||||
PUSHBUTTON "<- 제거하기(&R)", IDC_REMOVE_BTN,131,62,44,14
|
PUSHBUTTON "<-지우기(&R)", IDC_REMOVE_BTN,131,62,44,14
|
||||||
LTEXT "도구바 버튼(&T):", -1,182,5,78,10
|
LTEXT "도구바 버튼(&T):", -1,182,5,78,10
|
||||||
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
LISTBOX IDC_TOOLBARBTN_LBOX, 182,17,120,100,LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||||
END
|
END
|
||||||
|
|
|
@ -74,7 +74,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
|
||||||
|
|
||||||
#define NAME "microsoft.windows.common-controls"
|
#define NAME "microsoft.windows.common-controls"
|
||||||
#define FILE "comctl32.dll"
|
#define FILE "comctl32.dll"
|
||||||
#define VERSION "6.0.0.0"
|
#define VERSION "6.0.2600.2982"
|
||||||
#define PUBLIC_KEY "6595b64144ccf1df"
|
#define PUBLIC_KEY "6595b64144ccf1df"
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
|
|
@ -72,6 +72,7 @@ typedef struct
|
||||||
RECT checkbox; /* checkbox allowing the control to be enabled/disabled */
|
RECT checkbox; /* checkbox allowing the control to be enabled/disabled */
|
||||||
RECT calbutton; /* button that toggles the dropdown of the monthcal control */
|
RECT calbutton; /* button that toggles the dropdown of the monthcal control */
|
||||||
BOOL bCalDepressed; /* TRUE = cal button is depressed */
|
BOOL bCalDepressed; /* TRUE = cal button is depressed */
|
||||||
|
int bDropdownEnabled;
|
||||||
int select;
|
int select;
|
||||||
HFONT hFont;
|
HFONT hFont;
|
||||||
int nrFieldsAllocated;
|
int nrFieldsAllocated;
|
||||||
|
@ -739,7 +740,10 @@ DATETIME_LButtonDown (DATETIME_INFO *infoPtr, WORD wKey, INT x, INT y)
|
||||||
TRACE("update calendar %04d/%02d/%02d\n",
|
TRACE("update calendar %04d/%02d/%02d\n",
|
||||||
lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay);
|
lprgSysTimeArray->wYear, lprgSysTimeArray->wMonth, lprgSysTimeArray->wDay);
|
||||||
SendMessageW(infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date));
|
SendMessageW(infoPtr->hMonthCal, MCM_SETCURSEL, 0, (LPARAM)(&infoPtr->date));
|
||||||
|
|
||||||
|
if (infoPtr->bDropdownEnabled)
|
||||||
ShowWindow(infoPtr->hMonthCal, SW_SHOW);
|
ShowWindow(infoPtr->hMonthCal, SW_SHOW);
|
||||||
|
infoPtr->bDropdownEnabled = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE ("dt:%p mc:%p mc parent:%p, desktop:%p\n",
|
TRACE ("dt:%p mc:%p mc parent:%p, desktop:%p\n",
|
||||||
|
@ -776,6 +780,10 @@ DATETIME_Paint (DATETIME_INFO *infoPtr, HDC hdc)
|
||||||
} else {
|
} else {
|
||||||
DATETIME_Refresh (infoPtr, hdc);
|
DATETIME_Refresh (infoPtr, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Not a click on the dropdown box, enabled it */
|
||||||
|
infoPtr->bDropdownEnabled = TRUE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1063,6 +1071,19 @@ DATETIME_SetFocus (DATETIME_INFO *infoPtr, HWND lostFocus)
|
||||||
{
|
{
|
||||||
TRACE("got focus from %p\n", lostFocus);
|
TRACE("got focus from %p\n", lostFocus);
|
||||||
|
|
||||||
|
/* if monthcal is open and it loses focus, close monthcal */
|
||||||
|
if (infoPtr->hMonthCal && (lostFocus == infoPtr->hMonthCal) && \
|
||||||
|
IsWindowVisible(infoPtr->hMonthCal))
|
||||||
|
{
|
||||||
|
ShowWindow(infoPtr->hMonthCal, SW_HIDE);
|
||||||
|
DATETIME_SendSimpleNotify(infoPtr, DTN_CLOSEUP);
|
||||||
|
/* note: this get triggered even if monthcal loses focus to a dropdown
|
||||||
|
* box click, which occurs without an intermediate WM_PAINT call
|
||||||
|
*/
|
||||||
|
infoPtr->bDropdownEnabled = FALSE;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (infoPtr->haveFocus == 0) {
|
if (infoPtr->haveFocus == 0) {
|
||||||
DATETIME_SendSimpleNotify (infoPtr, NM_SETFOCUS);
|
DATETIME_SendSimpleNotify (infoPtr, NM_SETFOCUS);
|
||||||
infoPtr->haveFocus = DTHT_GOTFOCUS;
|
infoPtr->haveFocus = DTHT_GOTFOCUS;
|
||||||
|
@ -1207,6 +1228,7 @@ DATETIME_Create (HWND hwnd, const CREATESTRUCTW *lpcs)
|
||||||
infoPtr->buflen = (int *) Alloc (infoPtr->nrFieldsAllocated * sizeof(int));
|
infoPtr->buflen = (int *) Alloc (infoPtr->nrFieldsAllocated * sizeof(int));
|
||||||
infoPtr->hwndNotify = lpcs->hwndParent;
|
infoPtr->hwndNotify = lpcs->hwndParent;
|
||||||
infoPtr->select = -1; /* initially, nothing is selected */
|
infoPtr->select = -1; /* initially, nothing is selected */
|
||||||
|
infoPtr->bDropdownEnabled = TRUE;
|
||||||
|
|
||||||
DATETIME_StyleChanged(infoPtr, GWL_STYLE, &ss);
|
DATETIME_StyleChanged(infoPtr, GWL_STYLE, &ss);
|
||||||
DATETIME_SetFormatW (infoPtr, 0);
|
DATETIME_SetFormatW (infoPtr, 0);
|
||||||
|
|
BIN
reactos/dll/win32/comctl32/idb_hist_large.bmp
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
reactos/dll/win32/comctl32/idb_hist_small.bmp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
reactos/dll/win32/comctl32/idb_std_large.bmp
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
reactos/dll/win32/comctl32/idb_std_small.bmp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
reactos/dll/win32/comctl32/idb_view_large.bmp
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
reactos/dll/win32/comctl32/idb_view_small.bmp
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
reactos/dll/win32/comctl32/idc_copy.cur
Normal file
After Width: | Height: | Size: 326 B |
BIN
reactos/dll/win32/comctl32/idc_divider.cur
Normal file
After Width: | Height: | Size: 326 B |
BIN
reactos/dll/win32/comctl32/idc_divideropen.cur
Normal file
After Width: | Height: | Size: 326 B |
BIN
reactos/dll/win32/comctl32/idc_movebutton.cur
Normal file
After Width: | Height: | Size: 326 B |
BIN
reactos/dll/win32/comctl32/idi_dragarrow.ico
Normal file
After Width: | Height: | Size: 326 B |
BIN
reactos/dll/win32/comctl32/idi_tt_error_sm.ico
Normal file
After Width: | Height: | Size: 318 B |
BIN
reactos/dll/win32/comctl32/idi_tt_info_sm.ico
Normal file
After Width: | Height: | Size: 318 B |
BIN
reactos/dll/win32/comctl32/idi_tt_warn_sm.ico
Normal file
After Width: | Height: | Size: 318 B |
BIN
reactos/dll/win32/comctl32/idt_check.bmp
Normal file
After Width: | Height: | Size: 398 B |
|
@ -2291,8 +2291,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ii.hbmColor == 0)
|
|
||||||
ERR("no color!\n");
|
|
||||||
ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp);
|
ret = GetObjectW (ii.hbmMask, sizeof(BITMAP), (LPVOID)&bmp);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
ERR("couldn't get mask bitmap info\n");
|
ERR("couldn't get mask bitmap info\n");
|
||||||
|
@ -2317,19 +2315,33 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
|
||||||
if (hdcImage == 0)
|
if (hdcImage == 0)
|
||||||
ERR("invalid hdcImage!\n");
|
ERR("invalid hdcImage!\n");
|
||||||
|
|
||||||
|
imagelist_point_from_index(himl, nIndex, &pt);
|
||||||
|
|
||||||
SetTextColor(himl->hdcImage, RGB(0,0,0));
|
SetTextColor(himl->hdcImage, RGB(0,0,0));
|
||||||
SetBkColor (himl->hdcImage, RGB(255,255,255));
|
SetBkColor (himl->hdcImage, RGB(255,255,255));
|
||||||
hbmOldSrc = SelectObject (hdcImage, ii.hbmColor);
|
|
||||||
|
|
||||||
imagelist_point_from_index(himl, nIndex, &pt);
|
if (ii.hbmColor)
|
||||||
|
{
|
||||||
|
hbmOldSrc = SelectObject (hdcImage, ii.hbmColor);
|
||||||
StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy,
|
StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
||||||
|
if (himl->hbmMask)
|
||||||
if (himl->hbmMask) {
|
{
|
||||||
SelectObject (hdcImage, ii.hbmMask);
|
SelectObject (hdcImage, ii.hbmMask);
|
||||||
StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
|
StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UINT height = bmp.bmHeight / 2;
|
||||||
|
hbmOldSrc = SelectObject (hdcImage, ii.hbmMask);
|
||||||
|
StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
|
hdcImage, 0, height, bmp.bmWidth, height, SRCCOPY);
|
||||||
|
if (himl->hbmMask)
|
||||||
|
StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
|
hdcImage, 0, 0, bmp.bmWidth, height, SRCCOPY);
|
||||||
|
}
|
||||||
|
|
||||||
SelectObject (hdcImage, hbmOldSrc);
|
SelectObject (hdcImage, hbmOldSrc);
|
||||||
|
|
||||||
|
@ -2570,8 +2582,6 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
|
||||||
|
|
||||||
if (!is_valid(himl))
|
if (!is_valid(himl))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (iImageCount < 0)
|
|
||||||
return FALSE;
|
|
||||||
if (himl->cMaxImage > iImageCount)
|
if (himl->cMaxImage > iImageCount)
|
||||||
{
|
{
|
||||||
himl->cCurImage = iImageCount;
|
himl->cCurImage = iImageCount;
|
||||||
|
|
|
@ -572,7 +572,7 @@ static char* debug_getbuf(void)
|
||||||
static inline const char* debugrange(const RANGE *lprng)
|
static inline const char* debugrange(const RANGE *lprng)
|
||||||
{
|
{
|
||||||
if (!lprng) return "(null)";
|
if (!lprng) return "(null)";
|
||||||
return wine_dbg_sprintf("[%d, %d)", lprng->lower, lprng->upper);
|
return wine_dbg_sprintf("[%d, %d]", lprng->lower, lprng->upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* debugscrollinfo(const SCROLLINFO *pScrollInfo)
|
static const char* debugscrollinfo(const SCROLLINFO *pScrollInfo)
|
||||||
|
@ -5040,11 +5040,12 @@ static INT LISTVIEW_FindItemA(const LISTVIEW_INFO *infoPtr, INT nStart,
|
||||||
BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
|
BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
|
||||||
LVFINDINFOW fiw;
|
LVFINDINFOW fiw;
|
||||||
INT res;
|
INT res;
|
||||||
|
LPWSTR strW;
|
||||||
|
|
||||||
memcpy(&fiw, lpFindInfo, sizeof(fiw));
|
memcpy(&fiw, lpFindInfo, sizeof(fiw));
|
||||||
if (hasText) fiw.psz = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
|
if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
|
||||||
res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw);
|
res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw);
|
||||||
if (hasText) textfreeT((LPWSTR)fiw.psz, FALSE);
|
if (hasText) textfreeT(strW, FALSE);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6490,7 +6491,7 @@ static BOOL LISTVIEW_RedrawItems(const LISTVIEW_INFO *infoPtr, INT nFirst, INT n
|
||||||
* be scrolled only in line increments. "dy" will be rounded to the
|
* be scrolled only in line increments. "dy" will be rounded to the
|
||||||
* nearest number of pixels that are a whole line. Ex: if line height
|
* nearest number of pixels that are a whole line. Ex: if line height
|
||||||
* is 16 and an 8 is passed, the list will be scrolled by 16. If a 7
|
* is 16 and an 8 is passed, the list will be scrolled by 16. If a 7
|
||||||
* is passed the the scroll will be 0. (per MSDN 7/2002)
|
* is passed, then the scroll will be 0. (per MSDN 7/2002)
|
||||||
*
|
*
|
||||||
* For: (per experimentaion with native control and CSpy ListView)
|
* For: (per experimentaion with native control and CSpy ListView)
|
||||||
* LVS_ICON dy=1 = 1 pixel (vertical only)
|
* LVS_ICON dy=1 = 1 pixel (vertical only)
|
||||||
|
|
|
@ -1415,14 +1415,14 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
infoPtr->status = MC_NEXTPRESSED;
|
infoPtr->status = MC_NEXTPRESSED;
|
||||||
SetTimer(infoPtr->hwndSelf, MC_NEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0);
|
SetTimer(infoPtr->hwndSelf, MC_NEXTMONTHTIMER, MC_NEXTMONTHDELAY, 0);
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
return TRUE;
|
return 0;
|
||||||
}
|
}
|
||||||
if(hit == MCHT_TITLEBTNPREV){
|
if(hit == MCHT_TITLEBTNPREV){
|
||||||
MONTHCAL_GoToPrevMonth(infoPtr);
|
MONTHCAL_GoToPrevMonth(infoPtr);
|
||||||
infoPtr->status = MC_PREVPRESSED;
|
infoPtr->status = MC_PREVPRESSED;
|
||||||
SetTimer(infoPtr->hwndSelf, MC_PREVMONTHTIMER, MC_NEXTMONTHDELAY, 0);
|
SetTimer(infoPtr->hwndSelf, MC_PREVMONTHTIMER, MC_NEXTMONTHDELAY, 0);
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
return TRUE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(hit == MCHT_TITLEMONTH) {
|
if(hit == MCHT_TITLEMONTH) {
|
||||||
|
@ -1471,14 +1471,30 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753));
|
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETRANGE, (WPARAM) 0, MAKELONG (9999, 1753));
|
||||||
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 );
|
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETBUDDY, (WPARAM) infoPtr->hWndYearEdit, (LPARAM)0 );
|
||||||
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETPOS, (WPARAM) 0,(LPARAM)infoPtr->currentYear );
|
SendMessageW( infoPtr->hWndYearUpDown, UDM_SETPOS, (WPARAM) 0,(LPARAM)infoPtr->currentYear );
|
||||||
return TRUE;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(hit == MCHT_TODAYLINK) {
|
if(hit == MCHT_TODAYLINK) {
|
||||||
|
NMSELCHANGE nmsc;
|
||||||
|
|
||||||
|
infoPtr->curSelDay = infoPtr->todaysDate.wDay;
|
||||||
|
infoPtr->firstSelDay = infoPtr->todaysDate.wDay;
|
||||||
infoPtr->currentMonth=infoPtr->todaysDate.wMonth;
|
infoPtr->currentMonth=infoPtr->todaysDate.wMonth;
|
||||||
infoPtr->currentYear=infoPtr->todaysDate.wYear;
|
infoPtr->currentYear=infoPtr->todaysDate.wYear;
|
||||||
|
MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->minSel);
|
||||||
|
MONTHCAL_CopyTime(&infoPtr->todaysDate, &infoPtr->maxSel);
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
|
||||||
return TRUE;
|
|
||||||
|
nmsc.nmhdr.hwndFrom = infoPtr->hwndSelf;
|
||||||
|
nmsc.nmhdr.idFrom = GetWindowLongPtrW(infoPtr->hwndSelf, GWLP_ID);
|
||||||
|
nmsc.nmhdr.code = MCN_SELCHANGE;
|
||||||
|
MONTHCAL_CopyTime(&infoPtr->minSel, &nmsc.stSelStart);
|
||||||
|
MONTHCAL_CopyTime(&infoPtr->maxSel, &nmsc.stSelEnd);
|
||||||
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom, (LPARAM)&nmsc);
|
||||||
|
|
||||||
|
nmsc.nmhdr.code = MCN_SELECT;
|
||||||
|
SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)nmsc.nmhdr.idFrom,(LPARAM)&nmsc);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
if(hit == MCHT_CALENDARDATE) {
|
if(hit == MCHT_CALENDARDATE) {
|
||||||
SYSTEMTIME selArray[2];
|
SYSTEMTIME selArray[2];
|
||||||
|
@ -1511,10 +1527,10 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
|
||||||
infoPtr->firstSelDay = ht.st.wDay;
|
infoPtr->firstSelDay = ht.st.wDay;
|
||||||
infoPtr->curSelDay = ht.st.wDay;
|
infoPtr->curSelDay = ht.st.wDay;
|
||||||
infoPtr->status = MC_SEL_LBUTDOWN;
|
infoPtr->status = MC_SEL_LBUTDOWN;
|
||||||
return TRUE;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2510,7 +2510,7 @@ REBAR_SetBandInfoT(REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnic
|
||||||
else
|
else
|
||||||
Str_SetPtrAtoW(&wstr, (LPSTR)lprbbi->lpText);
|
Str_SetPtrAtoW(&wstr, (LPSTR)lprbbi->lpText);
|
||||||
|
|
||||||
if (REBAR_strdifW(wstr, lprbbi->lpText)) {
|
if (REBAR_strdifW(wstr, lpBand->lpText)) {
|
||||||
Free(lpBand->lpText);
|
Free(lpBand->lpText);
|
||||||
lpBand->lpText = wstr;
|
lpBand->lpText = wstr;
|
||||||
bChanged = TRUE;
|
bChanged = TRUE;
|
||||||
|
|
|
@ -633,7 +633,6 @@ STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height)
|
||||||
RECT parent_rect;
|
RECT parent_rect;
|
||||||
HTHEME theme;
|
HTHEME theme;
|
||||||
|
|
||||||
GetClientRect (infoPtr->Notify, &parent_rect);
|
|
||||||
infoPtr->height = height + infoPtr->verticalBorder;
|
infoPtr->height = height + infoPtr->verticalBorder;
|
||||||
|
|
||||||
if ((theme = GetWindowTheme (infoPtr->Self)))
|
if ((theme = GetWindowTheme (infoPtr->Self)))
|
||||||
|
@ -651,14 +650,15 @@ STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height)
|
||||||
ReleaseDC (infoPtr->Self, hdc);
|
ReleaseDC (infoPtr->Self, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetClientRect (infoPtr->Notify, &parent_rect))
|
||||||
|
{
|
||||||
width = parent_rect.right - parent_rect.left;
|
width = parent_rect.right - parent_rect.left;
|
||||||
x = parent_rect.left;
|
x = parent_rect.left;
|
||||||
y = parent_rect.bottom - infoPtr->height;
|
y = parent_rect.bottom - infoPtr->height;
|
||||||
MoveWindow (infoPtr->Self, parent_rect.left,
|
MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE);
|
||||||
parent_rect.bottom - infoPtr->height,
|
|
||||||
width, infoPtr->height, TRUE);
|
|
||||||
STATUSBAR_SetPartBounds (infoPtr);
|
STATUSBAR_SetPartBounds (infoPtr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1191,13 +1191,13 @@ STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags)
|
||||||
if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE;
|
if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE;
|
||||||
|
|
||||||
/* width and height don't apply */
|
/* width and height don't apply */
|
||||||
GetClientRect (infoPtr->Notify, &parent_rect);
|
if (!GetClientRect (infoPtr->Notify, &parent_rect))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
width = parent_rect.right - parent_rect.left;
|
width = parent_rect.right - parent_rect.left;
|
||||||
x = parent_rect.left;
|
x = parent_rect.left;
|
||||||
y = parent_rect.bottom - infoPtr->height;
|
y = parent_rect.bottom - infoPtr->height;
|
||||||
MoveWindow (infoPtr->Self, parent_rect.left,
|
MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE);
|
||||||
parent_rect.bottom - infoPtr->height,
|
|
||||||
width, infoPtr->height, TRUE);
|
|
||||||
STATUSBAR_SetPartBounds (infoPtr);
|
STATUSBAR_SetPartBounds (infoPtr);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2325,11 +2325,6 @@ static void TAB_Refresh (TAB_INFO *infoPtr, HDC hdc)
|
||||||
|
|
||||||
/* Then, draw the selected item */
|
/* Then, draw the selected item */
|
||||||
TAB_DrawItem (infoPtr, hdc, infoPtr->iSelected);
|
TAB_DrawItem (infoPtr, hdc, infoPtr->iSelected);
|
||||||
|
|
||||||
/* If we haven't set the current focus yet, set it now.
|
|
||||||
* Only happens when we first paint the tab controls */
|
|
||||||
if (infoPtr->uFocus == -1)
|
|
||||||
TAB_SetCurFocus(infoPtr, infoPtr->iSelected);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject (hdc, hOldFont);
|
SelectObject (hdc, hOldFont);
|
||||||
|
@ -2637,6 +2632,10 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam, BOOL bUnicode)
|
||||||
TRACE("[%p]: added item %d %s\n",
|
TRACE("[%p]: added item %d %s\n",
|
||||||
infoPtr->hwnd, iItem, debugstr_w(item->pszText));
|
infoPtr->hwnd, iItem, debugstr_w(item->pszText));
|
||||||
|
|
||||||
|
/* If we haven't set the current focus yet, set it now. */
|
||||||
|
if (infoPtr->uFocus == -1)
|
||||||
|
TAB_SetCurFocus(infoPtr, iItem);
|
||||||
|
|
||||||
return iItem;
|
return iItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3064,7 +3063,6 @@ TAB_Destroy (TAB_INFO *infoPtr)
|
||||||
|
|
||||||
if (infoPtr->items) {
|
if (infoPtr->items) {
|
||||||
for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) {
|
for (iItem = 0; iItem < infoPtr->uNumItem; iItem++) {
|
||||||
if (TAB_GetItem(infoPtr, iItem)->pszText)
|
|
||||||
Free (TAB_GetItem(infoPtr, iItem)->pszText);
|
Free (TAB_GetItem(infoPtr, iItem)->pszText);
|
||||||
}
|
}
|
||||||
Free (infoPtr->items);
|
Free (infoPtr->items);
|
||||||
|
|
|
@ -106,7 +106,7 @@ static void paint_text (HWND hwnd, HDC hdc, DWORD dwStyle, const COMBOBOXINFO *c
|
||||||
clipRegion=NULL;
|
clipRegion=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsWindowEnabled(hwnd) & WS_DISABLED) itemState |= ODS_DISABLED;
|
if (!IsWindowEnabled(hwnd)) itemState |= ODS_DISABLED;
|
||||||
|
|
||||||
dis.CtlType = ODT_COMBOBOX;
|
dis.CtlType = ODT_COMBOBOX;
|
||||||
dis.CtlID = ctlid;
|
dis.CtlID = ctlid;
|
||||||
|
|
|
@ -68,7 +68,7 @@ static ATOM atSubclassProp;
|
||||||
/* Generate a number of subclass window procs.
|
/* Generate a number of subclass window procs.
|
||||||
* With a single proc alone, we can't really reliably find out the superclass,
|
* With a single proc alone, we can't really reliably find out the superclass,
|
||||||
* so have one for each subclass. The subclass number is also stored in a prop
|
* so have one for each subclass. The subclass number is also stored in a prop
|
||||||
* since it's needed by THEMING_CallOriginalClass(). Then, the the subclass
|
* since it's needed by THEMING_CallOriginalClass(). Then, the subclass
|
||||||
* proc and ref data are fetched and the proc called.
|
* proc and ref data are fetched and the proc called.
|
||||||
*/
|
*/
|
||||||
#define MAKE_SUBCLASS_PROC(N) \
|
#define MAKE_SUBCLASS_PROC(N) \
|
||||||
|
|
|
@ -5430,7 +5430,6 @@ TOOLBAR_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (infoPtr->strings) {
|
if (infoPtr->strings) {
|
||||||
INT i;
|
INT i;
|
||||||
for (i = 0; i < infoPtr->nNumStrings; i++)
|
for (i = 0; i < infoPtr->nNumStrings; i++)
|
||||||
if (infoPtr->strings[i])
|
|
||||||
Free (infoPtr->strings[i]);
|
Free (infoPtr->strings[i]);
|
||||||
|
|
||||||
Free (infoPtr->strings);
|
Free (infoPtr->strings);
|
||||||
|
@ -6333,7 +6332,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (len > 0)
|
else if (tbgit.pszText[0])
|
||||||
{
|
{
|
||||||
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1,
|
MultiByteToWideChar(CP_ACP, 0, tbgit.pszText, -1,
|
||||||
lpnmtdi->lpszText, sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0]));
|
lpnmtdi->lpszText, sizeof(lpnmtdi->szText)/sizeof(lpnmtdi->szText[0]));
|
||||||
|
@ -6375,7 +6374,7 @@ static LRESULT TOOLBAR_TTGetDispInfo (TOOLBAR_INFO *infoPtr, NMTTDISPINFOW *lpnm
|
||||||
|
|
||||||
/* last resort: send notification on to app */
|
/* last resort: send notification on to app */
|
||||||
/* FIXME: find out what is really used here */
|
/* FIXME: find out what is really used here */
|
||||||
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, 0, (LPARAM)lpnmtdi);
|
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, (WPARAM)lpnmtdi->hdr.idFrom, (LPARAM)lpnmtdi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -515,7 +515,7 @@ TOOLTIPS_CalcTipSize (HWND hwnd, const TOOLTIPS_INFO *infoPtr, LPSIZE lpSize)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr, BOOL track_activate)
|
||||||
{
|
{
|
||||||
TTTOOL_INFO *toolPtr;
|
TTTOOL_INFO *toolPtr;
|
||||||
HMONITOR monitor;
|
HMONITOR monitor;
|
||||||
|
@ -525,25 +525,40 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
NMHDR hdr;
|
NMHDR hdr;
|
||||||
int ptfx = 0;
|
int ptfx = 0;
|
||||||
DWORD style = GetWindowLongW(hwnd, GWL_STYLE);
|
DWORD style = GetWindowLongW(hwnd, GWL_STYLE);
|
||||||
|
INT nTool;
|
||||||
|
|
||||||
if (infoPtr->nTool == -1) {
|
if (track_activate)
|
||||||
|
{
|
||||||
|
if (infoPtr->nTrackTool == -1)
|
||||||
|
{
|
||||||
|
TRACE("invalid tracking tool (-1)!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
nTool = infoPtr->nTrackTool;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (infoPtr->nTool == -1)
|
||||||
|
{
|
||||||
TRACE("invalid tool (-1)!\n");
|
TRACE("invalid tool (-1)!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
nTool = infoPtr->nTool;
|
||||||
infoPtr->nCurrentTool = infoPtr->nTool;
|
|
||||||
|
|
||||||
TRACE("Show tooltip pre %d! (%p)\n", infoPtr->nTool, hwnd);
|
|
||||||
|
|
||||||
TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nCurrentTool);
|
|
||||||
|
|
||||||
if (infoPtr->szTipText[0] == '\0') {
|
|
||||||
infoPtr->nCurrentTool = -1;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Show tooltip %d!\n", infoPtr->nCurrentTool);
|
TRACE("Show tooltip pre %d! (%p)\n", nTool, hwnd);
|
||||||
toolPtr = &infoPtr->tools[infoPtr->nCurrentTool];
|
|
||||||
|
TOOLTIPS_GetTipText (hwnd, infoPtr, nTool);
|
||||||
|
|
||||||
|
if (infoPtr->szTipText[0] == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
|
toolPtr = &infoPtr->tools[nTool];
|
||||||
|
|
||||||
|
if (!track_activate)
|
||||||
|
infoPtr->nCurrentTool = infoPtr->nTool;
|
||||||
|
|
||||||
|
TRACE("Show tooltip %d!\n", nTool);
|
||||||
|
|
||||||
hdr.hwndFrom = hwnd;
|
hdr.hwndFrom = hwnd;
|
||||||
hdr.idFrom = toolPtr->uId;
|
hdr.idFrom = toolPtr->uId;
|
||||||
|
@ -556,7 +571,47 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
||||||
TRACE("size %d x %d\n", size.cx, size.cy);
|
TRACE("size %d x %d\n", size.cx, size.cy);
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_CENTERTIP) {
|
if (track_activate)
|
||||||
|
{
|
||||||
|
rect.left = infoPtr->xTrackPos;
|
||||||
|
rect.top = infoPtr->yTrackPos;
|
||||||
|
ptfx = rect.left;
|
||||||
|
|
||||||
|
if (toolPtr->uFlags & TTF_CENTERTIP)
|
||||||
|
{
|
||||||
|
rect.left -= (size.cx / 2);
|
||||||
|
if (!(style & TTS_BALLOON))
|
||||||
|
rect.top -= (size.cy / 2);
|
||||||
|
}
|
||||||
|
infoPtr->bToolBelow = TRUE;
|
||||||
|
|
||||||
|
if (!(toolPtr->uFlags & TTF_ABSOLUTE))
|
||||||
|
{
|
||||||
|
if (style & TTS_BALLOON)
|
||||||
|
rect.left -= BALLOON_STEMINDENT;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RECT rcTool;
|
||||||
|
|
||||||
|
if (toolPtr->uFlags & TTF_IDISHWND)
|
||||||
|
GetWindowRect ((HWND)toolPtr->uId, &rcTool);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rcTool = toolPtr->rect;
|
||||||
|
MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* smart placement */
|
||||||
|
if ((rect.left + size.cx > rcTool.left) && (rect.left < rcTool.right) &&
|
||||||
|
(rect.top + size.cy > rcTool.top) && (rect.top < rcTool.bottom))
|
||||||
|
rect.left = rcTool.right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (toolPtr->uFlags & TTF_CENTERTIP)
|
||||||
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_IDISHWND)
|
if (toolPtr->uFlags & TTF_IDISHWND)
|
||||||
|
@ -571,8 +626,8 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
ptfx = rc.left + ((rc.right - rc.left) / 2);
|
ptfx = rc.left + ((rc.right - rc.left) / 2);
|
||||||
|
|
||||||
/* CENTERTIP ballon tooltips default to below the field
|
/* CENTERTIP ballon tooltips default to below the field
|
||||||
if they fit on the screen */
|
* if they fit on the screen */
|
||||||
if(rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN))
|
if (rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN))
|
||||||
{
|
{
|
||||||
rect.top = rc.top - size.cy;
|
rect.top = rc.top - size.cy;
|
||||||
infoPtr->bToolBelow = FALSE;
|
infoPtr->bToolBelow = FALSE;
|
||||||
|
@ -590,7 +645,8 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
infoPtr->bToolBelow = TRUE;
|
infoPtr->bToolBelow = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
GetCursorPos ((LPPOINT)&rect);
|
GetCursorPos ((LPPOINT)&rect);
|
||||||
if (style & TTS_BALLOON)
|
if (style & TTS_BALLOON)
|
||||||
{
|
{
|
||||||
|
@ -613,6 +669,7 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
infoPtr->bToolBelow = TRUE;
|
infoPtr->bToolBelow = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("pos %d - %d\n", rect.left, rect.top);
|
TRACE("pos %d - %d\n", rect.left, rect.top);
|
||||||
|
|
||||||
|
@ -708,10 +765,13 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
InvalidateRect(hwnd, NULL, TRUE);
|
||||||
UpdateWindow(hwnd);
|
UpdateWindow(hwnd);
|
||||||
|
|
||||||
|
if (!track_activate)
|
||||||
|
{
|
||||||
SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
|
SetTimer (hwnd, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
|
||||||
TRACE("timer 2 started!\n");
|
TRACE("timer 2 started!\n");
|
||||||
SetTimer (hwnd, ID_TIMERLEAVE, infoPtr->nReshowTime, 0);
|
SetTimer (hwnd, ID_TIMERLEAVE, infoPtr->nReshowTime, 0);
|
||||||
TRACE("timer 3 started!\n");
|
TRACE("timer 3 started!\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -745,98 +805,7 @@ TOOLTIPS_Hide (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
static void
|
static void
|
||||||
TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr)
|
||||||
{
|
{
|
||||||
TTTOOL_INFO *toolPtr;
|
TOOLTIPS_Show(hwnd, infoPtr, TRUE);
|
||||||
RECT rect;
|
|
||||||
SIZE size;
|
|
||||||
NMHDR hdr;
|
|
||||||
|
|
||||||
if (infoPtr->nTrackTool == -1) {
|
|
||||||
TRACE("invalid tracking tool (-1)!\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("show tracking tooltip pre %d!\n", infoPtr->nTrackTool);
|
|
||||||
|
|
||||||
TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nTrackTool);
|
|
||||||
|
|
||||||
if (infoPtr->szTipText[0] == '\0') {
|
|
||||||
infoPtr->nTrackTool = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("show tracking tooltip %d!\n", infoPtr->nTrackTool);
|
|
||||||
toolPtr = &infoPtr->tools[infoPtr->nTrackTool];
|
|
||||||
|
|
||||||
hdr.hwndFrom = hwnd;
|
|
||||||
hdr.idFrom = toolPtr->uId;
|
|
||||||
hdr.code = TTN_SHOW;
|
|
||||||
SendMessageW (toolPtr->hwnd, WM_NOTIFY,
|
|
||||||
(WPARAM)toolPtr->uId, (LPARAM)&hdr);
|
|
||||||
|
|
||||||
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
|
|
||||||
|
|
||||||
TOOLTIPS_CalcTipSize (hwnd, infoPtr, &size);
|
|
||||||
TRACE("size %d x %d\n", size.cx, size.cy);
|
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_ABSOLUTE) {
|
|
||||||
rect.left = infoPtr->xTrackPos;
|
|
||||||
rect.top = infoPtr->yTrackPos;
|
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_CENTERTIP) {
|
|
||||||
rect.left -= (size.cx / 2);
|
|
||||||
rect.top -= (size.cy / 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
RECT rcTool;
|
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_IDISHWND)
|
|
||||||
GetWindowRect ((HWND)toolPtr->uId, &rcTool);
|
|
||||||
else {
|
|
||||||
rcTool = toolPtr->rect;
|
|
||||||
MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
GetCursorPos ((LPPOINT)&rect);
|
|
||||||
rect.top += 20;
|
|
||||||
|
|
||||||
if (toolPtr->uFlags & TTF_CENTERTIP) {
|
|
||||||
rect.left -= (size.cx / 2);
|
|
||||||
rect.top -= (size.cy / 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* smart placement */
|
|
||||||
if ((rect.left + size.cx > rcTool.left) && (rect.left < rcTool.right) &&
|
|
||||||
(rect.top + size.cy > rcTool.top) && (rect.top < rcTool.bottom))
|
|
||||||
rect.left = rcTool.right;
|
|
||||||
}
|
|
||||||
|
|
||||||
TRACE("pos %d - %d\n", rect.left, rect.top);
|
|
||||||
|
|
||||||
rect.right = rect.left + size.cx;
|
|
||||||
rect.bottom = rect.top + size.cy;
|
|
||||||
|
|
||||||
AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE),
|
|
||||||
FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE));
|
|
||||||
|
|
||||||
if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON)
|
|
||||||
{
|
|
||||||
HRGN hRgn;
|
|
||||||
|
|
||||||
/* FIXME: need to add pointy bit using CreatePolyRgn & CombinRgn */
|
|
||||||
hRgn = CreateRoundRectRgn(0, 0, rect.right - rect.left, rect.bottom - rect.top, BALLOON_ROUNDEDNESS, BALLOON_ROUNDEDNESS);
|
|
||||||
|
|
||||||
SetWindowRgn(hwnd, hRgn, FALSE);
|
|
||||||
/* we don't free the region handle as the system deletes it when
|
|
||||||
* it is no longer needed */
|
|
||||||
}
|
|
||||||
|
|
||||||
SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top,
|
|
||||||
rect.right - rect.left, rect.bottom - rect.top,
|
|
||||||
SWP_SHOWWINDOW | SWP_NOACTIVATE );
|
|
||||||
|
|
||||||
InvalidateRect(hwnd, NULL, TRUE);
|
|
||||||
UpdateWindow(hwnd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2133,7 +2102,7 @@ TOOLTIPS_SetToolInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if (infoPtr->szTipText[0] == 0)
|
if (infoPtr->szTipText[0] == 0)
|
||||||
TOOLTIPS_Hide(hwnd, infoPtr);
|
TOOLTIPS_Hide(hwnd, infoPtr);
|
||||||
else
|
else
|
||||||
TOOLTIPS_Show (hwnd, infoPtr);
|
TOOLTIPS_Show (hwnd, infoPtr, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2255,7 +2224,7 @@ TOOLTIPS_UpdateTipTextA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if(infoPtr->nCurrentTool == -1) return 0;
|
if(infoPtr->nCurrentTool == -1) return 0;
|
||||||
/* force repaint */
|
/* force repaint */
|
||||||
if (infoPtr->bActive)
|
if (infoPtr->bActive)
|
||||||
TOOLTIPS_Show (hwnd, infoPtr);
|
TOOLTIPS_Show (hwnd, infoPtr, FALSE);
|
||||||
else if (infoPtr->bTrackActive)
|
else if (infoPtr->bTrackActive)
|
||||||
TOOLTIPS_TrackShow (hwnd, infoPtr);
|
TOOLTIPS_TrackShow (hwnd, infoPtr);
|
||||||
|
|
||||||
|
@ -2311,9 +2280,9 @@ TOOLTIPS_UpdateTipTextW (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
if(infoPtr->nCurrentTool == -1) return 0;
|
if(infoPtr->nCurrentTool == -1) return 0;
|
||||||
/* force repaint */
|
/* force repaint */
|
||||||
if (infoPtr->bActive)
|
if (infoPtr->bActive)
|
||||||
TOOLTIPS_Show (hwnd, infoPtr);
|
TOOLTIPS_Show (hwnd, infoPtr, FALSE);
|
||||||
else if (infoPtr->bTrackActive)
|
else if (infoPtr->bTrackActive)
|
||||||
TOOLTIPS_TrackShow (hwnd, infoPtr);
|
TOOLTIPS_Show (hwnd, infoPtr, TRUE);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -2597,7 +2566,7 @@ TOOLTIPS_Timer (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
KillTimer (hwnd, ID_TIMERSHOW);
|
KillTimer (hwnd, ID_TIMERSHOW);
|
||||||
nOldTool = infoPtr->nTool;
|
nOldTool = infoPtr->nTool;
|
||||||
if ((infoPtr->nTool = TOOLTIPS_CheckTool (hwnd, TRUE)) == nOldTool)
|
if ((infoPtr->nTool = TOOLTIPS_CheckTool (hwnd, TRUE)) == nOldTool)
|
||||||
TOOLTIPS_Show (hwnd, infoPtr);
|
TOOLTIPS_Show (hwnd, infoPtr, FALSE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_TIMERPOP:
|
case ID_TIMERPOP:
|
||||||
|
|
|
@ -824,6 +824,7 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
|
||||||
HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
|
HBITMAP hOldBmp = 0, hOffScreenBmp = 0;
|
||||||
NMCUSTOMDRAW nmcd;
|
NMCUSTOMDRAW nmcd;
|
||||||
int gcdrf, icdrf;
|
int gcdrf, icdrf;
|
||||||
|
HTHEME theme;
|
||||||
|
|
||||||
if (infoPtr->flags & TB_THUMBCHANGED) {
|
if (infoPtr->flags & TB_THUMBCHANGED) {
|
||||||
TRACKBAR_UpdateThumb (infoPtr);
|
TRACKBAR_UpdateThumb (infoPtr);
|
||||||
|
@ -868,8 +869,12 @@ TRACKBAR_Refresh (TRACKBAR_INFO *infoPtr, HDC hdcDst)
|
||||||
/* Erase backbround */
|
/* Erase backbround */
|
||||||
if (gcdrf == CDRF_DODEFAULT ||
|
if (gcdrf == CDRF_DODEFAULT ||
|
||||||
notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
|
notify_customdraw(infoPtr, &nmcd, CDDS_PREERASE) != CDRF_SKIPDEFAULT) {
|
||||||
if (GetWindowTheme (infoPtr->hwndSelf))
|
if ((theme = GetWindowTheme (infoPtr->hwndSelf))) {
|
||||||
|
DrawThemeBackground (theme, hdc,
|
||||||
|
(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TBS_VERT) ?
|
||||||
|
TKP_TRACKVERT : TKP_TRACK, TKS_NORMAL, &rcClient, 0);
|
||||||
DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient);
|
DrawThemeParentBackground (infoPtr->hwndSelf, hdc, &rcClient);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
|
FillRect (hdc, &rcClient, GetSysColorBrush(COLOR_BTNFACE));
|
||||||
if (gcdrf != CDRF_DODEFAULT)
|
if (gcdrf != CDRF_DODEFAULT)
|
||||||
|
|