GxPsPanel

Purpose

Opens a virtual panel used to interactively control the GX7400.

Syntax

GxPsPanel (pnHandle, hwndParent, nMode, phwndPanel, pnStatus)

Parameters

Name
Type
Description
pnHandle
LPSHORT
GX7400 slot number. This number may be zero if the power supply is to be initialized by the panel window.
hwndParent
DWORD
Sets the panel parent window handle. A value of 0 sets the desktop as the parent window.
nMode
SHORT
The mode in which the panel main window is created.
0 ¾ Modeless window.
1 ¾ Modal window.
phwndPanel
LPDWORD
Returned window handle for the panel (for modeless panels only).
pnStatus
LPSHORT
Returned status: 0 on success, negative number on failure.

Comments

The panel window may be opened as a modal or a modeless window depending on the nMode parameter value.

If the mode is set to modal (nMode=1), the panel disables the parent window (hwndParent) and the function returns only after the window was closed by  the user. In that case, pnHandle may return the handle created by the user using the panel Initialize dialog.

If the mode is set to modeless (nMode=0), the function returns immediately after creating the panel window, returning the window handle (phwndPanel) to the panel. It is the responsibility of the calling program to dispatch Windows messages to this window so that the window can respond to messages.

This function is supplied only with the DLL versions of the driver.

Example

The following example opens the panel in modal mode:

 

DWORD dwPanel;

SHORT nHandle=0, nStatus;

GxPsPanel(&nHandle, 0, 1, &dwPanel, &nStatus);

 

See Also

GxPsInitialize, GxPsGetErrorString