The DrvSetPixelFormat function sets the pixel format of a window.
Pointer to the SURFOBJ structure with which the window is associated.
Index that specifies the device format to which the pixel format is to be set. The pixel formats that a device supports are identified by positive one-based integer indices starting at 1.
Handle to the window whose pixel format is to be set.
The return value is TRUE if the function is successful. Otherwise, it is FALSE, and an error code is logged.
Setting the pixel format more than once can result in complications for Window Manager and for multithreaded applications. Consequently, the pixel format of a window can be set only once and must remain unchanged.