Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

GetFocus

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function retrieves the handle to the keyboard focus window associated with the thread that called the function.


HWND GetFocus(void);

None.

The handle to the window with the keyboard focus indicates success. NULL indicates that the calling thread's message queue does not have an associated window with the keyboard focus.

Even if GetFocus returns NULL, another thread's queue may be associated with a window that has the keyboard focus.

Use the GetForegroundWindow function to retrieve the handle to the window with which the user is currently working.

Headerwinuser.h
LibraryCaret.lib, Foregnd.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft