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

Method ControlInitOptions

source/script_gui.cpp:6814–6833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6812
6813
6814void GuiType::ControlInitOptions(GuiControlOptionsType &aOpt, GuiControlType &aControl)
6815// Not done as class to avoid code-size overhead of initializer list, etc.
6816{
6817 ZeroMemory(&aOpt, sizeof(GuiControlOptionsType));
6818 if (aControl.type == GUI_CONTROL_LISTVIEW) // Since this doesn't have the _add and _remove components, must initialize.
6819 {
6820 if (aControl.hwnd)
6821 aOpt.listview_style = ListView_GetExtendedListViewStyle(aControl.hwnd); // Will have no effect on 95/NT4 that lack comctl32.dll 4.70+ distributed with MSIE 3.x
6822 aOpt.listview_view = -1; // Indicate "unspecified" so that changes can be detected.
6823 }
6824 aOpt.x = aOpt.y = aOpt.width = aOpt.height = COORD_UNSPECIFIED;
6825 aOpt.color = CLR_INVALID;
6826 aOpt.color_bk = CLR_INVALID;
6827 // Above: If it stays unaltered, CLR_INVALID means "leave color as it is". This is for
6828 // use with "GuiControl, +option" so that ControlSetProgressOptions() and others know that
6829 // the "+/-Background" item was not among the options in the list. The reason this is needed
6830 // for background color but not bar color is that bar_color is stored as a control attribute,
6831 // but to save memory, background color is not. In addition, there is no good way to ask a
6832 // progress control what its background color currently is.
6833}
6834
6835
6836

Callers 1

InvokeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected