Commit 67607f9e authored by Dimitrie O. Paun's avatar Dimitrie O. Paun Committed by Alexandre Julliard

Complete unicodification of the tooltips common control.

parent e912c6a9
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* License along with this library; if not, write to the Free Software * License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* NOTES
*
* This code was audited for completeness against the documented features * This code was audited for completeness against the documented features
* of Comctl32.dll version 6.0 on Sep. 08, 2004, by Robert Shearman. * of Comctl32.dll version 6.0 on Sep. 08, 2004, by Robert Shearman.
* *
...@@ -214,7 +216,7 @@ TOOLTIPS_Refresh (HWND hwnd, HDC hdc) ...@@ -214,7 +216,7 @@ TOOLTIPS_Refresh (HWND hwnd, HDC hdc)
if (infoPtr->nMaxTipWidth > -1) if (infoPtr->nMaxTipWidth > -1)
uFlags |= DT_WORDBREAK; uFlags |= DT_WORDBREAK;
if (GetWindowLongA (hwnd, GWL_STYLE) & TTS_NOPREFIX) if (GetWindowLongW (hwnd, GWL_STYLE) & TTS_NOPREFIX)
uFlags |= DT_NOPREFIX; uFlags |= DT_NOPREFIX;
GetClientRect (hwnd, &rc); GetClientRect (hwnd, &rc);
...@@ -610,8 +612,8 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) ...@@ -610,8 +612,8 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr)
rect.top = rect.bottom - size.cy; rect.top = rect.bottom - size.cy;
} }
AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE), AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE),
FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE)); FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE));
if (style & TTS_BALLOON) if (style & TTS_BALLOON)
{ {
...@@ -782,8 +784,8 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr) ...@@ -782,8 +784,8 @@ TOOLTIPS_TrackShow (HWND hwnd, TOOLTIPS_INFO *infoPtr)
rect.right = rect.left + size.cx; rect.right = rect.left + size.cx;
rect.bottom = rect.top + size.cy; rect.bottom = rect.top + size.cy;
AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE), AdjustWindowRectEx (&rect, GetWindowLongW (hwnd, GWL_STYLE),
FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE)); FALSE, GetWindowLongW (hwnd, GWL_EXSTYLE));
if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON) if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON)
{ {
...@@ -945,7 +947,7 @@ TOOLTIPS_CheckTool (HWND hwnd, BOOL bShowTest) ...@@ -945,7 +947,7 @@ TOOLTIPS_CheckTool (HWND hwnd, BOOL bShowTest)
if (nTool == -1) if (nTool == -1)
return -1; return -1;
if (!(GetWindowLongA (hwnd, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) { if (!(GetWindowLongW (hwnd, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest) {
if (!TOOLTIPS_IsWindowActive (GetWindow (hwnd, GW_OWNER))) if (!TOOLTIPS_IsWindowActive (GetWindow (hwnd, GW_OWNER)))
return -1; return -1;
} }
...@@ -2395,8 +2397,8 @@ TOOLTIPS_MouseMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ...@@ -2395,8 +2397,8 @@ TOOLTIPS_MouseMessage (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static LRESULT static LRESULT
TOOLTIPS_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) TOOLTIPS_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
{ {
DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE); DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
DWORD dwExStyle = GetWindowLongA (hwnd, GWL_EXSTYLE); DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
dwStyle &= 0x0000FFFF; dwStyle &= 0x0000FFFF;
dwStyle |= (WS_POPUP | WS_BORDER | WS_CLIPSIBLINGS); dwStyle |= (WS_POPUP | WS_BORDER | WS_CLIPSIBLINGS);
...@@ -2405,10 +2407,10 @@ TOOLTIPS_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam) ...@@ -2405,10 +2407,10 @@ TOOLTIPS_NCCreate (HWND hwnd, WPARAM wParam, LPARAM lParam)
* window region, therefore it is useless to us in balloon mode */ * window region, therefore it is useless to us in balloon mode */
if (dwStyle & TTS_BALLOON) dwStyle &= ~WS_BORDER; if (dwStyle & TTS_BALLOON) dwStyle &= ~WS_BORDER;
SetWindowLongA (hwnd, GWL_STYLE, dwStyle); SetWindowLongW (hwnd, GWL_STYLE, dwStyle);
dwExStyle |= WS_EX_TOOLWINDOW; dwExStyle |= WS_EX_TOOLWINDOW;
SetWindowLongA (hwnd, GWL_EXSTYLE, dwExStyle); SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
return TRUE; return TRUE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment