Autosyncing with Wine HEAD

svn path=/trunk/; revision=29032
This commit is contained in:
Hervé Poussineau 2007-09-14 07:22:03 +00:00
parent 05315cb742
commit 96cdd6485c
15 changed files with 281 additions and 47 deletions

View file

@ -153,8 +153,6 @@ BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc);
#define COMCTL32_VERSION_MINOR 81
#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 4704, 1100
#define WINE_FILEVERSIONSTR "5.81"
/* Our internal stack structure of the window procedures to subclass */
typedef struct _SUBCLASSPROCS {

View file

@ -1,4 +1,4 @@
<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true">
<module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true" entrypoint="0">
<autoregister infsection="OleControlDlls" type="DllInstall" />
<importlibrary definition="comctl32.spec.def" />
<include base="comctl32">.</include>
@ -9,12 +9,6 @@
<define name="_WIN32_IE">0x600</define>
<define name="_WIN32_WINNT">0x501</define>
<define name="WINVER">0x501</define>
<metadata
description = "Common controls used by ReactOS"
version = "Autosync"
owner = "Wine" />
<library>wine</library>
<library>user32</library>
<library>gdi32</library>

View file

@ -1,3 +1,16 @@
Index: commctrl.c
===================================================================
--- commctrl.c (revision 23123)
+++ commctrl.c (working copy)
@@ -1620,7 +1620,7 @@
*
* Draw text with shadow.
*/
+int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *rect, DWORD dwFlags,
-int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, RECT *rect, DWORD dwFlags,
COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
{
FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
Index: listview.c
===================================================================
--- listview.c (revision 23123)
@ -102,7 +115,7 @@ Index: tooltips.c
===================================================================
--- tooltips.c (revision 25790)
+++ tooltips.c (working copy)
@@ -2437,7 +2437,34 @@
@@ -2471,7 +2471,34 @@
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
@ -141,7 +154,7 @@ Index: treeview.c
===================================================================
--- treeview.c (revision 27134)
+++ treeview.c (working copy)
@@ -2839,8 +2839,6 @@
@@ -2844,8 +2844,6 @@
}
}

View file

@ -31,7 +31,7 @@ BEGIN
PUSHBUTTON "Annuler", IDCANCEL,58,122,50,14
PUSHBUTTON "&Appliquer", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "Aide", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
CONTROL "Onglet", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
END

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL
LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE

View file

