CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    Find last active Window

    I has a very small dialog based appliaction that works as a keyboard it is used on computers with touch screens where no keyboard is attached. The problem is that I want the input to be redirected to the application/window that were active just before the application with the keyboard - and this other application could change. The keyboard application is placed as a topmost window (acts like Taskmanager in Win NT), which the application receiving the keyboard event is not always. I found the found the method CWnd::OnActivateApp which seems to work (it is called each time I activate the app), but I need to have an HWND to the window that were active just before eg. the window containing Notepad - any suggestions of how to get that handle ?



  2. #2
    Join Date
    May 1999
    Posts
    17

    Re: Find last active Window

    Perhaps....It might be possible to enumerate all the windows ('EnumWindows') and determine correct window by its window z-order.

    I am not sure. It is just a suggestion.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured