| 1255 | |
| 1256 | |
| 1257 | void GuiType::ControlSetTextColor(GuiControlType &aControl, COLORREF aColor) |
| 1258 | { |
| 1259 | switch (aControl.type) |
| 1260 | { |
| 1261 | case GUI_CONTROL_LISTVIEW: |
| 1262 | // Although MSDN doesn't say, ListView_SetTextColor() appears to support CLR_DEFAULT. |
| 1263 | ListView_SetTextColor(aControl.hwnd, aColor); |
| 1264 | break; |
| 1265 | case GUI_CONTROL_TREEVIEW: |
| 1266 | // Must pass -1 rather than CLR_DEFAULT for TreeView controls. |
| 1267 | TreeView_SetTextColor(aControl.hwnd, aColor == CLR_DEFAULT ? -1 : aColor); |
| 1268 | break; |
| 1269 | case GUI_CONTROL_DATETIME: |
| 1270 | ControlSetMonthCalColor(aControl, aColor, DTM_SETMCCOLOR); |
| 1271 | break; |
| 1272 | case GUI_CONTROL_MONTHCAL: |
| 1273 | ControlSetMonthCalColor(aControl, aColor, MCM_SETCOLOR); |
| 1274 | break; |
| 1275 | default: |
| 1276 | if (aControl.UsesUnionColor()) // For maintainability. Overlaps with previous checks. |
| 1277 | aControl.union_color = aColor; // Used by WM_CTLCOLORSTATIC et. al. for some types of controls. |
| 1278 | break; |
| 1279 | } |
| 1280 | } |
| 1281 | |
| 1282 | |
| 1283 | void GuiType::ControlSetMonthCalColor(GuiControlType &aControl, COLORREF aColor, UINT aMsg) |
nothing calls this directly
no test coverage detected