@ -1,6 +1,6 @@
/*
* Copyright 2003 Marcelo Duarte
* Copyright 2006 Américo José Melo
* Copyright 2006-2007 Américo José Melo
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -42,7 +42,7 @@ BEGIN
PUSHBUTTON "Cancelar", IDCANCEL,58,122,50,14
PUSHBUTTON "&Aplicar", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "Ajuda", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
CONTROL "Separador", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
END

View file

@ -22,7 +22,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
CAPTION "Ñâîéñòâà: %s"
CAPTION "Ñâîéñòâà äëÿ %s"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP

View file

@ -2,7 +2,6 @@
* comctl (Ukrainian resources)
*
* Copyright 2004 Ilya Korniyko
* 2007 Artem Reznikov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@ -27,7 +26,7 @@ CAPTION "
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK,4,122,50,14, WS_TABSTOP | WS_GROUP
PUSHBUTTON "&Ñêàñóâàòè", IDCANCEL,58,122,50,14
PUSHBUTTON "&<EFBFBD>³הל³םא", IDCANCEL,58,122,50,14
PUSHBUTTON "&Çàñòîñóâàòè", IDC_APPLY_BUTTON,112,122,50,14,WS_DISABLED
PUSHBUTTON "&Äîâ³äêà", IDHELP,166,122,50,14,WS_TABSTOP|WS_GROUP
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS|WS_GROUP|WS_TABSTOP|TCS_MULTILINE,4,4,212,114
@ -42,7 +41,7 @@ BEGIN
PUSHBUTTON "< &Íàçàä", IDC_BACK_BUTTON,71,138,50,14
DEFPUSHBUTTON "&Äàë³ >", IDC_NEXT_BUTTON,121,138,50,14
DEFPUSHBUTTON "&Çàâåðøèòè", IDC_FINISH_BUTTON,121,138,50,14
PUSHBUTTON "&Ñêàñóâàòè", IDCANCEL,178,138,50,14
PUSHBUTTON "&<EFBFBD>³הל³םא", IDCANCEL,178,138,50,14
PUSHBUTTON "&Äîâ³äêà", IDHELP,235,138,50,14,WS_GROUP
LTEXT "", IDC_SUNKEN_LINE,7,129,278,1,SS_SUNKEN
CONTROL "Tab", IDC_TABCONTROL,"SysTabControl32",WS_CLIPSIBLINGS | WS_DISABLED,7,7,258,5

View file

@ -71,6 +71,58 @@
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
#define NAME "microsoft.windows.common-controls"
#define FILE "comctl32.dll"
#define VERSION "6.0.0.0"
#define PUBLIC_KEY "6595b64144ccf1df"
#ifdef __i386__
#define ARCH "x86"
#elif defined __x86_64__
#define ARCH "amd64"
#else
#define ARCH "none"
#endif
static const char manifest[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n"
"<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\">\n"
" <assemblyIdentity type=\"win32\" name=\"" NAME "\" version=\"" VERSION "\" processorArchitecture=\"" ARCH "\" publicKeyToken=\"" PUBLIC_KEY "\"/>\n"
" <file name=\"" FILE "\">\n"
" <windowClass>Button</windowClass>\n"
" <windowClass>ButtonListBox</windowClass>\n"
" <windowClass>ComboBoxEx32</windowClass>\n"
" <windowClass>ComboLBox</windowClass>\n"
" <windowClass>Combobox</windowClass>\n"
" <windowClass>Edit</windowClass>\n"
" <windowClass>Listbox</windowClass>\n"
" <windowClass>NativeFontCtl</windowClass>\n"
" <windowClass>ReBarWindow32</windowClass>\n"
" <windowClass>ScrollBar</windowClass>\n"
" <windowClass>Static</windowClass>\n"
" <windowClass>SysAnimate32</windowClass>\n"
" <windowClass>SysDateTimePick32</windowClass>\n"
" <windowClass>SysHeader32</windowClass>\n"
" <windowClass>SysIPAddress32</windowClass>\n"
" <windowClass>SysLink</windowClass>\n"
" <windowClass>SysListView32</windowClass>\n"
" <windowClass>SysMonthCal32</windowClass>\n"
" <windowClass>SysPager</windowClass>\n"
" <windowClass>SysTabControl32</windowClass>\n"
" <windowClass>SysTreeView32</windowClass>\n"
" <windowClass>ToolbarWindow32</windowClass>\n"
" <windowClass>msctls_hotkey32</windowClass>\n"
" <windowClass>msctls_progress32</windowClass>\n"
" <windowClass>msctls_statusbar32</windowClass>\n"
" <windowClass>msctls_trackbar32</windowClass>\n"
" <windowClass>msctls_updown32</windowClass>\n"
" <windowClass>tooltips_class32</windowClass>\n"
" </file>\n"
"</assembly>\n";
static const char manifest_filename[] = ARCH "_" NAME "_" PUBLIC_KEY "_" VERSION "_none_deadbeef.manifest";
LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LPWSTR COMCTL32_wSubclass = NULL;
@ -91,6 +143,47 @@ static const WCHAR strCC32SubclassInfo[] = {
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
};
static BOOL create_manifest( BOOL install )
{
static const WCHAR winsxsW[] = {'\\','w','i','n','s','x','s',0};
static const WCHAR manifestsW[] = {'\\','m','a','n','i','f','e','s','t','s','\\',0};
DWORD len, written;
WCHAR *buffer;
HANDLE file;
BOOL ret = FALSE;
len = MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename), NULL, 0 );
len += GetWindowsDirectoryW( NULL, 0 );
len += lstrlenW(winsxsW);
len += lstrlenW(manifestsW);
if (!(buffer = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return FALSE;
GetWindowsDirectoryW( buffer, len );
lstrcatW( buffer, winsxsW );
CreateDirectoryW( buffer, NULL );
lstrcatW( buffer, manifestsW );
CreateDirectoryW( buffer, NULL );
MultiByteToWideChar( CP_UTF8, 0, manifest_filename, sizeof(manifest_filename),
buffer + lstrlenW(buffer), len );
if (install)
{
file = CreateFileW( buffer, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL );
if (file != INVALID_HANDLE_VALUE)
{
ret = (WriteFile( file, manifest, sizeof(manifest)-1, &written, NULL ) &&
written == sizeof(manifest)-1);
CloseHandle( file );
if (!ret) DeleteFileW( buffer );
else TRACE("created %s\n", debugstr_w(buffer));
}
}
else ret = DeleteFileW( buffer );
HeapFree( GetProcessHeap(), 0, buffer );
return ret;
}
/***********************************************************************
* DllMain [Internal]
*
@ -917,10 +1010,9 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
*/
HRESULT WINAPI DllInstall(BOOL bInstall, LPCWSTR cmdline)
{
FIXME("(%s, %s): stub\n", bInstall?"TRUE":"FALSE",
debugstr_w(cmdline));
return S_OK;
TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
if (!create_manifest( bInstall )) return HRESULT_FROM_WIN32(GetLastError());
return S_OK;
}
/***********************************************************************
@ -1528,12 +1620,10 @@ LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet)
*
* Draw text with shadow.
*/
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *pRect, DWORD dwFlags,
int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *rect, DWORD dwFlags,
COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
{
RECT rect = *pRect;
FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, pRect, dwFlags,
FIXME("(%p, %s, %d, %p, %d, 0x%08x, 0x%08x, %d, %d): stub\n", hdc, debugstr_w(pszText), cch, rect, dwFlags,
crText, crShadow, ixOffset, iyOffset);
return DrawTextW(hdc, pszText, cch, &rect, DT_LEFT);
return DrawTextW(hdc, pszText, cch, rect, DT_LEFT);
}

