Sometimes applications display reports, when the window title depends on server, ip, date an time, report type etc. you can’t predict what will be the window title, only during runtime. I met this issue when an application display several reports types after selecting a menu item. my task is to verify that the window was …
Category Archive: Windows
Apr 01 2008
Find a Window
The FindWindow function retrieves a handle to the top-level window whose class name and window name match the specified strings. This function does not search child windows. This function does not perform a case-sensitive search. API syntax : HWND FindWindow( LPCTSTR lpClassName, LPCTSTR lpWindowName ); Parameters : lpClassName – [in] string that specifies the class …
Apr 01 2008
Forcibly Close a Specified Window
The EndTask function is called to forcibly close a specified window. API syntax : BOOL EndTask( HWND hWnd, BOOL fShutDown, BOOL fForce ); Parameters : hWnd – [in] Handle to the window to be closed. fShutDown – [in] Ignored. Must be FALSE. fForce – [in] A TRUE for this parameter will force the destruction of …
Apr 01 2008
Minimizing a Window
The CloseWindow function minimizes (but does not destroy) the specified window. API syntax : BOOL CloseWindow( HWND hWnd ); Parameters : hWnd – [in] Handle to the window to be minimized. Return Value : If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. Extern.Declare micInteger, “CloseWindow”, …
Apr 01 2008
Switching Focus between Windows
The SwitchToThisWindow function is called to switch focus to a specified window and bring it to the foreground. API Syntax : VOID SwitchToThisWindow( HWND hWnd, BOOL fAltTab ); Parameters : hwnd – Handle to the window being switched to. fAltTab – A TRUE for this parameter indicates that the window is being switched to using …
Apr 01 2008
Determine whether a Window is Maximized
The IsZoomed function determines whether a window is maximized. API Syntax : BOOL IsZoomed( HWND hWnd ); Parameters : hWnd – [in] Handle to the window to test. Return Value : If the window is zoomed, the return value is nonzero. If the window is not zoomed, the return value is zero. Extern.Declare micInteger, “IsZoomed”, …
Apr 01 2008
Determine whether a Specified Window is Minimized
The IsIconic function determines whether the specified window is minimized (iconic). API Syntax : BOOL IsIconic( HWND hWnd ); Parameters : hWnd – [in] Handle to the window to test. Return Value : If the window is iconic, the return value is nonzero. If the window is not iconic, the return value is zero. Extern.Declare …


Recent Comments