- Remove a call to TREEVIEW_Update() which causes an infinite loop on ReactOS. Now...
[reactos.git] / reactos / dll / win32 / comctl32 / comctl32_ros.diff
1 Index: listview.c
2 ===================================================================
3 --- listview.c (revision 23123)
4 +++ listview.c (working copy)
5 @@ -3805,9 +3805,8 @@
6 if (himl && lvItem.iImage >= 0 && !IsRectEmpty(&rcIcon))
7 {
8 TRACE("iImage=%d\n", lvItem.iImage);
9 + ImageList_Draw(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
10 + (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus) ? ILD_SELECTED : ILD_NORMAL);
11 - ImageList_DrawEx(himl, lvItem.iImage, hdc, rcIcon.left, rcIcon.top,
12 - rcIcon.right - rcIcon.left, rcIcon.bottom - rcIcon.top, infoPtr->clrBk, CLR_DEFAULT,
13 - (lvItem.state & LVIS_SELECTED) && (infoPtr->bFocus) ? ILD_SELECTED : ILD_NORMAL);
14 }
15
16 /* Don't bother painting item being edited */
17 Index: propsheet.c
18 ===================================================================
19 --- propsheet.c (revision 25766)
20 +++ propsheet.c (working copy)
21 @@ -2434,6 +2434,28 @@
22 return FALSE;
23 }
24
25 +BOOL CALLBACK
26 +EnumChildProc(HWND hwnd, LPARAM lParam)
27 +{
28 + WCHAR szType[20];
29 + RealGetWindowClassW(hwnd, szType, 20);
30 +
31 + if (strcmpW(szType, WC_EDITW) == 0)
32 + {
33 + if (IsWindowEnabled(hwnd) && IsWindowVisible(hwnd))
34 + {
35 + SetFocus(hwnd);
36 + return FALSE;
37 + }
38 + }
39 + else
40 + {
41 + EnumChildWindows(hwnd, EnumChildProc, 0);
42 + }
43 +
44 + return TRUE;
45 +}
46 +
47 /******************************************************************************
48 * PROPSHEET_SetWizButtons
49 *
50 @@ -2456,17 +2478,6 @@
51 EnableWindow(hwndNext, FALSE);
52 EnableWindow(hwndFinish, FALSE);
53
54 - /* set the default pushbutton to an enabled button */
55 - if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
56 - SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
57 - else if (dwFlags & PSWIZB_NEXT)
58 - SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
59 - else if (dwFlags & PSWIZB_BACK)
60 - SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
61 - else
62 - SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
63 -
64 -
65 if (dwFlags & PSWIZB_BACK)
66 EnableWindow(hwndBack, TRUE);
67
68 @@ -2496,6 +2507,32 @@
69 }
70 else if (!(dwFlags & PSWIZB_DISABLEDFINISH))
71 EnableWindow(hwndFinish, TRUE);
72 +
73 + /* set the default pushbutton to an enabled button and give it focus */
74 + if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH))
75 + {
76 + SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0);
77 + SetFocus(hwndFinish);
78 + }
79 + else if (dwFlags & PSWIZB_NEXT)
80 + {
81 + SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0);
82 + SetFocus(hwndNext);
83 + }
84 + else if (dwFlags & PSWIZB_BACK)
85 + {
86 + SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0);
87 + SetFocus(hwndBack);
88 + }
89 + else
90 + {
91 + SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0);
92 + SetFocus(GetDlgItem(hwndDlg, IDCANCEL));
93 + }
94 +
95 + /* Now try to find an edit control that deserves focus */
96 + EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, 0);
97 +
98 }
99
100 /******************************************************************************
101 Index: tooltips.c
102 ===================================================================
103 --- tooltips.c (revision 25790)
104 +++ tooltips.c (working copy)
105 @@ -2446,7 +2446,34 @@
106 TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam)
107 {
108 FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam);
109 + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd);
110 + TTTOOL_INFO *toolPtr = infoPtr->tools;
111 + INT nResult;
112
113 + if (lParam == NF_QUERY)
114 + {
115 + if (toolPtr->bNotifyUnicode)
116 + {
117 + return NFR_UNICODE;
118 + } else {
119 + return NFR_ANSI;
120 + }
121 + }
122 + else if (lParam == NF_REQUERY)
123 + {
124 + nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
125 + (WPARAM)hwnd, (LPARAM)NF_QUERY);
126 + if (nResult == NFR_ANSI) {
127 + toolPtr->bNotifyUnicode = FALSE;
128 + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
129 + } else if (nResult == NFR_UNICODE) {
130 + toolPtr->bNotifyUnicode = TRUE;
131 + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
132 + } else {
133 + TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
134 + }
135 + return nResult;
136 + }
137 return 0;
138 }
139
140 Index: treeview.c
141 ===================================================================
142 --- treeview.c (revision 27134)
143 +++ treeview.c (working copy)
144 @@ -2839,8 +2839,6 @@
145 }
146 }
147
148 - TREEVIEW_UpdateScrollBars(infoPtr);
149 -
150 if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
151 infoPtr->cdmode =
152 TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);