View file

@ -6658,7 +6658,16 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn,
ZeroMemory(&hdi, sizeof(HDITEMW));
column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW);
/*
* A mask not including LVCF_WIDTH turns into a mask of width, width 10
* (can be seen in SPY) otherwise column never gets added.
*/
if (!(lpColumn->mask & LVCF_WIDTH)) {
hdi.mask |= HDI_WIDTH;
hdi.cxy = 10;
}
/*
* when the iSubItem is available Windows copies it to the header lParam. It seems
* to happen only in LVM_INSERTCOLUMN - not in LVM_SETCOLUMN

View file

@ -27,6 +27,13 @@
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
#define WINE_FILEDESCRIPTION_STR "Wine Common Controls"
#define WINE_FILENAME_STR "comctl32.dll"
#define WINE_FILEVERSION COMCTL32_VERSION, COMCTL32_VERSION_MINOR, 4704, 1100
#define WINE_FILEVERSIONSTR "5.81"
#define WINE_PRODUCTVERSION WINE_FILEVERSION
#define WINE_PRODUCTVERSION_STR WINE_FILEVERSIONSTR
#include "wine/wine_common_ver.rc"
/* BINRES idt_check.bmp */

View file

@ -255,6 +255,7 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
else {
if (infoPtr->iSelected != iItem) {
infoPtr->iSelected=iItem;
infoPtr->uFocus=iItem;
TAB_EnsureSelectionVisible(infoPtr);
TAB_InvalidateTabArea(infoPtr);
}

View file

@ -44,7 +44,7 @@
* - TBN_GETOBJECT
* - TBN_SAVE
* - Button wrapping (under construction).
* - Fix TB_SETROWS.
* - Fix TB_SETROWS and Separators.
* - iListGap custom draw support.
*
* Testing:
@ -3637,10 +3637,7 @@ TOOLBAR_GetRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
if (infoPtr->dwStyle & TBSTYLE_WRAPABLE)
return infoPtr->nRows;
else
return 1;
return infoPtr->nRows;
}
@ -4947,20 +4944,107 @@ TOOLBAR_SetRows (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
LPRECT lprc = (LPRECT)lParam;
int rows = LOWORD(wParam);
BOOL bLarger = HIWORD(wParam);
TRACE("\n");
if (LOWORD(wParam) > 1) {
FIXME("multiple rows not supported!\n");
}
TRACE("Setting rows to %d (%d)\n", rows, bLarger);
if(infoPtr->nRows != LOWORD(wParam))
if(infoPtr->nRows != rows)
{
infoPtr->nRows = LOWORD(wParam);
TBUTTON_INFO *btnPtr = infoPtr->buttons;
int curColumn = 0; /* Current column */
int curRow = 0; /* Current row */
int hidden = 0; /* Number of hidden buttons */
int seps = 0; /* Number of separators */
int idealWrap = 0; /* Ideal wrap point */
int i;
BOOL wrap;
/*
Calculate new size and wrap points - Under windows, setrows will
change the dimensions if needed to show the number of requested
rows (if CCS_NORESIZE is set), or will take up the whole window
(if no CCS_NORESIZE).
Basic algorithum - If N buttons, and y rows requested, each row
contains N/y buttons.
FIXME: Handling of separators not obvious from testing results
FIXME: Take width of window into account?
*/
/* Loop through the buttons one by one counting key items */
for (i = 0; i < infoPtr->nNumButtons; i++ )
{
btnPtr[i].fsState &= ~TBSTATE_WRAP;
if (btnPtr[i].fsState & TBSTATE_HIDDEN)
hidden++;
else if (btnPtr[i].fsStyle & BTNS_SEP)
seps++;
}
/* FIXME: Separators make this quite complex */
if (seps) FIXME("Separators unhandled\n");
/* Round up so more per line, ie less rows */
idealWrap = (infoPtr->nNumButtons - hidden + (rows-1)) / rows;
/* Calculate ideal wrap point if we are allowed to grow, but cannot
achieve the requested number of rows. */
if (bLarger && idealWrap > 1)
{
int resRows = (infoPtr->nNumButtons + (idealWrap-1)) / idealWrap;
int moreRows = (infoPtr->nNumButtons + (idealWrap-2)) / (idealWrap-1);
if (resRows < rows && moreRows > rows)
{
idealWrap--;
TRACE("Changing idealWrap due to bLarger (now %d)\n", idealWrap);
}
}
curColumn = curRow = 0;
wrap = FALSE;
TRACE("Trying to wrap at %d (%d,%d,%d)\n", idealWrap,
infoPtr->nNumButtons, hidden, rows);
for (i = 0; i < infoPtr->nNumButtons; i++ )
{
if (btnPtr[i].fsState & TBSTATE_HIDDEN)
continue;
/* Step on, wrap if necessary or flag next to wrap */
if (!wrap) {
curColumn++;
} else {
wrap = FALSE;
curColumn = 1;
curRow++;
}
if (curColumn > (idealWrap-1)) {
wrap = TRUE;
btnPtr[i].fsState |= TBSTATE_WRAP;
}
}
TRACE("Result - %d rows\n", curRow + 1);
/* recalculate toolbar */
TOOLBAR_CalcToolbar (hwnd);
/* Resize if necessary (Only if NORESIZE is set - odd, but basically
if NORESIZE is NOT set, then the toolbar will always be resized to
take up the whole window. With it set, sizing needs to be manual. */
if (infoPtr->dwStyle & CCS_NORESIZE) {
SetWindowPos(hwnd, NULL, 0, 0,
infoPtr->rcBound.right - infoPtr->rcBound.left,
infoPtr->rcBound.bottom - infoPtr->rcBound.top,
SWP_NOMOVE);
}
/* repaint toolbar */
InvalidateRect(hwnd, NULL, TRUE);
}

View file

@ -314,7 +314,7 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOA));
ttnmdi.hdr.hwndFrom = hwnd;
ttnmdi.hdr.idFrom = toolPtr->uId;
ttnmdi.hdr.code = TTN_GETDISPINFOA;
ttnmdi.hdr.code = TTN_GETDISPINFOA; /* == TTN_NEEDTEXTA */
ttnmdi.lpszText = (LPSTR)&ttnmdi.szText;
ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam;
@ -332,7 +332,6 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
}
}
else if (ttnmdi.lpszText == 0) {
/* no text available */
infoPtr->szTipText[0] = '\0';
}
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
@ -347,6 +346,22 @@ static void TOOLTIPS_GetDispInfoA(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ERR("recursive text callback!\n");
infoPtr->szTipText[0] = '\0';
}
/* no text available - try calling parent instead as per native */
/* FIXME: Unsure if SETITEM should save the value or not */
if (infoPtr->szTipText[0] == 0x00) {
SendMessageW(GetParent(toolPtr->hwnd), WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
if (IS_INTRESOURCE(ttnmdi.lpszText)) {
LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
infoPtr->szTipText, INFOTIPSIZE);
} else if (ttnmdi.lpszText &&
ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
Str_GetPtrAtoW(ttnmdi.lpszText, infoPtr->szTipText, INFOTIPSIZE);
}
}
}
static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr)
@ -357,7 +372,7 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOW));
ttnmdi.hdr.hwndFrom = hwnd;
ttnmdi.hdr.idFrom = toolPtr->uId;
ttnmdi.hdr.code = TTN_GETDISPINFOW;
ttnmdi.hdr.code = TTN_GETDISPINFOW; /* == TTN_NEEDTEXTW */
ttnmdi.lpszText = (LPWSTR)&ttnmdi.szText;
ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam;
@ -375,7 +390,6 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
}
}
else if (ttnmdi.lpszText == 0) {
/* no text available */
infoPtr->szTipText[0] = '\0';
}
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
@ -390,6 +404,23 @@ static void TOOLTIPS_GetDispInfoW(HWND hwnd, TOOLTIPS_INFO *infoPtr, TTTOOL_INFO
ERR("recursive text callback!\n");
infoPtr->szTipText[0] = '\0';
}
/* no text available - try calling parent instead as per native */
/* FIXME: Unsure if SETITEM should save the value or not */
if (infoPtr->szTipText[0] == 0x00) {
SendMessageW(GetParent(toolPtr->hwnd), WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
if (IS_INTRESOURCE(ttnmdi.lpszText)) {
LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
infoPtr->szTipText, INFOTIPSIZE);
} else if (ttnmdi.lpszText &&
ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
Str_GetPtrW(ttnmdi.lpszText, infoPtr->szTipText, INFOTIPSIZE);
}
}
}
static void
@ -538,15 +569,18 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
if (style & TTS_BALLOON)
{
ptfx = rc.left + ((rc.right - rc.left) / 2);
if(rect.top - size.cy >= 0)
/* CENTERTIP ballon tooltips default to below the field
if they fit on the screen */
if(rc.bottom + size.cy > GetSystemMetrics(SM_CYSCREEN))
{
rect.top -= size.cy;
rect.top = rc.top - size.cy;
infoPtr->bToolBelow = FALSE;
}
else
{
infoPtr->bToolBelow = TRUE;
rect.top += 20;
rect.top = rc.bottom;
}
rect.left = max(0, rect.left - BALLOON_STEMINDENT);
}

View file

@ -946,6 +946,8 @@ TREEVIEW_RecalculateVisibleOrder(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *start)
for (item = start; item != NULL;
item = TREEVIEW_GetNextListItem(infoPtr, item))
{
if (!ISVISIBLE(item) && order > 0)
TREEVIEW_ComputeItemInternalMetrics(infoPtr, item);
item->visibleOrder = order;
order += item->iIntegral;
}
@ -2031,7 +2033,10 @@ TREEVIEW_GetItemRect(const TREEVIEW_INFO *infoPtr, BOOL fTextRect, LPRECT lpRect
lpRect->bottom = wineItem->rect.bottom;
lpRect->left = wineItem->textOffset;
lpRect->right = wineItem->textOffset + wineItem->textWidth;
if (!wineItem->textWidth)
TREEVIEW_ComputeTextWidth(infoPtr, wineItem, 0);
lpRect->right = wineItem->textOffset + wineItem->textWidth + 4;
}
else
{