Platform SDK: DirectX |
The IDirectDraw7::TestCooperativeLevel method reports the current cooperative-level status of the DirectDraw device for a windowed or full-screen application.
HRESULT TestCooperativeLevel(void);
None.
If the method succeeds, the return value is DD_OK, indicating that the calling application can continue.
If it fails, the method can return one of the following error values (see Remarks):
DDERR_INVALIDOBJECT |
DDERR_EXCLUSIVEMODEALREADYSET |
DDERR_NOEXCLUSIVEMODE |
DDERR_WRONGMODE |
This method is particularly useful to applications that use the WM_ACTIVATEAPP and WM_DISPLAYCHANGE system messages as a notification to restore surfaces or recreate DirectDraw objects. The DD_OK return value always indicates that the application can continue, but the error codes are interpreted differently, depending on the cooperative level that the application uses. For more information, see Testing Cooperative Levels.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in ddraw.h.