Returns the handle to a child control in a dialog box or in a menu item
int wb_get_control (int wbobject [, int id])
Returns an integer handle that corresponds to the WinBinder object (control, toolbar item or menu item) wbobject that has the supplied id. This function is typically used to retrieve the handle of a child control in a dialog box or in a menu item.
Examples:
Basic usage. We are refering to the parent control (a window in this case) and the control-id of the child we want to get the handle from.
<?php
// the id of our control...
define('ID_BUTTON', 200);
// which is the child of $mainwin, our window.
wb_create_control($mainwin, PushButton, "My Button", 10, 10, 70, 20, ID_BUTTON, WBC_VISIBLE);
// assign the result to a variable
$button_ctrl = wb_get_control($mainwin, ID_BUTTON);
?>
Combining wb_get_control with wb_set_text to change the text of a control by using the control-id:
<?php
// creating a control with the ID_BUTTON constant
wb_create_control($mainwin, PushButton, "Change me", 10, 10, 70, 20, ID_BUTTON, WBC_VISIBLE);
// change the text of the control using this constant
wb_set_text( wb_get_control($mainwin, ID_BUTTON) , "Changed you!" );
?>