mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-12-13 19:48:13 +00:00
[idd] helper/resize: move logic to .cpp and add error checking
This commit is contained in:
17
idd/LGIddHelper/UIHelpers.cpp
Normal file
17
idd/LGIddHelper/UIHelpers.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#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");
|
||||
}
|
||||
Reference in New Issue
Block a user