home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1994 February
/
psl_9403.zip
/
psl_9403
/
DOS
/
UT_SYSTM
/
CENVI2.ZIP
/
WINTOOLS.LIB
< prev
next >
Wrap
Text File
|
1993-11-16
|
20KB
|
538 lines
// WinTools.lib - Functions for setting the state of of PM windows. This
// file may be #included into other Cmm source files, or
// you can cut and paste in the parts that you need.
//
// Note: Most of these routines require either a window
// handle or a window title. You can use either, but
// using a Window handle is a little quicker. Many of these
// utilities require that you include PMdll.lib.
//
//
//***** GetWindowHandle(): Get the handle for this window
// SYNTAX: int GetWindowHandle(int WindowHandle)
// int GetWindowHandle(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: Returns Window handle for a Windows whose partial title is
// WindowTitle. Comparison is case-insensitive. If WindowTitle
// is not found then returns 0 (NULL).
// NOTE: If WindowHandle is input, then this returns WindowHandle if
// WindowHandle is valid, else returns 0. WindowTitle is a partial
// and case-insensitive match and so "write" would match the
// window titled "Write - THESIS.WRI".
//
//
//***** GetFocusChild(): Get the handle for child that last had focus
// SYNTAX: int GetWindowHandle(int WindowHandle)
// int GetWindowHandle(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: Returns Window handle for a child of this window that now has
// focus or most recently had focus before this window was
// made inactive. NULL if not focus child.
// NOTE: If WindowHandle is input, then this returns WindowHandle if
// WindowHandle is valid, else returns 0. WindowTitle is a partial
// and case-insensitive match and so "write" would match the
// window titled "Write - THESIS.WRI".
//
//
//***** GetWindowTitle(): Get full Window Title
// SYNTAX: string GetWindowTitle(int WindowHandle)
// string GetWindowTitle(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: Returns Full title for this window, or NULL if window not
// found or title not found
//
//
//***** SetWindowTitle(): Set title for window
// SYNTAX: bool SetWindowTitle(int WindowHandle,string NewTitle)
// bool SetWindowTitle(string WindowTitle,string NewTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// NewTitle: New full title for this window
// RETURN: TRUE if successful, else FALSE if WindowSpec is invalid.
//
//
//***** IsWindow(): Is this a valid window title or handle
// SYNTAX: bool IsWindow(int WindowHandle)
// bool IsWindow(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: Returns non-zero if this window exists, else returns zero (FALSE)
//
//
//***** IsMinimized(): Is window minimized (Iconic)
// SYNTAX: bool IsMinimized(int WindowHandle)
// bool IsMinimized(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: non-zero if Window is minimized (iconic) else zero (FALSE)
// if not minimized or if WindowSpec is invalid
//
//
//***** IsMaximized(): Is window maximized
// SYNTAX: bool IsMinimized(int WindowHandle)
// bool IsMinimized(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: non-zero if Window is maximized else zero (FALSE) if not
// maximized or if WindowSpec is invalid
//
//
//***** IsVisible(): Is window visible
// SYNTAX: bool IsVisible(int WindowHandle)
// bool IsVisible(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: non-zero if Window is visible else zero (FALSE) if not
// visible or if WindowSpec is invalid. Visible means that
// the window exists on the screen even if it is covered by
// other windows
//
//
//***** IsEnabled(): Is window enabled for input
// SYNTAX: bool IsEnabled(int WindowHandle)
// bool IsEnabled(string WindowTitle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// RETURN: non-zero if Window is enabled for mouse and keyboard input,
// else zero (FALSE) if not enabled or if WindowSpec is invalid
//
//
//***** GetWindowRect(): Get current window coordinates
// SYNTAX: bool GetWindowRect(int WindowHandle,struct Rectangle)
// bool GetWindowRect(string WindowTitle,struct Rectangle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// Rectangle: receive structure of current window with following members
// .left - coordinate for left edge of window
// .right - coordinate for right edge of window
// .top - coordinate for top edge of window
// .bottom - coordinate for bottom edge of window
// RETURN: TRUE if WindowSpec is valid, else FALSE.
// MODIFY: Modifies Rectangle structure to current coordinates
//
//
//***** SetWindowRect(): Set current window coordinates
// SYNTAX: bool SetWindowRect(int WindowHandle,struct Rectangle)
// bool SetWindowRect(string WindowTitle,struct Rectangle)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// Rectangle: new structurw of window with the same member elements as
// defined above in GetWindowRect()
// RETURN: TRUE if WindowSpec is valid, else FALSE.
//
//
//***** GetScreenSize(): Get width and height of the windows screen
// SYNTAX: void GetScreenSize(int Width,int Height);
// WHERE: Width: receive screen width
// Height: receive screen height
// MODIFY: Sets Width and Height to dimensions of screen
//
//
//***** GetSize(): Get current width and height of window
// SYNTAX: bool GetSize(int WindowHandle,int Width,int Height)
// bool GetSize(string WindowTitle,int Width,int Height)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// Width: receive current window width
// Height: receive current window height
// RETURN: TRUE if WindowSpec is valid, else FALSE.
// MODIFY: Sets Width and Height to current dimensions of window
//
//
//***** SetSize(): Get current width and height of window
// SYNTAX: bool GetSize(int WindowHandle,int Width,int Height)
// bool GetSize(string WindowTitle,int Width,int Height)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// Width: new window width
// Height: new window height
// RETURN: TRUE if WindowSpec is valid, else FALSE.
//
//
//***** GetPosition(): Get current column and row of window
// SYNTAX: bool GetPosition(int WindowHandle,int LeftCol,int BottomRow)
// bool GetPosition(string WindowTitle,int LeftCol,int BottomRow)
// WHERE: WindowHandle: Integer identifier for this window
// WindowTitle: Partial text title of the window (case-insensitive)
// LeftCol: receive current column coordinate of lower-left corner of window
// Height: receive current row coordinate of lower-left corner of window
// RETURN: TRUE if WindowSpec is valid, else FALSE.
// MODIFY: Sets LeftCol and Bott