Direct3D Fullscreen Secondary Monitor

Started by
0 comments, last by circlesoft 17 years ago
Hi, I am currently developing an application which runs on a system with two attached monitors. The primary monitor displays the Windows desktop and any user applications required (such as Microsoft Access, Visual Basic 6.0 Programs, etc.) The secondary monitor displays a Direct3D enabled device which periodically refreshes itself from a database. Direct3D is used to present information in an exciting way for its audience. Running the Direct3D device in windowed mode is too slow and jerky. However when the secondary device is run in fullscreen exclusive mode it runs perfectly. The problem that I am experiencing is that if the user clicks on the primary monitor (i.e. to change the database or interact with Windows itself) the display minimizes immediately from the secondary monitor. Having undertaken various tests I found the Windows message WM_NCACTIVATE seemed to be the prime source of the problem, and so I chose to simply filter the message out. Whilst I understand that this is not the best solution, it did seem to solve the problem. However, sometimes the device still minimizes despite this message being ignored. Using the Microsoft Spy++ tool I have tried eliminating all other messages which were fired in between, and filtering these messages does not solve the problem. The application hosting the Direct3D device does not require any form of user input at any time. The application has been developed using Microsoft Visual C# and the Managed DirectX SDK. I found that by adding the CreateFlags.NoWindowChanges flag it does in fact prevent the device from minimizing when it looses focus. However, instead the device goes black until the device's parent window regains focus. I feel that my solution could lie around this point, but somehow I need to forve Direct3D to maintain its exclusive fullscreen display mode. No other Direct3D devices are intended to be used on the system, and if any devices are instantiated, they do not need to be honoured, instead they could simply crash out if need be. Somehow I need to prevent the device from being minimized. As I say, ignoring the WM_NCACTIVATE message solves the problem most of the time; however sometimes it still minimizes. I have been exploring the Internet for quite some time now trying to resolve this problem and have been unable to find anything of any use. Any help would be very greatly appreciated. Lea Hayes
Advertisement
Here is just an idea for you to try - this isn't a fix but may help you determine if the messages D3D is handling are the source of your problems, or if it is something else. Go to the Direct3D debug properties and check 'Enable Multi-mon Debugging'. This should let you click outside of fullscreen apps without losing focus.

Like I said, you won't be able to do this normally (since this uses the debug runtimes), but it may be a useful thing to try.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement