IP Address control help

Function help:

Real API_IpAddress_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);

This function creates a new IP address control.

Argument list:
(0) Parent Handle: Identifies the window handle of the window to create this control on.
(1) X: The horizontal position of the control in pixels, relative to the parent window.
(2) Y: The vertical position of the control in pixels, relative to the parent window.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, supports the Global Control Styles.

Style flags can be separated by a bitwise or '|' operator.

(6) Extended Style Flags: This can be any combination of the Global Extended Control Styles.

Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.
Real API_IpAddress_SetValue ( Real Control ID, Real Field 0 value, Real Field 1 value,Real Field 2 value, Real Field 3 value );

This function changes the value of an IP Address control.

Return value:
Always returns zero (0).
Real API_IpAddress_GetValue ( Real Control ID, Real Zero Based Field Number );

This function returns the value of an IP Address control.

(0) Control ID, returned by API_IpAddress_Create.
(1) The field number, zero based, so field 1 has field number 0.

Return value:
Returns the value of the specified field.
Real API_IpAddress_SetRange ( Real Control ID, Real Zero Based Field Number, Real Min Value, Real Max value );

This function changes the range of an IP Address control.

Return value:
Returns true (1) when succesful, or false (0) otherwise.

Secondary check commands for IP Addresscontrols:

IPN_FIELDCHANGED
Sent when the user has taken an action that may have altered a field in an IP Address control.

Example:

Command = API_Check_Command (1); // Check commands for check handle 1

if ( Command == IpAddress1 ) // IpAddress1 sends a command
{
Second = API_Check_SecondaryCommand (1); // Check the command type

if ( Second == IPN_FIELDCHANGED) // A field has changed
{
show_message ("A field has changed .");
}

}



Example code:

is
IpAddress1 =API_IpAddress_Create(Win,300,60,300,20,0,0);

API_IpAddress_SetRange (IpAddress1,0,50,100); // Set range of field 0
API_IpAddress_SetRange (IpAddress1,1,50,100); // Set range of field 1
API_IpAddress_SetRange (IpAddress1,2,50,100); // Set range of field 2
API_IpAddress_SetRange (IpAddress1,3,50,100); // Set range of field 3

API_IpAddress_SetValue (IpAddress1,75,75,75,75); // Set all fields to 75

Return to help index