GetActiveWindow will return the top-level window that is associated with the input focus. GetFocus will return the handle of the window that has the input focus.
This article might help:
http://www.microsoft.com/msj/0397/Win32/Win320397.aspx
More Related Contents:
- DLLImport of the origin function in the DLL
- How to detect true Windows version?
- Is an atomic file rename (with overwrite) possible on Windows?
- Show touch keyboard (TabTip.exe) in Windows 10 Anniversary edition
- Is there any way to detect the monitor state in Windows (on or off)?
- Where can I find my .emacs file for Emacs running on Windows?
- Good or evil – SetParent() win32 API between different processes
- What exactly are DLL files, and how do they work?
- Windows Visual Themes: Gallery of Parts and States?
- Which Font is the default for MFC Dialog Controls?
- Power off an USB device in software on Windows
- Privileges/owner issue when writing in C:\ProgramData\
- How can I get a list of all open named pipes in Windows?
- What is the smallest possible Windows (PE) executable?
- Programmatically change screen resolution?
- windows – How to enumerate all connected USB devices’ device path?
- How do you programmatically resize and move windows with the Windows API?
- Determine Intel HD Graphics Card Version Via WinAPI
- How can I invalidate the file system cache?
- How to identify Windows 10 background store processes that have non-displayed windows that are programmatically visible and minimizable?
- Windows CDROM Eject
- Check if a Win32 thread is running or in a suspended state
- How to change default sound playback device programmatically?
- create process in user session from service
- Gracefully Exit Explorer (Programmatically)
- How can I programmatically refresh Windows Explorer?
- How to create a virtual printer in Windows?
- How can I detect Windows 8.1 in a Desktop application
- What is the range of a Windows HANDLE on a 64 bits application?
- What are these strange environment variables?