ComboBox

Int_AddItemComboBox, Int_CreateComboBox, Int_ShowComboBox

Int_AddItemComboBox

Description 

 Int_AddItemComboBox(
   int  Int_Index,
   char *Int_Text
);

This function adds a string item to a combo box.

Int_Index parameter is the index of the combo box in the dialog box. Values are ranging from 1 to 3.

Parameters

int Int_Index

Index parameter.

char *Int_Text

Text of appended item in the combo box. The length of all strings in the one combo box should not exceed 0x4000 bytes.

Return Values

If the function is successful, it returns TRUE (1), otherwise FALSE (0).

Int_CreateComboBox

Description 

 Int_CreateComboBox(
   char *Int_Caption,
   char *Int_Text1,
   char *Int_Text2,
   char *Int_Text3,
   char *Int_Text4,
   char *Int_Text
);

This creates and initializes a dialog box with combo boxes.

Parameters

char *Int_Caption

Caption of the dialog box. String length should be less than 256.

char *Int_Text1

Text for combo box #1. String length should be less than 256.

char *Int_Text2

Text for combo box #2. String length should be less than 256. If Int_Text2==NULL (0), dialog box with one combo box is created.

char *Int_Text3

Text for combo box #3. String length should be less than 256. If Int_Text3==NULL (0), dialog box with two combo boxes is created.

char *Int_Text4

Filename for Windows bitmap. The large bitmaps are clipped. The max width and height is 32 pixels. If Int_Text4==NULL (0), no bitmap is displayed in the dialog box.

char *Int_Text

Optional text, that will be created in the bottom line.

Return Values

The function returns FALSE (0), if caption has more then 256 characters or if the Int_TextX has more than 256 characters.

//Int_CreateComboBox example -  display a combo box.
char          *pText1;
char          *pText2;
char          *pCmb1Txt1, *pCmb1Txt2, *pCmb1Txt3;
char          *pCmb2Txt1, *pCmb2Txt2, *pCmb2Txt3;
char          *pStr;              
char          buf[256]; 
SetCommandText("Int_CreateComboBox example. Working...");
strcpy(buf, "API Example - Int_CreateComboBox");
Int_CreateTextWindow(buf,0,RGB(0,0,128),RGB_WHITE,100);  
pText1="&Centrifugation Area";
pText2="&Number Of Slides";
pCmb1Txt1="Circular, 17.5 mm";
pCmb1Txt2="Circular, 2x17.5 mm";
pCmb1Txt3="Rectangular, 15x25 mm";
pCmb2Txt1="8";
pCmb2Txt2="16";
pCmb2Txt3="24";
pStr="API Example";
Int_CreateComboBox("API Example - CreateComboBox", pText1, pText2, NULL, NULL, pStr);
Int_AddItemComboBox(1,pCmb1Txt1);                          
Int_Cmb1 = Int_GetKeyValue("luc_1.ini", "ComboBox", "Int_Cmb1", 1);
Int_Cmb2 = Int_GetKeyValue("luc_1.ini", "ComboBox", "Int_Cmb2", 1);
Int_AddItemComboBox(1,pCmb1Txt2);
Int_AddItemComboBox(1,pCmb1Txt3);
Int_AddItemComboBox(2,pCmb2Txt1);
Int_AddItemComboBox(2,pCmb2Txt2);
Int_AddItemComboBox(2,pCmb2Txt3);
Int_ShowComboBox();
Int_SetKeyValue("luc_1.ini", "ComboBox", "Int_Cmb1", Int_Cmb1);
Int_SetKeyValue("luc_1.ini", "ComboBox", "Int_Cmb2", Int_Cmb2);
Int_CloseTextWindow();

Note

The system registers Int_Cmb1, Int_Cmb2 and Int_Cmb3 global variables - selected items of combo boxes. This function should be called prior to the other Int_CmbXXX functions.

Int_ShowComboBox

Description 

 Int_ShowComboBox();

This function displays a dialog box with combo boxes.

Return Values

If the function is successful, it returns TRUE, else FALSE.

Note

For example macro, see Int_CreateComboBox function description.

See Also 
Int_CreateComboBox, Int_AddItemComboBox