Class DeferWindowPosHandle
- Namespace
- Whim
- Assembly
- Whim.dll
Sets the position of multiple windows at once, using SetWindowPos(HWND, HWND, int, int, int, int, SET_WINDOW_POS_FLAGS).
This internally calls SetWindowPos(HWND, HWND, int, int, int, int, SET_WINDOW_POS_FLAGS) to set the position of the window. Each call occurs in parallel.
When the system has non-100% scaled monitors, for some reason we need to set the window position twice, otherwise windows will have incorrect dimensions.
This internally calls SetWindowPos(HWND, HWND, int, int, int, int, SET_WINDOW_POS_FLAGS) to set the position of the window. Each call occurs in parallel.
When the system has non-100% scaled monitors, for some reason we need to set the window position twice, otherwise windows will have incorrect dimensions.
public sealed class DeferWindowPosHandle : IDisposable
- Inheritance
-
DeferWindowPosHandle
- Implements
- Inherited Members
Methods
DeferWindowPos(DeferWindowPosState, bool)
Adds a window to set the position of when this DeferWindowPosHandle disposes.
public void DeferWindowPos(DeferWindowPosState posState, bool forceTwoPasses = false)
Parameters
posState
DeferWindowPosState- The state of the window to set.
forceTwoPasses
bool- Window scaling can be finicky. Whim will set a window's position twice for windows in monitors with non-100% scaling. Regardless of this, some windows need this even for windows with 100% scaling.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()