The Create function creates dynamically the control window that will be a child window of the specified dialog window.
The Create function should be used by advanced users only.
The Check object can use the following styles:
- WS_VISIBLE, WS_DISABLED, WS_BORDER
- WS_EX_CLIENTEDGE, WS_EX_STATICEDGE
Syntax
Integer Check.Create(
Dialog dlg,
Rectangle rect,
String caption = "",
String style = "WS_VISIBLE",
String exStyle = "")
Dialog dlg,
Rectangle rect,
String caption = "",
String style = "WS_VISIBLE",
String exStyle = "")
Parameters
| dlg | Dialog of the control. | Required |
|---|---|---|
| rect | Relative dialog position of the control. | Required |
| caption | Caption of the control. | Optional |
| style | Windows API Styles of the control (each style must be separated by a space). | Optional |
| exStyle | Windows API Extended Styles of the control (each style must be separated by a space). | Optional |
Return value
The Create function returns true.
If an error occurs, the Create function returns false.
Example
object Application
{
Dialog m_dlg new
Check m_ctrl new
}
function Application.Constructor()
{
Rectangle rc new
m_dlg.LoadResource("dialog.dlg", this)
rc.Set(10, 10, 100, 25)
m_ctrl.Create(m_dlg, rc, "Option", "WS_VISIBLE")
}
function Application.Destructor()
{
m_ctrl.Destroy()
m_dlg.Close()
}
message Integer Application.Dialog.OnDestroy()
{
QuitApplication()
return OK
}
{
Dialog m_dlg new
Check m_ctrl new
}
function Application.Constructor()
{
Rectangle rc new
m_dlg.LoadResource("dialog.dlg", this)
rc.Set(10, 10, 100, 25)
m_ctrl.Create(m_dlg, rc, "Option", "WS_VISIBLE")
}
function Application.Destructor()
{
m_ctrl.Destroy()
m_dlg.Close()
}
message Integer Application.Dialog.OnDestroy()
{
QuitApplication()
return OK
}