Shiny Language Reference
Language Reference > User Interface
getcaption
string getcaption(int ID);
Retrieves the caption text for a control
The GETCAPTION statement retrieves the text string used for a control's caption. The caption of a control is the most visible textual aspect that can logically be set to a string, for example the text on a button. This statement is the Shiny equivalent to the Win32API function "GetWindowText".
Parameters
ID
The ID of the control to set the caption for
Return Value
A string containing the current caption of the control. Note that the string may be empty, signifying the control has no caption.
Example Code
function Init()
{
int ExplorerButtonID = createbutton(1, 10, 10, 50, 20);
setcaption(ExplorerButtonID, "Run Explorer!");
// Retrieve the caption text
string szCaption = getcaption(ExplorerButtonID);
}