mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-11-17 15:38:45 +00:00
18 lines
440 B
C++
18 lines
440 B
C++
#include "UIHelpers.h"
|
|
#include <CDebug.h>
|
|
|
|
WidgetPositioner::~WidgetPositioner()
|
|
{
|
|
if (!EndDeferWindowPos(hdwp))
|
|
DEBUG_ERROR_HR(GetLastError(), "EndDeferWindowPos");
|
|
}
|
|
|
|
void WidgetPositioner::move(HWND child, int x, int y, int cx, int cy)
|
|
{
|
|
HDWP next = DeferWindowPos(hdwp, child, nullptr, x, y, cx, cy, SWP_NOACTIVATE | SWP_NOZORDER);
|
|
if (next)
|
|
hdwp = next;
|
|
else
|
|
DEBUG_ERROR_HR(GetLastError(), "DeferWindowPos");
|
|
}
|