mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:22:57 +00:00
Reapply ros specific hack to stop the treeview scrollbars from continuous painting. I don't have time to look for the real bug at the moment.
Also add Timo's propsheet and tooltip fixes svn path=/trunk/; revision=38894
This commit is contained in:
parent
a4b40ce979
commit
a446ba6dc9
4 changed files with 106 additions and 34 deletions
|
@ -1,8 +1,8 @@
|
||||||
Index: propsheet.c
|
Index: propsheet.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- propsheet.c (revision 25766)
|
--- propsheet.c (revision 38890)
|
||||||
+++ propsheet.c (working copy)
|
+++ propsheet.c (working copy)
|
||||||
@@ -2431,6 +2431,28 @@
|
@@ -2417,6 +2417,29 @@
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,11 +27,12 @@ Index: propsheet.c
|
||||||
+
|
+
|
||||||
+ return TRUE;
|
+ return TRUE;
|
||||||
+}
|
+}
|
||||||
|
+
|
||||||
+
|
+
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* PROPSHEET_SetWizButtons
|
* PROPSHEET_SetWizButtons
|
||||||
*
|
*
|
||||||
@@ -2453,17 +2475,6 @@
|
@@ -2438,17 +2461,6 @@
|
||||||
EnableWindow(hwndNext, FALSE);
|
EnableWindow(hwndNext, FALSE);
|
||||||
EnableWindow(hwndFinish, FALSE);
|
EnableWindow(hwndFinish, FALSE);
|
||||||
|
|
||||||
|
@ -49,7 +50,7 @@ Index: propsheet.c
|
||||||
if (dwFlags & PSWIZB_BACK)
|
if (dwFlags & PSWIZB_BACK)
|
||||||
EnableWindow(hwndBack, TRUE);
|
EnableWindow(hwndBack, TRUE);
|
||||||
|
|
||||||
@@ -2493,6 +2504,32 @@
|
@@ -2478,6 +2490,31 @@
|
||||||
}
|
}
|
||||||
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||||
EnableWindow(hwndFinish, TRUE);
|
EnableWindow(hwndFinish, TRUE);
|
||||||
|
@ -78,41 +79,40 @@ Index: propsheet.c
|
||||||
+
|
+
|
||||||
+ /* Now try to find an edit control that deserves focus */
|
+ /* Now try to find an edit control that deserves focus */
|
||||||
+ EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0);
|
+ EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0);
|
||||||
+
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
Index: tooltips.c
|
Index: tooltips.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- tooltips.c (revision 25790)
|
--- tooltips.c (revision 38890)
|
||||||
+++ tooltips.c (working copy)
|
+++ tooltips.c (working copy)
|
||||||
@@ -2486,7 +2486,34 @@
|
@@ -2488,8 +2488,33 @@
|
||||||
|
static LRESULT
|
||||||
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
- FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
||||||
+ TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
+ TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
+ TTTOOL_INFO *toolPtr = infoPtr->tools;
|
+ TTTOOL_INFO *toolPtr = infoPtr->tools;
|
||||||
+ INT nResult;
|
+ INT nResult;
|
||||||
|
|
||||||
+ if (lParam == NF_QUERY)
|
+ TRACE("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
||||||
+ {
|
+
|
||||||
+ if (toolPtr->bNotifyUnicode)
|
+ if (lParam == NF_QUERY) {
|
||||||
+ {
|
+ if (toolPtr->bNotifyUnicode) {
|
||||||
+ return NFR_UNICODE;
|
+ return NFR_UNICODE;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ return NFR_ANSI;
|
+ return NFR_ANSI;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ else if (lParam == NF_REQUERY)
|
+ else if (lParam == NF_REQUERY) {
|
||||||
+ {
|
|
||||||
+ nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
|
+ nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
|
||||||
+ (WPARAM)hwnd, (LPARAM)NF_QUERY);
|
+ (WPARAM)hwnd, (LPARAM)NF_QUERY);
|
||||||
+ if (nResult == NFR_ANSI) {
|
+ if (nResult == NFR_ANSI) {
|
||||||
+ toolPtr->bNotifyUnicode = FALSE;
|
+ toolPtr->bNotifyUnicode = FALSE;
|
||||||
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
|
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
|
||||||
+ } else if (nResult == NFR_UNICODE) {
|
+ } else if (nResult == NFR_UNICODE) {
|
||||||
+ toolPtr->bNotifyUnicode = TRUE;
|
+ toolPtr->bNotifyUnicode = TRUE;
|
||||||
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
|
+ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
|
||||||
+ } else {
|
+ } else {
|
||||||
+ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
|
+ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
|
||||||
+ }
|
+ }
|
||||||
|
@ -123,14 +123,19 @@ Index: tooltips.c
|
||||||
|
|
||||||
Index: treeview.c
|
Index: treeview.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- D:/Wine-CVS/wine/dlls/comctl32/treeview.c Sun Jun 15 18:29:21 2008
|
--- treeview.c (revision 38890)
|
||||||
+++ D:/ReactOS-Trunk/reactos/dll/win32/comctl32/treeview.c Sun Jun 15 18:27:14 2008
|
+++ treeview.c (working copy)
|
||||||
@@ -2826,8 +2826,6 @@
|
@@ -2830,7 +2830,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- TREEVIEW_UpdateScrollBars(infoPtr);
|
- TREEVIEW_UpdateScrollBars(infoPtr);
|
||||||
-
|
+ //
|
||||||
|
+ // This is correct, but is causes and infinite loop of WM_PAINT messages, resulting
|
||||||
|
+ // in continuous painting of the scroll bar in reactos. Comment out until the real
|
||||||
|
+ // bug is found
|
||||||
|
+ //
|
||||||
|
+ //TREEVIEW_UpdateScrollBars(infoPtr);
|
||||||
|
|
||||||
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
|
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
|
||||||
infoPtr->cdmode =
|
infoPtr->cdmode =
|
||||||
TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);
|
|
||||||
|
|
|
@ -2417,6 +2417,29 @@ static BOOL PROPSHEET_RemovePage(HWND hwndDlg,
|
||||||
return FALSE;
|
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
|
* PROPSHEET_SetWizButtons
|
||||||
*
|
*
|
||||||
|
@ -2438,17 +2461,6 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
EnableWindow(hwndNext, FALSE);
|
EnableWindow(hwndNext, FALSE);
|
||||||
EnableWindow(hwndFinish, 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)
|
if (dwFlags & PSWIZB_BACK)
|
||||||
EnableWindow(hwndBack, TRUE);
|
EnableWindow(hwndBack, TRUE);
|
||||||
|
|
||||||
|
@ -2478,6 +2490,31 @@ static void PROPSHEET_SetWizButtons(HWND hwndDlg, DWORD dwFlags)
|
||||||
}
|
}
|
||||||
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
|
||||||
EnableWindow(hwndFinish, TRUE);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -2488,8 +2488,33 @@ TOOLTIPS_NCHitTest (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
|
||||||
|
TTTOOL_INFO *toolPtr = infoPtr->tools;
|
||||||
|
INT nResult;
|
||||||
|
|
||||||
|
TRACE("hwnd=%p wParam=%lx lParam=%lx\n", hwnd, wParam, lParam);
|
||||||
|
|
||||||
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2830,7 +2830,12 @@ TREEVIEW_Refresh(TREEVIEW_INFO *infoPtr, HDC hdc, const RECT *rc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TREEVIEW_UpdateScrollBars(infoPtr);
|
//
|
||||||
|
// This is correct, but is causes and infinite loop of WM_PAINT messages, resulting
|
||||||
|
// in continuous painting of the scroll bar in reactos. Comment out until the real
|
||||||
|
// bug is found
|
||||||
|
//
|
||||||
|
//TREEVIEW_UpdateScrollBars(infoPtr);
|
||||||
|
|
||||||
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
|
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
|
||||||
infoPtr->cdmode =
|
infoPtr->cdmode =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue