|
Column Binder control help
Function help:
Real API_CB_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);
This function creates a new column binder 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:
Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.
Real API_CB_AddColumn ( Real Control ID, Real Zero Based Column Number, Real Column Width, String Text )
This function adds a column to the column binder control.
Return value:
If this function succeeds, it returns the zero based index ( 0 = the first item) of the column, otherwise, it returns -1.
Real API_CB_SetColumnWindow ( Real Control ID, Real Zero Based Column Number, Real Window Handle)
This function binds a window or control to a column binder control. (If you want to use a control use API_Control_GetHandle to get it's window handle)
Return value:
Always returns 1.
Real API_CB_DeleteColumn ( Real Control ID, Real Zero Based Column Number)
This function removes a column from a column binder control.
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Real API_CB_SetColumnWidth ( Real Control ID, Real Zero Based Column Number, Real Column Width)
This function changes the width of a column.
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Real API_CB_SetColumnText ( Real Control ID, Real Zero Based Column Number, Real Column Text)
This function changes the text of a column.
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Secondary check commands for list boxes:
CB_CLICKED - A column is clicked
CB_DBLCLK - A column is double clicked
API_Check_TertiaryCommand returns the zero based column number of the clicked item;
Example:
Command = API_Check_Command (4);
if (Command == CB1)
{
Second = API_Check_SecondaryCommand (4);
Tertiary = API_Check_TertiaryCommand (4);
if (Second == CB_CLICKED)
API_Dialog_MessageBox (Win3,'CB1 Column'+string (Tertiary),'Max WinAPI 2',0);
if (Second == CB_DBLCLK)
API_Dialog_MessageBox (Win3,'CB1 Column'+string (Tertiary),'Max WinAPI 2',0);
}
|
Example code:
CB1 = API_CB_Create (Win3,5,5,600,430,WS_BORDER);
API_CB_AddColumn (CB1,0,200,"Column0");
API_CB_SetColumnWindow (CB1,0,API_Control_GetHandle (Listbox1));
|
is
Return to help index
|
|
|
|