PRB: Screen Goes Black When Using DirectDraw With Multiple Monitors (305158)
The information in this article applies to:
- Microsoft DirectX Software Development Kit 7.0, when used with:
- the operating system: Microsoft Windows 98
- the operating system: Microsoft Windows 98 Second Edition
This article was previously published under Q305158 SYMPTOMS
The primary screen goes black when you call SetCooperativeLevel on a secondary monitor when you are using full-screen, exclusive mode in DirectDraw. If you are calling SetCooperativeLevel to go into full-screen, exclusive mode on a secondary monitor and that monitor is not attached to the desktop, the primary monitor will be covered by a full-screen, topmost black window.
CAUSE
When you call SetCooperativeLevel with the DDSCL_FULLSCREEN and DDSCL_EXCLUSIVE flags, a window must be specified in the first parameter. Each device that is to hold a full-screen DirectDraw surface must be represented by a DirectDraw object and a device window. A device window will be created by DirectDraw when you call SetCooperativeLevel with the DDSCL_CREATEDEVICEWINDOW flag. The device window will be sized to fit the screen and appear on top of all other windows. Because the secondary monitor is not attached to the desktop, Windows cannot draw the device window on that monitor and continues to draw the window on the primary monitor, filling up the screen.
RESOLUTION
The recommended way to work around to this problem is to always attach any monitor that will use DirectDraw to the desktop. If, however, you want to have a nonprimary monitor detached from the desktop, then you must hide all device windows created through the use of the ShowWindow(hwnd, SW_HIDE) call.
Modification Type: | Minor | Last Reviewed: | 4/4/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbDirectDraw kbdisplay kbGDI kbMultiMon kbprb KB305158 |
---|
|