reactos/dll/win32/comctl32/comctl32_ros.diff
Art Yerkes c501d8112c Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
2008-08-01 11:32:26 +00:00

136 lines
4 KiB
Diff

Index: propsheet.c
===================================================================
--- propsheet.c (revision 25766)
+++ propsheet.c (working copy)
@@ -2431,6 +2431,28 @@
return FALSE;
}
+BOOL CALLBACK
+EnumChildProc(HWND hwnd, LPARAM lParam)
+{
+ WCHAR szType[20];
+ RealGetWindowClassW(hwnd, szType, 20);
+
+ if (strcmpW(szType, WC_EDITW) == 0)
+ {
+ if (IsWindowEnabled(hwnd) && IsWindowVisible(hwnd))
+ {
+ SetFocus(hwnd);
+ return FALSE;
+ }
+ }
+ else
+ {
+ EnumChildWindows(hwnd, EnumChildProc, 0);
+ }
+
+ return TRUE;
+}
+
/******************************************************************************
* PROPSHEET_SetWizButtons
*
@@ -2453,17 +2475,6 @@
EnableWindow(hwndNext, FALSE);
EnableWindow(hwndFinish, FALSE);
- /* set the default pushbutton to an enabled button */
- if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
- else if (dwFlags & PSWIZB_NEXT)
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
- else if (dwFlags & PSWIZB_BACK)
- SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
- else
- SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
-
-
if (dwFlags & PSWIZB_BACK)
EnableWindow(hwndBack, TRUE);
@@ -2493,6 +2504,32 @@
}
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
EnableWindow(hwndFinish, TRUE);
+
+ /* set the default pushbutton to an enabled button and give it focus */
+ if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
+ {
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
+ SetFocus(hwndFinish);
+ }
+ else if (dwFlags & PSWIZB_NEXT)
+ {
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
+ SetFocus(hwndNext);
+ }
+ else if (dwFlags & PSWIZB_BACK)
+ {
+ SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
+ SetFocus(hwndBack);
+ }
+ else
+ {
+ SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
+ SetFocus(GetDlgItem(hwndDlg, IDCANCEL));
+ }
+
+ /* Now try to find an edit control that deserves focus */
+ EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0);
+
}
/******************************************************************************
Index: tooltips.c
===================================================================
--- tooltips.c (revision 25790)
+++ tooltips.c (working copy)
@@ -2486,7 +2486,34 @@
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM 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;
+ if (lParam == NF_QUERY)
+ {
+ if (toolPtr->bNotifyUnicode)
+ {
+ return NFR_UNICODE;
+ } else {
+ return NFR_ANSI;
+ }
+ }
+ else if (lParam == NF_REQUERY)
+ {
+ nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
+ (WPARAM)hwnd, (LPARAM)NF_QUERY);
+ if (nResult == NFR_ANSI) {
+ toolPtr->bNotifyUnicode = FALSE;
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
+ } else if (nResult == NFR_UNICODE) {
+ toolPtr->bNotifyUnicode = TRUE;
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
+ } else {
+ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
+ }
+ return nResult;
+ }
return 0;
}
Index: treeview.c
===================================================================
--- D:/Wine-CVS/wine/dlls/comctl32/treeview.c Sun Jun 15 18:29:21 2008
+++ D:/ReactOS-Trunk/reactos/dll/win32/comctl32/treeview.c Sun Jun 15 18:27:14 2008
@@ -2826,8 +2826,6 @@
}
}
- TREEVIEW_UpdateScrollBars(infoPtr);
-
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
infoPtr->cdmode =
TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);