Reference/FindWindow

From NSIS Wiki
Jump to navigationJump to search

FindWindow

user_var(hwnd output) windowclass [windowtitle] [windowparent] [childafter]

Searches for a window. Behaves like the win32 FindWindowEx(). Searches by windowclass (and/or windowtitle if specified). If windowparent or childafter are specified, the search will be restricted as such. If windowclass or windowtitle is specified as "", they will not be used for the search. If the window is not found, the user variable returned is 0. To accomplish old-style FindWindow behavior, use FindWindow with SendMessage.

FindWindow $0 "#32770" "" $HWNDPARENT
FindWindow $0 "my window class" "my window title"