HDWP BeginDeferWindowPos(cWindows) | |||||
int cWindows; | /* number of windows | */ |
The BeginDeferWindowPos function allocates memory for a multiple window-position data structure and returns a handle to the structure.
cWindows
Specifies the initial number of windows for which position information to store in the structure. The DeferWindowPos function increases the size of the structure if necessary.
The return value identifies the multiple window-position structure. The return value is NULL if system resources are not available to allocate the structure.
The DeferWindowPos function fills this structure with information about the target position for a window that is about to be moved. The EndDeferWindowPos function accepts this structure and instantaneously repositions the windows using the information stored in the structure.
If any of the windows in the multiple window-position structure have the SWP_HIDEWINDOW flag set, none of the windows will be repositioned.
If Windows must increase the size of the internal structure beyond the initial size specified by the cWindows parameter but cannot allocate the enough memory to do so, Windows fails the entire Begin/Defer/End window positioning sequence. By specifying the maximum size needed, an application can detect and handle failure early in the process.
DeferWindowPos, EndDeferWindowPos