Fullscreen on 2nd monitor in DX8: lost kb focus forces app to minimize

Started by
0 comments, last by Geissomatik 21 years, 8 months ago
I''m writing a DirectX 8 app that is almost ready for multiple monitor setups. The only problem remaining is that when I have the app running fullscreen/exclusive on one adapter (monitor), and then click on something on the other monitor, the app automatically minimizes. I''d like it to just nicely relinquish the keyboard focus *and keep running (fullscreen) on the second monitor*, but I can''t seem to convince it to do that. Has anyone run into this before? As a workaround I''ve implemented a ''fake'' fullscreen mode, which makes a window that takes up the entire monitor area, but doesn''t really run in windowed mode. This works fairly well, but I''d prefer to get it working without this hack... Thanks in advance... Ryan Geiss
Advertisement
A special thanks goes out to Phil Taylor (leader of the team responsible for the wonderful MS DirectX 8 SDK) for helping me solve this one. I was at Siggraph last week and Phil and I and some other guys were walking around San Antonio quite late at night, and I hit him with this question. He nailed it. Here''s what he said to do:

1) make sure I''m using HWND_TOPMOST for my window
(when fullscreen; I was only using HWND_TOP before).

2) return 0 when you receive the WM_NCACTIVATE (or
possibly WM_ACTIVATE or WM_ACTIVATEAPP) message
and the wParam is 0 (a deactivate).

The combination worked; I''d tried both independently, but not together, but you need them both the make it go. There you have it...

Thanks Phil, you rock.

Cheers,
Ryan Geiss
Nullsoft, Inc.

http://www.geisswerks.com/
http://www.nullsoft.com/
http://www.winamp.com/

This topic is closed to new replies.

Advertisement