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

Method ControlRedraw

source/script_gui.cpp:2086–2102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2084
2085
2086void GuiType::ControlRedraw(GuiControlType &aControl, bool aOnlyWithinTab)
2087{
2088 if ( !aOnlyWithinTab
2089 || FindTabControl(aControl.tab_control_index) && IsWindowVisible(aControl.hwnd) )
2090 {
2091 RECT rect;
2092 GetWindowRect(aControl.hwnd, &rect); // Limit it to only that part of the client area that is receiving the rect.
2093 MapWindowPoints(NULL, mHwnd, (LPPOINT)&rect, 2); // Convert rect to client coordinates (not the same as GetClientRect()).
2094 InvalidateRect(mHwnd, &rect, TRUE); // Seems safer to use TRUE, not knowing all possible overlaps, etc.
2095 //Overkill: InvalidateRect(mHwnd, NULL, FALSE); // Erase doesn't seem to be necessary.
2096 // None of the following is enough:
2097 //Changes focused control, so no good: ControlUpdateCurrentTab(*tab_control, false);
2098 //RedrawWindow(tab_control->hwnd, NULL, NULL, 0 ..or.. RDW_INVALIDATE);
2099 //InvalidateRect(aControl.hwnd, NULL, TRUE);
2100 //InvalidateRect(tab_control->hwnd, NULL, TRUE);
2101 }
2102}
2103
2104
2105

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected