DrvSetPixelFormat

BOOL DrvSetPixelFormat(

    IN SURFOBJ *pso,

    IN LONG iPixelFormat,

    IN ULONG hwnd

   );

DrvSetPixelFormat sets the pixel format of a window.

Parameters

pso
Points to the SURFOBJ with which the window is associated.
iPixelFormat
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.
hwnd
Identifies the window whose pixel format is to be set.

Return Value

The return value is TRUE if the function is successful. Otherwise, it is FALSE, and an error code is logged.

Comments

Setting the pixel format more than once can result in complications for the Window Manager and for multi-threaded applications. Consequently, the pixel format of a window can be set only once and must remain unchanged.

See Also

DrvDescribePixelFormat, SURFOBJ