MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ControlGetBkColor

Method ControlGetBkColor

source/script_gui.cpp:9853–9882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9851
9852
9853void GuiType::ControlGetBkColor(GuiControlType &aControl, bool aUseWindowColor, HBRUSH &aBrush, COLORREF &aColor)
9854{
9855 if (aControl.background_color != CLR_INVALID)
9856 {
9857 aBrush = aControl.background_brush;
9858 aColor = aControl.background_color;
9859 }
9860 else if (aUseWindowColor)
9861 {
9862 // If this static control both belongs to a tab control and is within its physical boundaries,
9863 // match its background to the tab control's. This is only necessary if the tab control has
9864 // the +/-Background option, since otherwise its background would be the same as the window's:
9865 if (GuiControlType *tab_control = ControlOverrideBkColor(aControl))
9866 {
9867 aBrush = tab_control->background_brush;
9868 aColor = tab_control->background_color;
9869 }
9870 else
9871 {
9872 aBrush = mBackgroundBrushWin;
9873 aColor = mBackgroundColorWin;
9874 }
9875 }
9876 else
9877 {
9878 // Caller requires these initialised.
9879 aBrush = NULL;
9880 aColor = CLR_DEFAULT;
9881 }
9882}
9883
9884
9885

Callers 3

GuiWindowProcFunction · 0.80
TabWindowProcFunction · 0.80
TabDialogProcFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected