Command Prompt for Windows




FUNC Examples

Example 1:

To get the window handle (ie. hwnd) for the WinOne® Command Prompt window enter at the command prompt :-

FUNC user32 FindWindow NULL "WinOne"

The environment variable FUNCA will contain the hwnd value.

Example 2:

Consider the following batch file :-

@ECHO off
FUNC user32 GetDesktopWindow
FUNC user32 ArrangeIconicWindows %FUNCA%
IF (%FUNCA%==0) {
	COLOUR error
	ECHO Unable to arrange icons.
	ECHO.
}

The above batch file arranges all the iconic windows on the desktop. This batch file performs the same function as clicking on the Arrange Icons button in the Task Manager.