Author: winesync
Date: Fri Jul 27 13:21:42 2007
New Revision: 27901
URL:
http://svn.reactos.org/svn/reactos?rev=27901&view=rev
Log:
Autosyncing with Wine HEAD
Modified:
trunk/reactos/dll/win32/comctl32/animate.c
trunk/reactos/dll/win32/comctl32/comboex.c
trunk/reactos/dll/win32/comctl32/comctl32.h
trunk/reactos/dll/win32/comctl32/comctl32.spec
trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
trunk/reactos/dll/win32/comctl32/comctl32undoc.c
trunk/reactos/dll/win32/comctl32/comctl_En.rc
trunk/reactos/dll/win32/comctl32/comctl_Ko.rc
trunk/reactos/dll/win32/comctl32/comctl_Sv.rc
trunk/reactos/dll/win32/comctl32/commctrl.c
trunk/reactos/dll/win32/comctl32/datetime.c
trunk/reactos/dll/win32/comctl32/flatsb.c
trunk/reactos/dll/win32/comctl32/header.c
trunk/reactos/dll/win32/comctl32/hotkey.c
trunk/reactos/dll/win32/comctl32/imagelist.c
trunk/reactos/dll/win32/comctl32/ipaddress.c
trunk/reactos/dll/win32/comctl32/listview.c
trunk/reactos/dll/win32/comctl32/monthcal.c
trunk/reactos/dll/win32/comctl32/nativefont.c
trunk/reactos/dll/win32/comctl32/pager.c
trunk/reactos/dll/win32/comctl32/progress.c
trunk/reactos/dll/win32/comctl32/propsheet.c
trunk/reactos/dll/win32/comctl32/rebar.c
trunk/reactos/dll/win32/comctl32/status.c
trunk/reactos/dll/win32/comctl32/string.c
trunk/reactos/dll/win32/comctl32/syslink.c
trunk/reactos/dll/win32/comctl32/tab.c
trunk/reactos/dll/win32/comctl32/theming.c
trunk/reactos/dll/win32/comctl32/toolbar.c
trunk/reactos/dll/win32/comctl32/tooltips.c
trunk/reactos/dll/win32/comctl32/trackbar.c
trunk/reactos/dll/win32/comctl32/treeview.c
trunk/reactos/dll/win32/comctl32/updown.c
Modified: trunk/reactos/dll/win32/comctl32/animate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/animate…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/animate.c (original)
+++ trunk/reactos/dll/win32/comctl32/animate.c Fri Jul 27 13:21:42 2007
@@ -845,7 +845,7 @@
static LRESULT ANIMATE_StyleChanged(ANIMATE_INFO *infoPtr, WPARAM wStyleType, const
STYLESTRUCT *lpss)
{
- TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
+ TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
wStyleType, lpss->styleOld, lpss->styleNew);
if (wStyleType != GWL_STYLE) return 0;
@@ -861,7 +861,7 @@
{
ANIMATE_INFO *infoPtr = (ANIMATE_INFO *)GetWindowLongPtrW(hWnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hWnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hWnd, uMsg, wParam,
lParam);
if (!infoPtr && (uMsg != WM_NCCREATE))
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
switch (uMsg)
@@ -945,7 +945,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/comboex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comboex…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comboex.c (original)
+++ trunk/reactos/dll/win32/comctl32/comboex.c Fri Jul 27 13:21:42 2007
@@ -1720,7 +1720,7 @@
RECT rect;
LRESULT lret;
- TRACE("hwnd=%p msg=%x wparam=%x lParam=%lx, info_ptr=%p\n",
+ TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n",
hwnd, uMsg, wParam, lParam, infoPtr);
if (!infoPtr) return 0;
@@ -1921,7 +1921,7 @@
POINT pt;
WCHAR edit_text[260];
- TRACE("hwnd=%p msg=%x wparam=%x lParam=%lx, info_ptr=%p\n",
+ TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx, info_ptr=%p\n",
hwnd, uMsg, wParam, lParam, infoPtr);
if (!infoPtr) return 0;
@@ -2159,7 +2159,7 @@
{
COMBOEX_INFO *infoPtr = COMBOEX_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%x lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
if (!infoPtr) {
if (uMsg == WM_CREATE)
@@ -2307,7 +2307,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",uMsg,wParam,lParam);
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",uMsg,wParam,lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
}
Modified: trunk/reactos/dll/win32/comctl32/comctl32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32.h (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32.h Fri Jul 27 13:21:42 2007
@@ -148,6 +148,7 @@
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL
bHorizontal);
void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight,
COLORREF crBackground);
INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
+INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen);
BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc);
Modified: trunk/reactos/dll/win32/comctl32/comctl32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32.spec (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32.spec Fri Jul 27 13:21:42 2007
@@ -125,6 +125,7 @@
@ stdcall DestroyPropertySheetPage(long)
@ stdcall -private DllGetVersion(ptr)
@ stdcall -private DllInstall(long wstr)
+@ stdcall DrawShadowText(long wstr long ptr long long long long long)
@ stdcall DrawStatusText(long ptr ptr long) DrawStatusTextA
@ stdcall DrawStatusTextW(long ptr wstr long)
@ stdcall FlatSB_EnableScrollBar (long long long)
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Fri Jul 27 13:21:42 2007
@@ -2,7 +2,7 @@
===================================================================
--- listview.c (revision 23123)
+++ listview.c (working copy)
-@@ -3805,9 +3805,8 @@
+@@ -3810,9 +3810,8 @@
if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
{
TRACE("iImage=%d\n", lvItem.iImage);
@@ -18,7 +18,7 @@
===================================================================
--- propsheet.c (revision 25766)
+++ propsheet.c (working copy)
-@@ -2434,6 +2434,28 @@
+@@ -2431,6 +2431,28 @@
return FALSE;
}
@@ -47,7 +47,7 @@
/******************************************************************************
* PROPSHEET_SetWizButtons
*
-@@ -2456,17 +2478,6 @@
+@@ -2453,17 +2475,6 @@
EnableWindow(hwndNext, FALSE);
EnableWindow(hwndFinish, FALSE);
@@ -65,7 +65,7 @@
if (dwFlags & PSWIZB_BACK)
EnableWindow(hwndBack, TRUE);
-@@ -2496,6 +2507,32 @@
+@@ -2493,6 +2504,32 @@
}
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
EnableWindow(hwndFinish, TRUE);
@@ -102,10 +102,10 @@
===================================================================
--- tooltips.c (revision 25790)
+++ tooltips.c (working copy)
-@@ -2446,7 +2446,34 @@
+@@ -2437,7 +2437,34 @@
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
+ FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
+ TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
+ TTTOOL_INFO *toolPtr = infoPtr->tools;
+ INT nResult;
Modified: trunk/reactos/dll/win32/comctl32/comctl32undoc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32undoc.c (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32undoc.c Fri Jul 27 13:21:42 2007
@@ -922,6 +922,47 @@
return len;
}
+/**************************************************************************
+ * Str_GetPtrAtoW [internal]
+ *
+ * Converts a multibyte string into a unicode string
+ *
+ * PARAMS
+ * lpSrc [I] Pointer to the multibyte source string
+ * lpDest [O] Pointer to caller supplied storage for the unicode string
+ * nMaxLen [I] Size, in characters, of the destination buffer
+ *
+ * RETURNS
+ * Length, in characters, of the converted string.
+ */
+
+INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen)
+{
+ INT len;
+
+ TRACE("(%s %p %d)\n", debugstr_a(lpSrc), lpDest, nMaxLen);
+
+ if (!lpDest && lpSrc)
+ return MultiByteToWideChar(CP_ACP, 0, lpSrc, -1, 0, 0);
+
+ if (nMaxLen == 0)
+ return 0;
+
+ if (lpSrc == NULL) {
+ lpDest[0] = '\0';
+ return 0;
+ }
+
+ len = MultiByteToWideChar(CP_ACP, 0, lpSrc, -1, 0, 0);
+ if (len >= nMaxLen)
+ len = nMaxLen - 1;
+
+ MultiByteToWideChar(CP_ACP, 0, lpSrc, -1, lpDest, len);
+ lpDest[len] = '\0';
+
+ return len;
+}
+
/**************************************************************************
* Str_SetPtrAtoW [internal]
Modified: trunk/reactos/dll/win32/comctl32/comctl_En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl_En.rc (original)
+++ trunk/reactos/dll/win32/comctl32/comctl_En.rc Fri Jul 27 13:21:42 2007
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
Modified: trunk/reactos/dll/win32/comctl32/comctl_Ko.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl_Ko.rc (original)
+++ trunk/reactos/dll/win32/comctl32/comctl_Ko.rc Fri Jul 27 13:21:42 2007
@@ -17,7 +17,7 @@
* 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
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
Modified: trunk/reactos/dll/win32/comctl32/comctl_Sv.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl_…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl_Sv.rc (original)
+++ trunk/reactos/dll/win32/comctl32/comctl_Sv.rc Fri Jul 27 13:21:42 2007
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
+LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT
IDD_PROPSHEET DIALOG DISCARDABLE 0, 0, 220, 140
STYLE DS_CONTEXTHELP | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE
Modified: trunk/reactos/dll/win32/comctl32/commctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/commctr…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/commctrl.c (original)
+++ trunk/reactos/dll/win32/comctl32/commctrl.c Fri Jul 27 13:21:42 2007
@@ -239,7 +239,7 @@
switch (uMsg) {
case WM_MENUSELECT:
- TRACE("WM_MENUSELECT wParam=0x%X lParam=0x%lX\n",
+ TRACE("WM_MENUSELECT wParam=0x%lX lParam=0x%lX\n",
wParam, lParam);
if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
@@ -269,7 +269,7 @@
break;
case WM_COMMAND :
- TRACE("WM_COMMAND wParam=0x%X lParam=0x%lX\n",
+ TRACE("WM_COMMAND wParam=0x%lX lParam=0x%lX\n",
wParam, lParam);
/* WM_COMMAND is not invalid since it is documented
* in the windows api reference. So don't output
@@ -320,7 +320,7 @@
{
LPINT lpMenuId;
- TRACE("%p, %x, %p\n", hwnd, uFlags, lpInfo);
+ TRACE("%p, %lx, %p\n", hwnd, uFlags, lpInfo);
if (lpInfo == NULL)
return FALSE;
@@ -442,10 +442,10 @@
if (text) {
int oldbkmode = SetBkMode (hdc, TRANSPARENT);
UINT align = DT_LEFT;
- if (*text == L'\t') {
+ if (*text == '\t') {
text++;
align = DT_CENTER;
- if (*text == L'\t') {
+ if (*text == '\t') {
text++;
align = DT_RIGHT;
}
@@ -704,7 +704,7 @@
/* add bitmaps */
- if (nBitmaps > 0)
+ if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
{
tbab.hInst = hBMInst;
tbab.nID = wBMID;
@@ -1008,7 +1008,7 @@
LPSUBCLASS_INFO stack;
LPSUBCLASSPROCS proc;
- TRACE ("(%p, %p, %x, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
+ TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
/* Since the window procedure that we set here has two additional arguments,
* we can't simply set it as the new window procedure of the window. So we
@@ -1092,7 +1092,7 @@
const SUBCLASS_INFO *stack;
const SUBCLASSPROCS *proc;
- TRACE ("(%p, %p, %x, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
+ TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
/* See if we have been called for this window */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1135,7 +1135,7 @@
LPSUBCLASSPROCS proc;
BOOL ret = FALSE;
- TRACE ("(%p, %p, %x)\n", hWnd, pfnSubclass, uID);
+ TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
/* Find the Subclass to remove */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1189,7 +1189,7 @@
LPSUBCLASSPROCS proc;
LRESULT ret;
- TRACE ("(%p, 0x%08x, 0x%08x, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
+ TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass);
if (!stack) {
@@ -1239,7 +1239,7 @@
LPSUBCLASS_INFO stack;
LRESULT ret;
- TRACE ("(%p, 0x%08x, 0x%08x, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
+ TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
/* retrieve our little stack from the Properties */
stack = (LPSUBCLASS_INFO)GetPropW (hWnd, COMCTL32_wSubclass);
@@ -1401,15 +1401,15 @@
/***********************************************************************
* COMCTL32_EnsureBitmapSize [internal]
*
- * If needed enlarge the bitmap so that the width is at least cxMinWidth
- * the height is at least cyMinHeight. If the bitmap already have these
+ * If needed, enlarge the bitmap so that the width is at least cxMinWidth and
+ * the height is at least cyMinHeight. If the bitmap already has these
* dimensions nothing changes.
*
* PARAMS
* hBitmap [I/O] Bitmap to modify. The handle may change
- * cxMinWidth [I] If the width of the bitmap is smaller then it will
+ * cxMinWidth [I] If the width of the bitmap is smaller, then it will
* be enlarged to this value
- * cyMinHeight [I] If the height of the bitmap is smaller then it will
+ * cyMinHeight [I] If the height of the bitmap is smaller, then it will
* be enlarged to this value
* cyBackground [I] The color with which the new area will be filled
*
@@ -1522,3 +1522,18 @@
return SendMessageW(hwnd, EM_SETWORDBREAKPROC, 0,
(LPARAM)(bSet ? PathWordBreakProc : NULL));
}
+
+/***********************************************************************
+ * DrawShadowText [COMCTL32.@]
+ *
+ * Draw text with shadow.
+ */
+int WINAPI DrawShadowText(HDC hdc, LPCWSTR pszText, UINT cch, const RECT *pRect, 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,
+ crText, crShadow,
ixOffset, iyOffset);
+ return DrawTextW(hdc, pszText, cch, &rect, DT_LEFT);
+}
Modified: trunk/reactos/dll/win32/comctl32/datetime.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/datetim…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/datetime.c (original)
+++ trunk/reactos/dll/win32/comctl32/datetime.c Fri Jul 27 13:21:42 2007
@@ -811,6 +811,9 @@
infoPtr->dwStyle &= ~WS_DISABLED;
else
infoPtr->dwStyle |= WS_DISABLED;
+
+ InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+
return 0;
}
@@ -1146,7 +1149,7 @@
{
static const WCHAR buttonW[] = { 'b', 'u', 't', 't',
'o', 'n', 0 };
- TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
+ TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
wStyleType, lpss->styleOld, lpss->styleNew);
if (wStyleType != GWL_STYLE) return 0;
@@ -1245,7 +1248,7 @@
DATETIME_INFO *infoPtr = ((DATETIME_INFO *)GetWindowLongPtrW (hwnd, 0));
LRESULT ret;
- TRACE ("%x, %x, %lx\n", uMsg, wParam, lParam);
+ TRACE ("%x, %lx, %lx\n", uMsg, wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE) && (uMsg != WM_NCCREATE))
return DefWindowProcW( hwnd, uMsg, wParam, lParam );
@@ -1346,7 +1349,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/flatsb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/flatsb.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/flatsb.c (original)
+++ trunk/reactos/dll/win32/comctl32/flatsb.c Fri Jul 27 13:21:42 2007
@@ -229,7 +229,7 @@
static LRESULT
FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- TRACE("[%p] wParam=%04x lParam=%08lx\n", hwnd, wParam, lParam);
+ TRACE("[%p] wParam=%04lx lParam=%08lx\n", hwnd, wParam, lParam);
return 0;
}
@@ -237,7 +237,7 @@
static LRESULT
FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- TRACE("[%p] wParam=%04x lParam=%08lx\n", hwnd, wParam, lParam);
+ TRACE("[%p] wParam=%04lx lParam=%08lx\n", hwnd, wParam, lParam);
return 0;
}
@@ -258,7 +258,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/header.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/header.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/header.c (original)
+++ trunk/reactos/dll/win32/comctl32/header.c Fri Jul 27 13:21:42 2007
@@ -1997,7 +1997,7 @@
static LRESULT WINAPI
HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p msg=%x wparam=%x lParam=%lx\n", hwnd, msg, wParam, lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, msg, wParam,
lParam);
if (!HEADER_GetInfoPtr (hwnd) && (msg != WM_CREATE))
return DefWindowProcW (hwnd, msg, wParam, lParam);
switch (msg) {
@@ -2127,7 +2127,7 @@
default:
if ((msg >= WM_USER) && (msg < WM_APP))
- ERR("unknown msg %04x wp=%04x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
msg, wParam, lParam );
return DefWindowProcW(hwnd, msg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/hotkey.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/hotkey.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/hotkey.c (original)
+++ trunk/reactos/dll/win32/comctl32/hotkey.c Fri Jul 27 13:21:42 2007
@@ -466,7 +466,7 @@
HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
HOTKEY_INFO *infoPtr = (HOTKEY_INFO *)GetWindowLongPtrW (hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam,
lParam);
if (!infoPtr && (uMsg != WM_NCCREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
switch (uMsg)
@@ -529,7 +529,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/imagelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/imageli…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/imagelist.c (original)
+++ trunk/reactos/dll/win32/comctl32/imagelist.c Fri Jul 27 13:21:42 2007
@@ -1192,8 +1192,13 @@
hOldBrush = SelectObject (hImageDC, CreateSolidBrush (colour));
PatBlt( hImageDC, 0, 0, cx, cy, PATCOPY );
- BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND );
- BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT );
+ if (himl->hbmMask)
+ {
+ BitBlt( hImageDC, 0, 0, cx, cy, hMaskListDC, pt.x, pt.y, SRCAND );
+ BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCPAINT );
+ }
+ else
+ BitBlt( hImageDC, 0, 0, cx, cy, hImageListDC, pt.x, pt.y, SRCCOPY);
DeleteObject (SelectObject (hImageDC, hOldBrush));
}
@@ -2558,7 +2563,7 @@
ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
{
HDC hdcBitmap;
- HBITMAP hbmNewBitmap;
+ HBITMAP hbmNewBitmap, hbmOld;
INT nNewCount, nCopyCount;
TRACE("%p %d\n",himl,iImageCount);
@@ -2583,8 +2588,9 @@
if (hbmNewBitmap != 0)
{
- SelectObject (hdcBitmap, hbmNewBitmap);
+ hbmOld = SelectObject (hdcBitmap, hbmNewBitmap);
imagelist_copy_images( himl, himl->hdcImage, hdcBitmap, 0, nCopyCount, 0 );
+ SelectObject (hdcBitmap, hbmOld);
/* FIXME: delete 'empty' image space? */
@@ -2602,8 +2608,9 @@
hbmNewBitmap = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL);
if (hbmNewBitmap != 0)
{
- SelectObject (hdcBitmap, hbmNewBitmap);
+ hbmOld = SelectObject (hdcBitmap, hbmNewBitmap);
imagelist_copy_images( himl, himl->hdcMask, hdcBitmap, 0, nCopyCount, 0
);
+ SelectObject (hdcBitmap, hbmOld);
/* FIXME: delete 'empty' image space? */
Modified: trunk/reactos/dll/win32/comctl32/ipaddress.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/ipaddre…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/ipaddress.c (original)
+++ trunk/reactos/dll/win32/comctl32/ipaddress.c Fri Jul 27 13:21:42 2007
@@ -452,7 +452,7 @@
INT index, len = 0, startsel, endsel;
IPPART_INFO *part;
- TRACE("(hwnd=%p msg=0x%x wparam=0x%x lparam=0x%lx)\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam,
lParam);
if ( (index = IPADDRESS_GetPartIndex(infoPtr, hwnd)) < 0) return 0;
part = &infoPtr->Part[index];
@@ -531,7 +531,7 @@
{
IPADDRESS_INFO *infoPtr = (IPADDRESS_INFO *)GetWindowLongPtrW (hwnd, 0);
- TRACE("(hwnd=%p msg=0x%x wparam=0x%x lparam=0x%lx)\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("(hwnd=%p msg=0x%x wparam=0x%lx lparam=0x%lx)\n", hwnd, uMsg, wParam,
lParam);
if (!infoPtr && (uMsg != WM_CREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -546,7 +546,6 @@
case WM_ENABLE:
return IPADDRESS_Enable (infoPtr, (BOOL)wParam);
- break;
case WM_PAINT:
return IPADDRESS_Paint (infoPtr, (HDC)wParam);
@@ -584,7 +583,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
return 0;
Modified: trunk/reactos/dll/win32/comctl32/listview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/listvie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/listview.c (original)
+++ trunk/reactos/dll/win32/comctl32/listview.c Fri Jul 27 13:21:42 2007
@@ -1771,6 +1771,9 @@
DRAWITEMSTRUCT dis;
LVITEMW item;
+ HFONT hFont = infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont;
+ HFONT hOldFont = SelectObject(hdc, hFont);
+
item.iItem = infoPtr->nFocusedItem;
item.iSubItem = 0;
item.mask = LVIF_PARAM;
@@ -1788,6 +1791,8 @@
dis.itemData = item.lParam;
SendMessageW(infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
+
+ SelectObject(hdc, hOldFont);
}
else
{
@@ -3263,7 +3268,7 @@
* over the item for a certain period of time.
*
*/
-static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKyes, INT x, INT y)
+static LRESULT LISTVIEW_MouseHover(LISTVIEW_INFO *infoPtr, WORD fwKeys, INT x, INT y)
{
if (infoPtr->dwLvExStyle & LVS_EX_TRACKSELECT)
{
@@ -5146,7 +5151,7 @@
static INT LISTVIEW_GetColumnWidth(const LISTVIEW_INFO *infoPtr, INT nColumn)
{
INT nColumnWidth = 0;
- RECT rcHeader;
+ HDITEMW hdItem;
TRACE("nColumn=%d\n", nColumn);
@@ -5157,9 +5162,19 @@
nColumnWidth = infoPtr->nItemWidth;
break;
case LVS_REPORT:
- if (nColumn < 0 || nColumn >= DPA_GetPtrCount(infoPtr->hdpaColumns)) return 0;
- LISTVIEW_GetHeaderRect(infoPtr, nColumn, &rcHeader);
- nColumnWidth = rcHeader.right - rcHeader.left;
+ /* We are not using LISTVIEW_GetHeaderRect as this data is updated only after a
HDM_ITEMCHANGED.
+ * There is an application that subclasses the listview, calls LVM_GETCOLUMNWIDTH in
the
+ * HDM_ITEMCHANGED handler and goes into infinite recursion if it receives old data.
+ *
+ * TODO: should we do the same in LVM_GETCOLUMN?
+ */
+ hdItem.mask = HDI_WIDTH;
+ if (!SendMessageW(infoPtr->hwndHeader, HDM_GETITEMW, nColumn, (LPARAM)&hdItem))
+ {
+ WARN("(%p): HDM_GETITEMW failed for item %d\n", infoPtr->hwndSelf,
nColumn);
+ return 0;
+ }
+ nColumnWidth = hdItem.cxy;
break;
}
@@ -9260,7 +9275,7 @@
UINT uNewView = lpss->styleNew & LVS_TYPEMASK;
UINT uOldView = lpss->styleOld & LVS_TYPEMASK;
- TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
+ TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
wStyleType, lpss->styleOld, lpss->styleNew);
if (wStyleType != GWL_STYLE) return 0;
@@ -9346,7 +9361,7 @@
{
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(hwnd, 0);
- TRACE("(uMsg=%x wParam=%x lParam=%lx)\n", uMsg, wParam, lParam);
+ TRACE("(uMsg=%x wParam=%lx lParam=%lx)\n", uMsg, wParam, lParam);
if (!infoPtr && (uMsg != WM_NCCREATE))
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
@@ -9850,7 +9865,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
fwd_msg:
/* call default window procedure */
@@ -9990,7 +10005,7 @@
LISTVIEW_INFO *infoPtr = (LISTVIEW_INFO *)GetWindowLongPtrW(GetParent(hwnd), 0);
BOOL cancel = FALSE;
- TRACE("(hwnd=%p, uMsg=%x, wParam=%x, lParam=%lx, isW=%d)\n",
+ TRACE("(hwnd=%p, uMsg=%x, wParam=%lx, lParam=%lx, isW=%d)\n",
hwnd, uMsg, wParam, lParam, isW);
switch (uMsg)
Modified: trunk/reactos/dll/win32/comctl32/monthcal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/monthcal.c (original)
+++ trunk/reactos/dll/win32/comctl32/monthcal.c Fri Jul 27 13:21:42 2007
@@ -825,7 +825,7 @@
{
int prev = -1;
- TRACE("%d: color %08lx\n", wParam, lParam);
+ TRACE("%ld: color %08lx\n", wParam, lParam);
switch((int)wParam) {
case MCSC_BACKGROUND:
@@ -876,7 +876,7 @@
{
int prev = infoPtr->delta;
- TRACE("delta %d\n", wParam);
+ TRACE("delta %ld\n", wParam);
infoPtr->delta = (int)wParam;
return prev;
@@ -950,7 +950,7 @@
SYSTEMTIME *lprgSysTimeArray=(SYSTEMTIME *)lParam;
FILETIME ft_min, ft_max;
- TRACE("%x %lx\n", wParam, lParam);
+ TRACE("%lx %lx\n", wParam, lParam);
if ((wParam & GDTR_MIN && !MONTHCAL_ValidateTime(lprgSysTimeArray[0]))
||
(wParam & GDTR_MAX && !MONTHCAL_ValidateTime(lprgSysTimeArray[1])))
@@ -1019,7 +1019,7 @@
int i, iMonths = (int)wParam;
MONTHDAYSTATE *dayStates = (LPMONTHDAYSTATE)lParam;
- TRACE("%x %lx\n", wParam, lParam);
+ TRACE("%lx %lx\n", wParam, lParam);
if(iMonths!=infoPtr->monthRange) return 0;
for(i=0; i<iMonths; i++)
@@ -1076,7 +1076,7 @@
static LRESULT
MONTHCAL_SetMaxSelCount(MONTHCAL_INFO *infoPtr, WPARAM wParam)
{
- TRACE("%x\n", wParam);
+ TRACE("%lx\n", wParam);
if(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & MCS_MULTISELECT) {
infoPtr->maxSelCount = wParam;
@@ -1585,7 +1585,7 @@
{
BOOL redraw = FALSE;
- TRACE("%d\n", wParam);
+ TRACE("%ld\n", wParam);
switch(wParam) {
case MC_NEXTMONTHTIMER:
@@ -1941,7 +1941,7 @@
{
MONTHCAL_INFO *infoPtr;
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, uMsg, wParam, lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam, lParam);
infoPtr = MONTHCAL_GetInfoPtr(hwnd);
if (!infoPtr && (uMsg != WM_CREATE))
@@ -2059,7 +2059,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR( "unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ ERR( "unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
}
}
Modified: trunk/reactos/dll/win32/comctl32/nativefont.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/nativef…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/nativefont.c (original)
+++ trunk/reactos/dll/win32/comctl32/nativefont.c Fri Jul 27 13:21:42 2007
@@ -76,7 +76,7 @@
{
NATIVEFONT_INFO *infoPtr = NATIVEFONT_GetInfoPtr(hwnd);
- TRACE("hwnd=%p msg=%04x wparam=%08x lparam=%08lx\n",
+ TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n",
hwnd, uMsg, wParam, lParam);
if (!infoPtr && (uMsg != WM_CREATE))
@@ -102,7 +102,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/pager.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/pager.c…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/pager.c (original)
+++ trunk/reactos/dll/win32/comctl32/pager.c Fri Jul 27 13:21:42 2007
@@ -1241,7 +1241,7 @@
{
DWORD oldStyle = infoPtr->dwStyle;
- TRACE("(styletype=%x, styleOld=0x%08x, styleNew=0x%08x)\n",
+ TRACE("(styletype=%lx, styleOld=0x%08x, styleNew=0x%08x)\n",
wStyleType, lpss->styleOld, lpss->styleNew);
if (wStyleType != GWL_STYLE) return 0;
Modified: trunk/reactos/dll/win32/comctl32/progress.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/progres…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/progress.c (original)
+++ trunk/reactos/dll/win32/comctl32/progress.c Fri Jul 27 13:21:42 2007
@@ -545,7 +545,7 @@
static const WCHAR themeClass[] =
{'P','r','o','g','r','e','s','s',0};
HTHEME theme;
- TRACE("hwnd=%p msg=%04x wparam=%x lParam=%lx\n", hwnd, message, wParam,
lParam);
+ TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam,
lParam);
infoPtr = (PROGRESS_INFO *)GetWindowLongPtrW(hwnd, 0);
@@ -723,7 +723,7 @@
default:
if ((message >= WM_USER) && (message < WM_APP))
- ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam );
+ ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam );
return DefWindowProcW( hwnd, message, wParam, lParam );
}
}
Modified: trunk/reactos/dll/win32/comctl32/propsheet.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/propshe…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/propsheet.c (original)
+++ trunk/reactos/dll/win32/comctl32/propsheet.c Fri Jul 27 13:21:42 2007
@@ -120,6 +120,7 @@
BOOL hasHelp;
BOOL hasApply;
BOOL hasFinish;
+ BOOL usePropPage;
BOOL useCallback;
BOOL activeValid;
PropPageInfo* proppage;
@@ -286,29 +287,45 @@
}
/******************************************************************************
- * PROPSHEET_CollectSheetInfoA
- *
- * Collect relevant data.
- */
-static BOOL PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
- PropSheetInfo * psInfo)
-{
- DWORD dwSize = min(lppsh->dwSize,sizeof(PROPSHEETHEADERA));
- DWORD dwFlags = lppsh->dwFlags;
+ * PROPSHEET_CollectSheetInfoCommon
+ *
+ * Common code for PROPSHEET_CollectSheetInfoA/W
+ */
+static void PROPSHEET_CollectSheetInfoCommon(PropSheetInfo * psInfo, DWORD dwFlags)
+{
+ PROPSHEET_UnImplementedFlags(dwFlags);
psInfo->hasHelp = dwFlags & PSH_HASHELP;
psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW);
psInfo->hasFinish = dwFlags & PSH_WIZARDHASFINISH;
+ psInfo->isModeless = dwFlags & PSH_MODELESS;
+ psInfo->usePropPage = dwFlags & PSH_PROPSHEETPAGE;
+ if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
+ psInfo->active_page = 0;
+
+ psInfo->result = 0;
+ psInfo->hImageList = 0;
+ psInfo->activeValid = FALSE;
+}
+
+/******************************************************************************
+ * PROPSHEET_CollectSheetInfoA
+ *
+ * Collect relevant data.
+ */
+static void PROPSHEET_CollectSheetInfoA(LPCPROPSHEETHEADERA lppsh,
+ PropSheetInfo * psInfo)
+{
+ DWORD dwSize = min(lppsh->dwSize,sizeof(PROPSHEETHEADERA));
+ DWORD dwFlags = lppsh->dwFlags;
+
psInfo->useCallback = (dwFlags & PSH_USECALLBACK )&&
(lppsh->pfnCallback);
- psInfo->isModeless = dwFlags & PSH_MODELESS;
memcpy(&psInfo->ppshheader,lppsh,dwSize);
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_a(lppsh->pszCaption), lppsh->nPages, lppsh->pfnCallback);
- PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
-
if (lppsh->dwFlags & INTRNL_ANY_WIZARD)
psInfo->ppshheader.pszCaption = NULL;
else
@@ -332,14 +349,7 @@
else
psInfo->active_page = lppsh->u2.nStartPage;
- if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
- psInfo->active_page = 0;
-
- psInfo->result = 0;
- psInfo->hImageList = 0;
- psInfo->activeValid = FALSE;
-
- return TRUE;
+ PROPSHEET_CollectSheetInfoCommon(psInfo, dwFlags);
}
/******************************************************************************
@@ -347,23 +357,17 @@
*
* Collect relevant data.
*/
-static BOOL PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
+static void PROPSHEET_CollectSheetInfoW(LPCPROPSHEETHEADERW lppsh,
PropSheetInfo * psInfo)
{
DWORD dwSize = min(lppsh->dwSize,sizeof(PROPSHEETHEADERW));
DWORD dwFlags = lppsh->dwFlags;
- psInfo->hasHelp = dwFlags & PSH_HASHELP;
- psInfo->hasApply = !(dwFlags & PSH_NOAPPLYNOW);
- psInfo->hasFinish = dwFlags & PSH_WIZARDHASFINISH;
psInfo->useCallback = (dwFlags & PSH_USECALLBACK) &&
(lppsh->pfnCallback);
- psInfo->isModeless = dwFlags & PSH_MODELESS;
memcpy(&psInfo->ppshheader,lppsh,dwSize);
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);
-
- PROPSHEET_UnImplementedFlags(lppsh->dwFlags);
if (lppsh->dwFlags & INTRNL_ANY_WIZARD)
psInfo->ppshheader.pszCaption = NULL;
@@ -387,14 +391,7 @@
else
psInfo->active_page = lppsh->u2.nStartPage;
- if (psInfo->active_page < 0 || psInfo->active_page >= psInfo->nPages)
- psInfo->active_page = 0;
-
- psInfo->result = 0;
- psInfo->hImageList = 0;
- psInfo->activeValid = FALSE;
-
- return TRUE;
+ PROPSHEET_CollectSheetInfoCommon(psInfo, dwFlags);
}
/******************************************************************************
@@ -2817,6 +2814,31 @@
}
/******************************************************************************
+ * PROPSHEET_PropertySheet
+ *
+ * Common code between PropertySheetA/W
+ */
+static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode)
+{
+ INT_PTR bRet = 0;
+ if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
+ TRACE("startpage: %d of %d pages\n", psInfo->active_page,
psInfo->nPages);
+
+ psInfo->unicode = unicode;
+ psInfo->ended = FALSE;
+
+ bRet = PROPSHEET_CreateDialog(psInfo);
+ if(!psInfo->isModeless)
+ {
+ HWND parent = GetParent(psInfo->hwnd);
+ if (parent) EnableWindow(parent, FALSE);
+ bRet = do_loop(psInfo);
+ if (parent) EnableWindow(parent, TRUE);
+ }
+ return bRet;
+}
+
+/******************************************************************************
* PropertySheet (COMCTL32.@)
* PropertySheetA (COMCTL32.@)
*
@@ -2831,7 +2853,6 @@
*/
INT_PTR WINAPI PropertySheetA(LPCPROPSHEETHEADERA lppsh)
{
- INT_PTR bRet = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
sizeof(PropSheetInfo));
UINT i, n;
@@ -2847,7 +2868,7 @@
for (n = i = 0; i < lppsh->nPages; i++, n++)
{
- if (!(lppsh->dwFlags & PSH_PROPSHEETPAGE))
+ if (!psInfo->usePropPage)
psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i];
else
{
@@ -2858,24 +2879,14 @@
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n))
{
- if (lppsh->dwFlags & PSH_PROPSHEETPAGE)
+ if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage);
n--;
psInfo->nPages--;
}
}
- if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
- TRACE("startpage: %d of %d pages\n", psInfo->active_page,
psInfo->nPages);
-
- psInfo->unicode = FALSE;
- psInfo->ended = FALSE;
-
- bRet = PROPSHEET_CreateDialog(psInfo);
- if(!psInfo->isModeless)
- bRet = do_loop(psInfo);
-
- return bRet;
+ return PROPSHEET_PropertySheet(psInfo, FALSE);
}
/******************************************************************************
@@ -2885,7 +2896,6 @@
*/
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
{
- INT_PTR bRet = 0;
PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
sizeof(PropSheetInfo));
UINT i, n;
@@ -2901,7 +2911,7 @@
for (n = i = 0; i < lppsh->nPages; i++, n++)
{
- if (!(lppsh->dwFlags & PSH_PROPSHEETPAGE))
+ if (!psInfo->usePropPage)
psInfo->proppage[n].hpage = psInfo->ppshheader.u3.phpage[i];
else
{
@@ -2912,24 +2922,14 @@
if (!PROPSHEET_CollectPageInfo((LPCPROPSHEETPAGEW)psInfo->proppage[n].hpage,
psInfo, n))
{
- if (lppsh->dwFlags & PSH_PROPSHEETPAGE)
+ if (psInfo->usePropPage)
DestroyPropertySheetPage(psInfo->proppage[n].hpage);
n--;
psInfo->nPages--;
}
}
- if (psInfo->active_page >= psInfo->nPages) psInfo->active_page = 0;
- TRACE("startpage: %d of %d pages\n", psInfo->active_page,
psInfo->nPages);
-
- psInfo->unicode = TRUE;
- psInfo->ended = FALSE;
-
- bRet = PROPSHEET_CreateDialog(psInfo);
- if(!psInfo->isModeless)
- bRet = do_loop(psInfo);
-
- return bRet;
+ return PROPSHEET_PropertySheet(psInfo, TRUE);
}
static LPWSTR load_string( HINSTANCE instance, LPCWSTR str )
@@ -3439,7 +3439,7 @@
static INT_PTR CALLBACK
PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p msg=0x%04x wparam=%x lparam=%lx\n",
+ TRACE("hwnd=%p msg=0x%04x wparam=%lx lparam=%lx\n",
hwnd, uMsg, wParam, lParam);
switch (uMsg)
Modified: trunk/reactos/dll/win32/comctl32/rebar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/rebar.c…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/rebar.c (original)
+++ trunk/reactos/dll/win32/comctl32/rebar.c Fri Jul 27 13:21:42 2007
@@ -2345,7 +2345,7 @@
extra = REBAR_ShrinkBandsLTR(infoPtr, next_band(infoPtr, uBand), iRowEnd, extra,
TRUE);
lpBand->cxEffective += extraOrig - extra;
lpBand->cx = lpBand->cxEffective;
- TRACE("(%d, %ld): Wanted size %d, obtained %d (shrink %d, %d)\n", wParam,
lParam, cxDesired, lpBand->cx, extraOrig, extra);
+ TRACE("(%ld, %ld): Wanted size %d, obtained %d (shrink %d, %d)\n", wParam,
lParam, cxDesired, lpBand->cx, extraOrig, extra);
REBAR_SetRowRectsX(infoPtr, iRowBegin, iRowEnd);
if (infoPtr->dwStyle & CCS_VERT)
@@ -2386,11 +2386,11 @@
if (iPrev < 0 || infoPtr->bands[iPrev].iRow != lpBand->iRow) {
int iNext = next_band(infoPtr, uBand);
if (iNext < infoPtr->uNumBands && infoPtr->bands[iNext].iRow ==
lpBand->iRow) {
- TRACE("(%d): Minimizing the first band in row is by maximizing the
second\n", wParam);
+ TRACE("(%ld): Minimizing the first band in row is by maximizing the
second\n", wParam);
REBAR_MaximizeBand(infoPtr, iNext, FALSE);
}
else
- TRACE("(%d): Only one band in row - nothing to do\n", wParam);
+ TRACE("(%ld): Only one band in row - nothing to do\n", wParam);
return TRUE;
}
@@ -2802,7 +2802,7 @@
NMREBARCHEVRON nmrbc;
REBAR_BAND *lpBand = &infoPtr->bands[wParam];
- TRACE("Pressed chevron on band %d\n", wParam);
+ TRACE("Pressed chevron on band %ld\n", wParam);
/* redraw chevron in pushed state */
lpBand->fDraw |= DRAW_CHEVRONPUSHED;
@@ -3317,7 +3317,7 @@
static LRESULT
REBAR_Size (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- TRACE("wParam=%x, lParam=%lx\n", wParam, lParam);
+ TRACE("wParam=%lx, lParam=%lx\n", wParam, lParam);
/* avoid auto resize infinite recursion */
if (infoPtr->fStatus & AUTO_RESIZE) {
@@ -3395,7 +3395,7 @@
{
REBAR_INFO *infoPtr = REBAR_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n",
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n",
hwnd, uMsg, wParam, lParam);
if (!infoPtr && (uMsg != WM_NCCREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -3611,7 +3611,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/status.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/status.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/status.c (original)
+++ trunk/reactos/dll/win32/comctl32/status.c Fri Jul 27 13:21:42 2007
@@ -310,6 +310,20 @@
}
+static int
+STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const LPPOINT pt)
+{
+ int i;
+ if (infoPtr->simple)
+ return 255;
+
+ for (i = 0; i < infoPtr->numParts; i++)
+ if (pt->x >= infoPtr->parts[i].bound.left && pt->x <=
infoPtr->parts[i].bound.right)
+ return i;
+ return -2;
+}
+
+
static void
STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr)
{
@@ -1211,15 +1225,20 @@
static LRESULT
-STATUSBAR_SendNotify (const STATUS_INFO *infoPtr, UINT code)
-{
- NMHDR nmhdr;
-
- TRACE("code %04x\n", code);
- nmhdr.hwndFrom = infoPtr->Self;
- nmhdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
- nmhdr.code = code;
- SendMessageW (infoPtr->Notify, WM_NOTIFY, 0, (LPARAM)&nmhdr);
+STATUSBAR_SendMouseNotify(const STATUS_INFO *infoPtr, UINT code, LPARAM lParam)
+{
+ NMMOUSE nm;
+
+ TRACE("code %04x, lParam=%lx\n", code, lParam);
+ nm.hdr.hwndFrom = infoPtr->Self;
+ nm.hdr.idFrom = GetWindowLongPtrW(infoPtr->Self, GWLP_ID);
+ nm.hdr.code = code;
+ nm.pt.x = (short)LOWORD(lParam);
+ nm.pt.y = (short)HIWORD(lParam);
+ nm.dwItemSpec = STATUSBAR_InternalHitTest(infoPtr, &nm.pt);
+ nm.dwItemData = 0;
+ nm.dwHitInfo = 0x30000; /* seems constant */
+ SendMessageW(infoPtr->Notify, WM_NOTIFY, 0, (LPARAM)&nm);
return 0;
}
@@ -1232,7 +1251,7 @@
INT nPart = ((INT) wParam) & 0x00ff;
LRESULT res;
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, msg, wParam, lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, msg, wParam,
lParam);
if (!infoPtr && msg != WM_CREATE)
return DefWindowProcW (hwnd, msg, wParam, lParam);
@@ -1320,10 +1339,10 @@
return STATUSBAR_GetTextLength (infoPtr, 0);
case WM_LBUTTONDBLCLK:
- return STATUSBAR_SendNotify (infoPtr, NM_DBLCLK);
+ return STATUSBAR_SendMouseNotify(infoPtr, NM_DBLCLK, lParam);
case WM_LBUTTONUP:
- return STATUSBAR_SendNotify (infoPtr, NM_CLICK);
+ return STATUSBAR_SendMouseNotify(infoPtr, NM_CLICK, lParam);
case WM_MOUSEMOVE:
return STATUSBAR_Relay2Tip (infoPtr, msg, wParam, lParam);
@@ -1347,10 +1366,10 @@
return STATUSBAR_WMPaint (infoPtr, (HDC)wParam);
case WM_RBUTTONDBLCLK:
- return STATUSBAR_SendNotify (infoPtr, NM_RDBLCLK);
+ return STATUSBAR_SendMouseNotify(infoPtr, NM_RDBLCLK, lParam);
case WM_RBUTTONUP:
- return STATUSBAR_SendNotify (infoPtr, NM_RCLICK);
+ return STATUSBAR_SendMouseNotify(infoPtr, NM_RCLICK, lParam);
case WM_SETFONT:
return STATUSBAR_WMSetFont (infoPtr, (HFONT)wParam, LOWORD(lParam));
@@ -1367,7 +1386,7 @@
default:
if ((msg >= WM_USER) && (msg < WM_APP))
- ERR("unknown msg %04x wp=%04x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
msg, wParam, lParam);
return DefWindowProcW (hwnd, msg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/string.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/string.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/string.c (original)
+++ trunk/reactos/dll/win32/comctl32/string.c Fri Jul 27 13:21:42 2007
@@ -81,22 +81,6 @@
}
/*************************************************************************
- * COMCTL32_ChrCmpHelperW
- *
- * Internal helper for COMCTL32_ChrCmpW/ChrCmpIW.
- */
-static BOOL COMCTL32_ChrCmpHelperW(WCHAR ch1, WCHAR ch2, DWORD dwFlags)
-{
- WCHAR str1[2], str2[2];
-
- str1[0] = ch1;
- str1[1] = '\0';
- str2[0] = ch2;
- str2[1] = '\0';
- return CompareStringW(GetThreadLocale(), dwFlags, str1, 2, str2, 2) - 2;
-}
-
-/*************************************************************************
* COMCTL32_ChrCmpA (internal)
*
* Internal helper function.
@@ -127,23 +111,13 @@
}
/*************************************************************************
- * COMCTL32_ChrCmpW
+ * COMCTL32_ChrCmpIW
*
* Internal helper function.
*/
-static BOOL COMCTL32_ChrCmpW(WCHAR ch1, WCHAR ch2)
-{
- return COMCTL32_ChrCmpHelperW(ch1, ch2, 0);
-}
-
-/*************************************************************************
- * COMCTL32_ChrCmpIW
- *
- * Internal helper function.
- */
-static BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
-{
- return COMCTL32_ChrCmpHelperW(ch1, ch2, NORM_IGNORECASE);
+static inline BOOL COMCTL32_ChrCmpIW(WCHAR ch1, WCHAR ch2)
+{
+ return CompareStringW(GetThreadLocale(), NORM_IGNORECASE, &ch1, 1, &ch2, 1) -
2;
}
/**************************************************************************
@@ -240,7 +214,7 @@
return 0;
if (lpSrc == NULL) {
- lpDest[0] = L'\0';
+ lpDest[0] = '\0';
return 0;
}
@@ -249,7 +223,7 @@
len = nMaxLen - 1;
RtlMoveMemory (lpDest, lpSrc, len*sizeof(WCHAR));
- lpDest[len] = L'\0';
+ lpDest[len] = '\0';
return len;
}
@@ -372,15 +346,52 @@
return NULL;
}
-/*************************************************************************
- * COMCTL32_StrStrHelperW
- *
- * Internal implementation of StrStrW/StrStrIW
- */
-static LPWSTR COMCTL32_StrStrHelperW(LPCWSTR lpszStr, LPCWSTR lpszSearch,
- INT (WINAPI *pStrCmpFn)(LPCWSTR,LPCWSTR,INT))
+/**************************************************************************
+ * StrStrIA [COMCTL32.355]
+ *
+ * Find a substring within a string, ignoring case.
+ *
+ * PARAMS
+ * lpszStr [I] String to search in
+ * lpszSearch [I] String to look for
+ *
+ * RETURNS
+ * The start of lpszSearch within lpszStr, or NULL if not found.
+ */
+LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
+{
+ TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
+
+ return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA);
+}
+
+/**************************************************************************
+ * StrToIntA [COMCTL32.357]
+ *
+ * Read a signed integer from a string.
+ *
+ * PARAMS
+ * lpszStr [I] String to read integer from
+ *
+ * RETURNS
+ * The signed integer value represented by the string, or 0 if no integer is
+ * present.
+ */
+INT WINAPI StrToIntA (LPCSTR lpszStr)
+{
+ return atoi(lpszStr);
+}
+
+/**************************************************************************
+ * StrStrIW [COMCTL32.363]
+ *
+ * See StrStrIA.
+ */
+LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
{
int iLen;
+
+ TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
if (!lpszStr || !lpszSearch || !*lpszSearch)
return NULL;
@@ -389,59 +400,11 @@
while (*lpszStr)
{
- if (!pStrCmpFn(lpszStr, lpszSearch, iLen))
+ if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
return (LPWSTR)lpszStr;
- lpszStr = CharNextW(lpszStr);
+ lpszStr++;
}
return NULL;
-}
-
-/**************************************************************************
- * StrStrIA [COMCTL32.355]
- *
- * Find a substring within a string, ignoring case.
- *
- * PARAMS
- * lpszStr [I] String to search in
- * lpszSearch [I] String to look for
- *
- * RETURNS
- * The start of lpszSearch within lpszStr, or NULL if not found.
- */
-LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
-{
- TRACE("(%s,%s)\n", debugstr_a(lpszStr), debugstr_a(lpszSearch));
-
- return COMCTL32_StrStrHelperA(lpszStr, lpszSearch, StrCmpNIA);
-}
-
-/**************************************************************************
- * StrToIntA [COMCTL32.357]
- *
- * Read a signed integer from a string.
- *
- * PARAMS
- * lpszStr [I] String to read integer from
- *
- * RETURNS
- * The signed integer value represented by the string, or 0 if no integer is
- * present.
- */
-INT WINAPI StrToIntA (LPCSTR lpszStr)
-{
- return atoi(lpszStr);
-}
-
-/**************************************************************************
- * StrStrIW [COMCTL32.363]
- *
- * See StrStrIA.
- */
-LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
-{
- TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
-
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, StrCmpNIW);
}
/**************************************************************************
@@ -602,25 +565,18 @@
*
* See StrRChrA.
*/
-LPWSTR WINAPI StrRChrW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
-{
- LPCWSTR lpszRet = NULL;
-
- TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
-
- if (lpszStr)
- {
- if (!lpszEnd)
- lpszEnd = lpszStr + strlenW(lpszStr);
-
- while (*lpszStr && lpszStr <= lpszEnd)
- {
- if (!COMCTL32_ChrCmpW(ch, *lpszStr))
- lpszRet = lpszStr;
- lpszStr = CharNextW(lpszStr);
- }
- }
- return (LPWSTR)lpszRet;
+LPWSTR WINAPI StrRChrW(LPCWSTR str, LPCWSTR end, WORD ch)
+{
+ WCHAR *ret = NULL;
+
+ if (!str) return NULL;
+ if (!end) end = str + strlenW(str);
+ while (str < end)
+ {
+ if (*str == ch) ret = (WCHAR *)str;
+ str++;
+ }
+ return ret;
}
/**************************************************************************
@@ -649,9 +605,8 @@
*/
LPWSTR WINAPI StrStrW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
{
- TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
-
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, StrCmpNW);
+ if (!lpszStr || !lpszSearch) return NULL;
+ return strstrW( lpszStr, lpszSearch );
}
/*************************************************************************
@@ -700,7 +655,7 @@
{
if (toupperW(*lpszStr) == ch)
return (LPWSTR)lpszStr;
- lpszStr = CharNextW(lpszStr);
+ lpszStr++;
}
lpszStr = NULL;
}
@@ -780,35 +735,9 @@
if (!StrCmpNIW(lpszStr, lpszSearch, iLen))
lpszRet = (LPWSTR)lpszStr;
}
- lpszStr = CharNextW(lpszStr);
+ lpszStr++;
}
return lpszRet;
-}
-
-/*************************************************************************
- * COMCTL32_StrSpnHelperW
- *
- * Internal implementation of StrSpnW/StrCSpnW/StrCSpnIW
- */
-static int COMCTL32_StrSpnHelperW(LPCWSTR lpszStr, LPCWSTR lpszMatch,
- LPWSTR (WINAPI *pStrChrFn)(LPCWSTR,WCHAR),
- BOOL bInvert)
-{
- LPCWSTR lpszRead = lpszStr;
- if (lpszStr && *lpszStr && lpszMatch)
- {
- while (*lpszRead)
- {
- LPCWSTR lpszTest = pStrChrFn(lpszMatch, *lpszRead);
-
- if (!bInvert && !lpszTest)
- break;
- if (bInvert && lpszTest)
- break;
- lpszRead = CharNextW(lpszRead);
- };
- }
- return lpszRead - lpszStr;
}
/*************************************************************************
@@ -839,9 +768,19 @@
*/
int WINAPI StrCSpnIW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
+ LPCWSTR lpszRead = lpszStr;
+
TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
- return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrIW, TRUE);
+ if (lpszStr && *lpszStr && lpszMatch)
+ {
+ while (*lpszRead)
+ {
+ if (StrChrIW(lpszMatch, *lpszRead)) break;
+ lpszRead++;
+ }
+ }
+ return lpszRead - lpszStr;
}
/**************************************************************************
@@ -889,25 +828,18 @@
*
* See StrRChrIA.
*/
-LPWSTR WINAPI StrRChrIW(LPCWSTR lpszStr, LPCWSTR lpszEnd, WORD ch)
-{
- LPCWSTR lpszRet = NULL;
-
- TRACE("(%s,%s,%x)\n", debugstr_w(lpszStr), debugstr_w(lpszEnd), ch);
-
- if (lpszStr)
- {
- if (!lpszEnd)
- lpszEnd = lpszStr + strlenW(lpszStr);
-
- while (*lpszStr && lpszStr <= lpszEnd)
- {
- if (ch == *lpszStr)
- lpszRet = lpszStr;
- lpszStr = CharNextW(lpszStr);
- }
- }
- return (LPWSTR)lpszRet;
+LPWSTR WINAPI StrRChrIW(LPCWSTR str, LPCWSTR end, WORD ch)
+{
+ WCHAR *ret = NULL;
+
+ if (!str) return NULL;
+ if (!end) end = str + strlenW(str);
+ while (str < end)
+ {
+ if (!COMCTL32_ChrCmpIW(*str, ch)) ret = (WCHAR *)str;
+ str++;
+ }
+ return ret;
}
/*************************************************************************
@@ -917,9 +849,8 @@
*/
int WINAPI StrCSpnW(LPCWSTR lpszStr, LPCWSTR lpszMatch)
{
- TRACE("(%s,%s)\n",debugstr_w(lpszStr), debugstr_w(lpszMatch));
-
- return COMCTL32_StrSpnHelperW(lpszStr, lpszMatch, StrChrW, TRUE);
+ if (!lpszStr || !lpszMatch) return 0;
+ return strcspnW( lpszStr, lpszMatch );
}
/*************************************************************************
Modified: trunk/reactos/dll/win32/comctl32/syslink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/syslink…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/syslink.c (original)
+++ trunk/reactos/dll/win32/comctl32/syslink.c Fri Jul 27 13:21:42 2007
@@ -1545,7 +1545,7 @@
{
SYSLINK_INFO *infoPtr;
- TRACE("hwnd=%p msg=%04x wparam=%x lParam=%lx\n", hwnd, message, wParam,
lParam);
+ TRACE("hwnd=%p msg=%04x wparam=%lx lParam=%lx\n", hwnd, message, wParam,
lParam);
infoPtr = (SYSLINK_INFO *)GetWindowLongPtrW(hwnd, 0);
@@ -1754,7 +1754,7 @@
HandleDefaultMessage:
if ((message >= WM_USER) && (message < WM_APP))
{
- ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam
);
+ ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam
);
}
return DefWindowProcW(hwnd, message, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/tab.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tab.c?r…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tab.c (original)
+++ trunk/reactos/dll/win32/comctl32/tab.c Fri Jul 27 13:21:42 2007
@@ -863,7 +863,7 @@
DWORD lStyle = GetWindowLongW(infoPtr->hwnd, GWL_STYLE);
LONG *iRightBottom, *iLeftTop;
- TRACE ("hwnd=%p fLarger=%d (%d,%d)-(%d,%d)\n", infoPtr->hwnd, fLarger,
prc->left, prc->top, prc->right, prc->bottom);
+ TRACE ("hwnd=%p fLarger=%ld (%d,%d)-(%d,%d)\n", infoPtr->hwnd, fLarger,
prc->left, prc->top, prc->right, prc->bottom);
if(lStyle & TCS_VERTICAL)
{
@@ -2681,12 +2681,9 @@
TRACE("(%p,%d)\n", infoPtr, cx);
- if (infoPtr) {
- oldcx = infoPtr->tabMinWidth;
- infoPtr->tabMinWidth = cx;
- }
+ oldcx = infoPtr->tabMinWidth;
+ infoPtr->tabMinWidth = cx;
TAB_SetItemBounds(infoPtr);
-
return oldcx;
}
@@ -3124,7 +3121,7 @@
{
TAB_INFO *infoPtr = TAB_GetInfoPtr(hwnd);
- TRACE("hwnd=%p msg=%x wParam=%x lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wParam=%lx lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
if (!infoPtr && (uMsg != WM_CREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -3294,7 +3291,7 @@
default:
if (uMsg >= WM_USER && uMsg < WM_APP)
- WARN("unknown msg %04x wp=%08x lp=%08lx\n",
+ WARN("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
break;
}
Modified: trunk/reactos/dll/win32/comctl32/theming.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/theming…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/theming.c (original)
+++ trunk/reactos/dll/win32/comctl32/theming.c Fri Jul 27 13:21:42 2007
@@ -79,7 +79,7 @@
ULONG_PTR refData; \
SetPropW (wnd, (LPCWSTR)MAKEINTATOM(atSubclassProp), (HANDLE)N); \
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, %lx, %lx, %lx)\n", N, wnd, msg, wParam, lParam, \
refData); \
result = subclasses[N].subclassProc (wnd, msg, wParam, lParam, refData);\
TRACE ("result = %lx\n", result); \
Modified: trunk/reactos/dll/win32/comctl32/toolbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/toolbar.c (original)
+++ trunk/reactos/dll/win32/comctl32/toolbar.c Fri Jul 27 13:21:42 2007
@@ -278,7 +278,7 @@
TOOLBAR_DumpButton(const TOOLBAR_INFO *infoPtr, const TBUTTON_INFO *bP, INT btn_num, BOOL
internal)
{
if (TRACE_ON(toolbar)){
- TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx,
stringid=0x%08x\n",
+ TRACE("button %d id %d, bitmap=%d, state=%02x, style=%02x, data=%08lx,
stringid=0x%08lx\n",
btn_num, bP->idCommand, GETIBITMAP(infoPtr, bP->iBitmap),
bP->fsState, bP->fsStyle, bP->dwData, bP->iString);
TRACE("string %s\n", debugstr_w(TOOLBAR_GetText(infoPtr,bP)));
@@ -360,14 +360,15 @@
if (ret == I_IMAGECALLBACK)
{
/* issue TBN_GETDISPINFO */
- NMTBDISPINFOA nmgd;
+ NMTBDISPINFOW nmgd;
memset(&nmgd, 0, sizeof(nmgd));
nmgd.idCommand = btnPtr->idCommand;
nmgd.lParam = btnPtr->dwData;
nmgd.dwMask = TBNF_IMAGE;
- TOOLBAR_SendNotify(&nmgd.hdr, infoPtr,
- infoPtr->bUnicode ? TBN_GETDISPINFOW : TBN_GETDISPINFOA);
+ nmgd.iImage = -1;
+ /* Windows also send TBN_GETDISPINFOW even if the control is ANSI */
+ TOOLBAR_SendNotify(&nmgd.hdr, infoPtr, TBN_GETDISPINFOW);
if (nmgd.dwMask & TBNF_DI_SETITEM)
btnPtr->iBitmap = nmgd.iImage;
ret = nmgd.iImage;
@@ -2351,7 +2352,7 @@
if (!TOOLBAR_GetButtonInfo(infoPtr, &nmtb))
break;
- TRACE("WM_INITDIALOG style: %x iItem(%d) idCommand(%d) iString(%d) %s\n",
+ TRACE("WM_INITDIALOG style: %x iItem(%d) idCommand(%d) iString(%ld)
%s\n",
nmtb.tbButton.fsStyle, i,
nmtb.tbButton.idCommand,
nmtb.tbButton.iString,
@@ -2668,7 +2669,7 @@
TRACE("adding hInst=%p nID=%d nButtons=%d\n", bitmap->hInst,
bitmap->nID, bitmap->nButtons);
/* Add bitmaps to the default image list */
if (bitmap->hInst == NULL) /* a handle was passed */
- hbmLoad = (HBITMAP)CopyImage((HBITMAP)bitmap->nID, IMAGE_BITMAP, 0, 0, 0);
+ hbmLoad = (HBITMAP)CopyImage(ULongToHandle(bitmap->nID), IMAGE_BITMAP, 0, 0,
0);
else
hbmLoad = CreateMappedBitmap(bitmap->hInst, bitmap->nID, 0, NULL, 0);
@@ -2739,7 +2740,7 @@
INT iSumButtons, i;
HIMAGELIST himlDef;
- TRACE("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
if (!lpAddBmp)
return -1;
@@ -2850,7 +2851,7 @@
INT nOldButtons, nNewButtons, nAddButtons, nCount;
BOOL fHasString = FALSE;
- TRACE("adding %d buttons (unicode=%d)!\n", wParam, fUnicode);
+ TRACE("adding %ld buttons (unicode=%d)!\n", wParam, fUnicode);
nAddButtons = (UINT)wParam;
nOldButtons = infoPtr->nNumButtons;
@@ -3095,7 +3096,7 @@
TBUTTON_INFO *btnPtr;
INT nIndex;
- TRACE("button %d, iBitmap now %d\n", wParam, LOWORD(lParam));
+ TRACE("button %ld, iBitmap now %d\n", wParam, LOWORD(lParam));
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
@@ -3271,7 +3272,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
- TRACE("hwnd=%p, btn index=%d, lParam=0x%08lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, btn index=%ld, lParam=0x%08lx\n", hwnd, wParam, lParam);
if (nIndex == -1)
return FALSE;
@@ -3470,7 +3471,7 @@
static LRESULT
TOOLBAR_GetDisabledImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p, wParam=%d, lParam=0x%lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, wParam=%ld, lParam=0x%lx\n", hwnd, wParam, lParam);
/* UNDOCUMENTED: wParam is actually the ID of the image list to return */
return (LRESULT)GETDISIMAGELIST(TOOLBAR_GetInfoPtr (hwnd), wParam);
}
@@ -3490,7 +3491,7 @@
static LRESULT
TOOLBAR_GetHotImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p, wParam=%d, lParam=0x%lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, wParam=%ld, lParam=0x%lx\n", hwnd, wParam, lParam);
/* UNDOCUMENTED: wParam is actually the ID of the image list to return */
return (LRESULT)GETHOTIMAGELIST(TOOLBAR_GetInfoPtr (hwnd), wParam);
}
@@ -3514,7 +3515,7 @@
static LRESULT
TOOLBAR_GetDefImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p, wParam=%d, lParam=0x%lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, wParam=%ld, lParam=0x%lx\n", hwnd, wParam, lParam);
/* UNDOCUMENTED: wParam is actually the ID of the image list to return */
return (LRESULT) GETDEFIMAGELIST(TOOLBAR_GetInfoPtr(hwnd), wParam);
}
@@ -3839,7 +3840,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return FALSE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_CHECKED);
}
@@ -3853,7 +3854,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return FALSE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_ENABLED);
}
@@ -3867,7 +3868,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return TRUE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_HIDDEN);
}
@@ -3881,7 +3882,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return FALSE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_MARKED);
}
@@ -3895,7 +3896,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return FALSE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_INDETERMINATE);
}
@@ -3909,7 +3910,7 @@
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
- return FALSE;
+ return -1;
return (infoPtr->buttons[nIndex].fsState & TBSTATE_PRESSED);
}
@@ -3922,7 +3923,7 @@
tbab.hInst = (HINSTANCE)lParam;
tbab.nID = (UINT_PTR)wParam;
- TRACE("hwnd = %p, hInst = %p, nID = %u\n", hwnd, tbab.hInst, tbab.nID);
+ TRACE("hwnd = %p, hInst = %p, nID = %lu\n", hwnd, tbab.hInst, tbab.nID);
return TOOLBAR_AddBitmap(hwnd, 0, (LPARAM)&tbab);
}
@@ -3980,7 +3981,7 @@
DWORD oldState;
TBUTTON_INFO *btnPtr;
- TRACE("hwnd = %p, wParam = %d, lParam = 0x%08lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd = %p, wParam = %ld, lParam = 0x%08lx\n", hwnd, wParam,
lParam);
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
if (nIndex == -1)
@@ -4030,7 +4031,7 @@
INT nMoveIndex = (INT)lParam;
TBUTTON_INFO button;
- TRACE("hwnd=%p, wParam=%d, lParam=%ld\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, wParam=%ld, lParam=%ld\n", hwnd, wParam, lParam);
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, TRUE);
if ((nIndex == -1) || (nMoveIndex < 0))
@@ -4110,7 +4111,7 @@
int nOldBitmaps, nNewBitmaps = 0;
HIMAGELIST himlDef = 0;
- TRACE("hInstOld %p nIDOld %x hInstNew %p nIDNew %x nButtons %x\n",
+ TRACE("hInstOld %p nIDOld %lx hInstNew %p nIDNew %lx nButtons %x\n",
lpReplace->hInstOld, lpReplace->nIDOld, lpReplace->hInstNew,
lpReplace->nIDNew,
lpReplace->nButtons);
@@ -4122,7 +4123,7 @@
else if (lpReplace->hInstOld != 0)
FIXME("resources not in the current module not implemented\n");
- TRACE("To be replaced hInstOld %p nIDOld %x\n", lpReplace->hInstOld,
lpReplace->nIDOld);
+ TRACE("To be replaced hInstOld %p nIDOld %lx\n", lpReplace->hInstOld,
lpReplace->nIDOld);
for (i = 0; i < infoPtr->nNumBitmapInfos; i++) {
TBITMAP_INFO *tbi = &infoPtr->bitmaps[i];
TRACE("tbimapinfo %d hInstOld %p nIDOld %x\n", i, tbi->hInst,
tbi->nID);
@@ -4141,7 +4142,7 @@
if (nOldButtons == 0)
{
- WARN("No hinst/bitmap found! hInst %p nID %x\n",
lpReplace->hInstOld, lpReplace->nIDOld);
+ WARN("No hinst/bitmap found! hInst %p nID %lx\n",
lpReplace->hInstOld, lpReplace->nIDOld);
return FALSE;
}
@@ -4381,10 +4382,10 @@
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
HIMAGELIST himlDef = GETDEFIMAGELIST(infoPtr, 0);
- TRACE("hwnd=%p, wParam=%d, lParam=%ld\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p, wParam=%ld, lParam=%ld\n", hwnd, wParam, lParam);
if (wParam != 0)
- FIXME("wParam is %d. Perhaps image list index?\n", wParam);
+ FIXME("wParam is %ld. Perhaps image list index?\n", wParam);
if (LOWORD(lParam) == 0)
lParam = MAKELPARAM(1, HIWORD(lParam));
@@ -4791,6 +4792,7 @@
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
HIMAGELIST himlTemp;
HIMAGELIST himl = (HIMAGELIST)lParam;
+ INT oldButtonWidth = infoPtr->nButtonWidth;
INT i, id = 0;
if (infoPtr->iVersion >= 5)
@@ -4810,6 +4812,8 @@
infoPtr->nBitmapHeight = 1;
}
TOOLBAR_CalcToolbar(hwnd);
+ if (infoPtr->nButtonWidth < oldButtonWidth)
+ TOOLBAR_SetButtonSize(hwnd, 0, MAKELONG(oldButtonWidth,
infoPtr->nButtonHeight));
TRACE("hwnd %p, new himl=%p, id = %d, count=%d, bitmap w=%d, h=%d\n",
hwnd, infoPtr->himlDef, id, infoPtr->nNumBitmaps,
@@ -5142,7 +5146,7 @@
static LRESULT TOOLBAR_Unkwn45D(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
SIZE * pSize = (SIZE*)lParam;
- FIXME("hwnd=%p, wParam=0x%08x, size.cx=%d, size.cy=%d stub!\n", hwnd,
wParam, pSize->cx, pSize->cy);
+ FIXME("hwnd=%p, wParam=0x%08lx, size.cx=%d, size.cy=%d stub!\n", hwnd,
wParam, pSize->cx, pSize->cy);
return 0;
}
@@ -5180,7 +5184,7 @@
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
- TRACE("hwnd=%p iListGap=%d\n", hwnd, wParam);
+ TRACE("hwnd=%p iListGap=%ld\n", hwnd, wParam);
if (lParam != 0)
FIXME("lParam = 0x%08lx. Please report\n", lParam);
@@ -5198,7 +5202,7 @@
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
- TRACE("hwnd=%p wParam %08x lParam %08lx\n", hwnd, wParam, lParam);
+ TRACE("hwnd=%p wParam %08lx lParam %08lx\n", hwnd, wParam, lParam);
return max(infoPtr->cimlDef, max(infoPtr->cimlHot, infoPtr->cimlDis));
}
@@ -5219,7 +5223,7 @@
* lParam pointer to SIZE structure
*
*/
- TRACE("[0463] wParam %d, lParam 0x%08lx -> 0x%08x 0x%08x\n",
+ TRACE("[0463] wParam %ld, lParam 0x%08lx -> 0x%08x 0x%08x\n",
wParam, lParam, lpsize->cx, lpsize->cy);
switch(wParam) {
@@ -5247,7 +5251,7 @@
lpsize->cy = infoPtr->rcBound.bottom - infoPtr->rcBound.top;
break;
default:
- ERR("Unknown wParam %d for Toolbar message [0463]. Please report\n",
+ ERR("Unknown wParam %ld for Toolbar message [0463]. Please report\n",
wParam);
return 0;
}
@@ -5258,7 +5262,7 @@
static LRESULT TOOLBAR_Unkwn464(HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- FIXME("hwnd=%p wParam %08x lParam %08lx\n", hwnd, wParam, lParam);
+ FIXME("hwnd=%p wParam %08lx lParam %08lx\n", hwnd, wParam, lParam);
InvalidateRect(hwnd, NULL, TRUE);
return 1;
@@ -6345,7 +6349,7 @@
{
LRESULT format;
- TRACE("wParam = 0x%x, lParam = 0x%08lx\n", wParam, lParam);
+ TRACE("wParam = 0x%lx, lParam = 0x%08lx\n", wParam, lParam);
if (lParam == NF_QUERY)
return NFR_UNICODE;
@@ -6561,7 +6565,7 @@
{
TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr (hwnd);
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n",
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n",
hwnd, uMsg, /* SPY_GetMsgName(uMsg), */ wParam, lParam);
if (!infoPtr && (uMsg != WM_NCCREATE))
@@ -6965,7 +6969,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/tooltips.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltip…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/tooltips.c (original)
+++ trunk/reactos/dll/win32/comctl32/tooltips.c Fri Jul 27 13:21:42 2007
@@ -319,7 +319,7 @@
ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam;
- TRACE("hdr.idFrom = %x\n", ttnmdi.hdr.idFrom);
+ TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
SendMessageW(toolPtr->hwnd, WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
@@ -336,17 +336,11 @@
infoPtr->szTipText[0] = '\0';
}
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
- INT max_len = (ttnmdi.lpszText == &ttnmdi.szText[0]) ?
- sizeof(ttnmdi.szText)/sizeof(ttnmdi.szText[0]) : -1;
- MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, max_len,
- infoPtr->szTipText, INFOTIPSIZE);
+ Str_GetPtrAtoW(ttnmdi.lpszText, infoPtr->szTipText, INFOTIPSIZE);
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
- INT len = MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText,
- max_len, NULL, 0);
toolPtr->hinst = 0;
- toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, ttnmdi.lpszText, -1,
- toolPtr->lpszText, len);
+ toolPtr->lpszText = NULL;
+ Str_SetPtrW(&toolPtr->lpszText, infoPtr->szTipText);
}
}
else {
@@ -368,7 +362,7 @@
ttnmdi.uFlags = toolPtr->uFlags;
ttnmdi.lParam = toolPtr->lParam;
- TRACE("hdr.idFrom = %x\n", ttnmdi.hdr.idFrom);
+ TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
SendMessageW(toolPtr->hwnd, WM_NOTIFY,
(WPARAM)toolPtr->uId, (LPARAM)&ttnmdi);
@@ -385,14 +379,11 @@
infoPtr->szTipText[0] = '\0';
}
else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
- INT max_len = (ttnmdi.lpszText == &ttnmdi.szText[0]) ?
- sizeof(ttnmdi.szText)/sizeof(ttnmdi.szText[0]) : INFOTIPSIZE-1;
- lstrcpynW(infoPtr->szTipText, ttnmdi.lpszText, max_len);
+ Str_GetPtrW(ttnmdi.lpszText, infoPtr->szTipText, INFOTIPSIZE);
if (ttnmdi.uFlags & TTF_DI_SETITEM) {
- INT len = max(strlenW(ttnmdi.lpszText), max_len);
toolPtr->hinst = 0;
- toolPtr->lpszText = Alloc ((len+1) * sizeof(WCHAR));
- memcpy(toolPtr->lpszText, ttnmdi.lpszText, (len+1) * sizeof(WCHAR));
+ toolPtr->lpszText = NULL;
+ Str_SetPtrW(&toolPtr->lpszText, infoPtr->szTipText);
}
}
else {
@@ -427,7 +418,7 @@
}
else {
/* no text available */
- infoPtr->szTipText[0] = L'\0';
+ infoPtr->szTipText[0] = '\0';
}
TRACE("%s\n", debugstr_w(infoPtr->szTipText));
@@ -515,7 +506,7 @@
TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nCurrentTool);
- if (infoPtr->szTipText[0] == L'\0') {
+ if (infoPtr->szTipText[0] == '\0') {
infoPtr->nCurrentTool = -1;
return;
}
@@ -734,7 +725,7 @@
TOOLTIPS_GetTipText (hwnd, infoPtr, infoPtr->nTrackTool);
- if (infoPtr->szTipText[0] == L'\0') {
+ if (infoPtr->szTipText[0] == '\0') {
infoPtr->nTrackTool = -1;
return;
}
@@ -995,7 +986,7 @@
if (lpToolInfo->cbSize < TTTOOLINFOA_V1_SIZE)
return FALSE;
- TRACE("add tool (%p) %p %d%s!\n",
+ TRACE("add tool (%p) %p %ld%s!\n",
hwnd, lpToolInfo->hwnd, lpToolInfo->uId,
(lpToolInfo->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" :
"");
@@ -1086,7 +1077,7 @@
if (lpToolInfo->cbSize < TTTOOLINFOW_V1_SIZE)
return FALSE;
- TRACE("add tool (%p) %p %d%s!\n",
+ TRACE("add tool (%p) %p %ld%s!\n",
hwnd, lpToolInfo->hwnd, lpToolInfo->uId,
(lpToolInfo->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" :
"");
@@ -1461,7 +1452,7 @@
return infoPtr->nInitialTime;
default:
- WARN("Invalid wParam %x\n", wParam);
+ WARN("Invalid wParam %lx\n", wParam);
break;
}
@@ -1866,7 +1857,7 @@
break;
default:
- WARN("Invalid wParam %x\n", wParam);
+ WARN("Invalid wParam %lx\n", wParam);
break;
}
@@ -2445,7 +2436,7 @@
static LRESULT
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
- FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
+ FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
TTTOOL_INFO *toolPtr = infoPtr->tools;
INT nResult;
@@ -2565,7 +2556,7 @@
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
INT nOldTool;
- TRACE("timer %d (%p) expired!\n", wParam, hwnd);
+ TRACE("timer %ld (%p) expired!\n", wParam, hwnd);
switch (wParam) {
case ID_TIMERSHOW:
@@ -2602,7 +2593,7 @@
break;
default:
- ERR("Unknown timer id %d\n", wParam);
+ ERR("Unknown timer id %ld\n", wParam);
break;
}
return 0;
@@ -2650,7 +2641,7 @@
static LRESULT CALLBACK
TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- TRACE("hwnd=%p msg=%x wparam=%x lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam,
lParam);
if (!TOOLTIPS_GetInfoPtr(hwnd) && (uMsg != WM_CREATE) && (uMsg !=
WM_NCCREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
switch (uMsg)
@@ -2831,7 +2822,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n",
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/trackbar.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/trackba…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/trackbar.c (original)
+++ trunk/reactos/dll/win32/comctl32/trackbar.c Fri Jul 27 13:21:42 2007
@@ -1734,7 +1734,7 @@
{
TRACKBAR_INFO *infoPtr = (TRACKBAR_INFO *)GetWindowLongPtrW (hwnd, 0);
- TRACE("hwnd=%p msg=%x wparam=%x lparam=%lx\n", hwnd, uMsg, wParam,
lParam);
+ TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, uMsg, wParam,
lParam);
if (!infoPtr && (uMsg != WM_CREATE))
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
@@ -1908,7 +1908,7 @@
default:
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- ERR("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ ERR("unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
return DefWindowProcW (hwnd, uMsg, wParam, lParam);
}
}
Modified: trunk/reactos/dll/win32/comctl32/treeview.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/treevie…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/treeview.c (original)
+++ trunk/reactos/dll/win32/comctl32/treeview.c Fri Jul 27 13:21:42 2007
@@ -503,7 +503,7 @@
static LRESULT
TREEVIEW_SendRealNotify(const TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- TRACE("wParam=%d, lParam=%ld\n", wParam, lParam);
+ TRACE("wParam=%ld, lParam=%ld\n", wParam, lParam);
return SendMessageW(infoPtr->hwndNotify, WM_NOTIFY, wParam, lParam);
}
@@ -1746,7 +1746,7 @@
int oldHeight = infoPtr->normalImageHeight;
- TRACE("%x,%p\n", wParam, himlNew);
+ TRACE("%lx,%p\n", wParam, himlNew);
switch (wParam)
{
@@ -3573,7 +3573,7 @@
static LRESULT
TREEVIEW_Command(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- TRACE("%x %ld\n", wParam, lParam);
+ TRACE("%lx %ld\n", wParam, lParam);
switch (HIWORD(wParam))
{
@@ -4657,7 +4657,7 @@
int nScrollCode = LOWORD(wParam);
- TRACE("wp %x\n", wParam);
+ TRACE("wp %lx\n", wParam);
if (!(infoPtr->uInternalStatus & TV_VSCROLL))
return 0;
@@ -4727,7 +4727,7 @@
int scrollX = infoPtr->scrollX;
int nScrollCode = LOWORD(wParam);
- TRACE("wp %x\n", wParam);
+ TRACE("wp %lx\n", wParam);
if (!(infoPtr->uInternalStatus & TV_HSCROLL))
return FALSE;
@@ -4965,7 +4965,9 @@
TREEVIEW_NotifyFormat(infoPtr, infoPtr->hwndNotify, NF_REQUERY);
if (!(infoPtr->dwStyle & TVS_NOTOOLTIPS))
- infoPtr->hwndToolTip = COMCTL32_CreateToolTip(hwnd);
+ infoPtr->hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ hwnd, 0, 0, 0);
if (infoPtr->dwStyle & TVS_CHECKBOXES)
initialize_checkboxes(infoPtr);
@@ -5068,7 +5070,7 @@
TREEVIEW_ITEM *prevItem = infoPtr->selectedItem;
- TRACE("%x\n", wParam);
+ TRACE("%lx\n", wParam);
if (prevItem == NULL)
return FALSE;
@@ -5316,7 +5318,7 @@
}
else
{
- FIXME("WM_SIZE flag %x %lx not handled\n", wParam, lParam);
+ FIXME("WM_SIZE flag %lx %lx not handled\n", wParam, lParam);
}
TREEVIEW_Invalidate(infoPtr, NULL);
@@ -5326,7 +5328,7 @@
static LRESULT
TREEVIEW_StyleChanged(TREEVIEW_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
- TRACE("(%x %lx)\n", wParam, lParam);
+ TRACE("(%lx %lx)\n", wParam, lParam);
if (wParam == GWL_STYLE)
{
@@ -5434,7 +5436,7 @@
{
TREEVIEW_INFO *infoPtr = TREEVIEW_GetInfoPtr(hwnd);
- TRACE("hwnd %p msg %04x wp=%08x lp=%08lx\n", hwnd, uMsg, wParam, lParam);
+ TRACE("hwnd %p msg %04x wp=%08lx lp=%08lx\n", hwnd, uMsg, wParam, lParam);
if (infoPtr) TREEVIEW_VerifyTree(infoPtr);
else
@@ -5701,7 +5703,7 @@
default:
/* This mostly catches MFC and Delphi messages. :( */
if ((uMsg >= WM_USER) && (uMsg < WM_APP))
- TRACE("Unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam);
+ TRACE("Unknown msg %04x wp=%08lx lp=%08lx\n", uMsg, wParam, lParam);
def:
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
}
Modified: trunk/reactos/dll/win32/comctl32/updown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/updown.…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/updown.c (original)
+++ trunk/reactos/dll/win32/comctl32/updown.c Fri Jul 27 13:21:42 2007
@@ -478,7 +478,7 @@
{
WNDPROC superClassWndProc = (WNDPROC)GetPropW(hwnd, BUDDY_SUPERCLASS_WNDPROC);
- TRACE("hwnd=%p, wndProc=%p, uMsg=%04x, wParam=%08x, lParam=%08lx\n",
+ TRACE("hwnd=%p, wndProc=%p, uMsg=%04x, wParam=%08lx, lParam=%08lx\n",
hwnd, superClassWndProc, uMsg, wParam, lParam);
if (uMsg == WM_KEYDOWN) {
@@ -794,7 +794,7 @@
static const WCHAR themeClass[] =
{'S','p','i','n',0};
HTHEME theme;
- TRACE("hwnd=%p msg=%04x wparam=%08x lparam=%08lx\n", hwnd, message, wParam,
lParam);
+ TRACE("hwnd=%p msg=%04x wparam=%08lx lparam=%08lx\n", hwnd, message,
wParam, lParam);
if (!infoPtr && (message != WM_CREATE))
return DefWindowProcW (hwnd, message, wParam, lParam);
@@ -970,7 +970,7 @@
return infoPtr->Base;
case UDM_SETBASE:
- TRACE("UpDown Ctrl new base(%d), hwnd=%p\n", wParam, hwnd);
+ TRACE("UpDown Ctrl new base(%ld), hwnd=%p\n", wParam, hwnd);
if (wParam==10 || wParam==16) {
temp = infoPtr->Base;
infoPtr->Base = wParam;
@@ -1052,7 +1052,7 @@
default:
if ((message >= WM_USER) && (message < WM_APP))
- ERR("unknown msg %04x wp=%04x lp=%08lx\n", message, wParam, lParam);
+ ERR("unknown msg %04x wp=%04lx lp=%08lx\n", message, wParam, lParam);
return DefWindowProcW (hwnd, message, wParam, lParam);
}