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

Method GetTotalWidthAndHeight

source/script_gui.cpp:5191–5207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5189
5190
5191void GuiType::GetTotalWidthAndHeight(LONG &aWidth, LONG &aHeight)
5192// Added for v1.0.44.13.
5193// Yields total width and height of entire window.
5194// If the window hasn't been shown for the first time, the caller wants COORD_CENTERED.
5195{
5196 if (mGuiShowHasNeverBeenDone)
5197 {
5198 aWidth = COORD_CENTERED;
5199 aHeight = COORD_CENTERED;
5200 return;
5201 }
5202 // Otherwise, mGuiShowHasNeverBeenDone==false, which should mean that mHwnd!=NULL.
5203 RECT rect;
5204 GetWindowRect(mHwnd, &rect);
5205 aWidth = rect.right - rect.left;
5206 aHeight = rect.bottom - rect.top;
5207}
5208
5209
5210

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected