MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / goToCenter

Method goToCenter

pluginManager/src/ProgressDialog.cpp:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void ProgressDialog::goToCenter()
96{
97 RECT rc;
98 HWND hParent = ::GetParent(_hSelf);
99 ::GetClientRect(hParent, &rc);
100 POINT center;
101 center.x = rc.left + (rc.right - rc.left)/2;
102 center.y = rc.top + (rc.bottom - rc.top)/2;
103 ::ClientToScreen(hParent, &center);
104
105 RECT wrc;
106 ::GetWindowRect(_hSelf, &wrc);
107 int x = center.x - (wrc.right - wrc.left)/2;
108 int y = center.y - (wrc.bottom - wrc.top)/2;
109
110 ::SetWindowPos(_hSelf, HWND_TOP, x, y, wrc.right - wrc.left, wrc.bottom - wrc.top, SWP_SHOWWINDOW);
111}
112
113
114void ProgressDialog::setStepCount(int stepCount)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected