BeginDeferWindowPos

3.0

  HDWP BeginDeferWindowPos(cWindows)    
  int cWindows; /* number of windows, */  

The BeginDeferWindowPos function returns a handle of an internal 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 a handle of this structure and instantaneously repositions the windows by using the information stored in the structure.

Parameters

cWindows

Specifies the initial number of windows for which to store position information in the structure. The DeferWindowPos function increases the size of the structure if necessary.

Return Value

The return value identifies the internal structure if the function is successful. Otherwise, it is NULL.

Comments

If Windows must increase the size of the internal structure beyond the initial size specified by the cWindows parameter but cannot allocate 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.

See Also

DeferWindowPos, EndDeferWindowPos