0

It is possible to set application-switching window as a Modal window (see definition)?

I mean, this window appears when I press Alt+Ctrl+Tab button at the same time and allows me navigate between opened applications typing "tab" key.

enter image description here

The problem appears when I push/click outside the window (Application-switching window lost focus and disappears).

Are there any way to avoid this problem in C++ MFC? I have tried calling:

CWnd* appSwitchingWnd = GetTopWindow();
appSwitchingWnd .SetFocus();

But it doesn't works...

I will appreciate any kind of help.

Developer Guy
  • 2,318
  • 6
  • 19
  • 37
Alberto Bricio
  • 402
  • 1
  • 6
  • 22
  • Unclear, what you are asking. Which aspect of the modality do you hope to implement? What scope of modality are you looking for? And is this really the problem you are trying to solve, or is it part of an [XY Problem](http://xyproblem.info)? – IInspectable Mar 21 '18 at 16:29
  • I'm trying performing app navigation with a touch screen keyboard pressing Alt+tab – Alberto Bricio Mar 21 '18 at 16:34
  • So what you are **really** trying accomplish is to prevent the touch keyboard from taking focus, right? That's a different question. – IInspectable Mar 21 '18 at 16:44
  • Not exactly, what I pretend to do is that the app-switching window never lost the focus, because the user could touch on another window (Desktop for example) and the app-switching window disappears. – Alberto Bricio Mar 21 '18 at 16:49
  • 3
    Yes. And that is perfectly fine. That's what the user expects. It's the standard design of the app switching application. – IInspectable Mar 21 '18 at 16:50
  • You're right, nevertheless what I am looking for is the same behaviour that windows osk (example: if you open in CMD `osk` and type ALT+TAB, app switching window doesn't lost focus by clicking). I don't know if there are any way to do the same. Thanks beforehand. – Alberto Bricio Mar 22 '18 at 09:42
  • Sorry I hadn't understand truly real problem... maybe you're right and prevent touch keyboard from taking focus is a good solution. Are there any way to do that? Thanks – Alberto Bricio Mar 22 '18 at 09:57
  • [How can I have a window that rejects activation but still receives pointer input?](https://blogs.msdn.microsoft.com/oldnewthing/20160912-00/?p=94295) – IInspectable Mar 23 '18 at 09:09

0 Answers0