2

I'm working on a game using DirectX and WinApi. While in windowed mode, everything works fine, either Alt+Tabing or clicking outside of a game window sends WM_KILLFOCUS message. But while in fullscreen, Alt+Tab does not send the said message.

Is this the matter of setting some parameters of D3D renderer? How can I resolve this problem?

mag_zbc
  • 6,801
  • 14
  • 40
  • 62

1 Answers1

3

I think that fullscreen DX applications simply do not have focus. Probably you can use WM_ACTIVATE instead. It will get in wParam the values WA_ACTIVE or WA_CLICKACTIVE for activation, or WM_INACTIVE for deactivation.

rodrigo
  • 94,151
  • 12
  • 143
  • 190