SetFocus

 

Description

set window focus

Syntax

HWND SetFocus( HWND hWnd )

Parameters

hWnd
[input]the handle of the window to set focus on.

Return

The handle to the window that previously had the keyboard focus indicates success or NULL if hWnd parameter is invalid or not in queue.

Examples

EX1

int SetFocus_ex1()
{
    HWND hWndPrev = SetFocus(GetWindow());
    if(hWndPrev)
        return 1;
    
    return 0;            
}

Remark

sets focus to window

See Also

header to Include

origin.h

Reference