Methods of the class
Window | |
void Create(char *name,char *caption,int x,int y,int width,int height,int style,int id,Object *obj) | |
Creates the window with name as class name, caption as title, at the (x,y) point and with the specified size (width,height), style, identifier id and obj as parent object (if present, else null) | |
void Create(int dlg,BOOL modal,Object *o) | |
Create a modal (if modal=TRUE) or modeless (if modal=FALSE) dialog box using the template in the resource file with identifier dlg and parent object obj | |
void LinkControl(int id,Object *obj) | |
Used in the dialog boxes to link a window control with the corrispondent object obj of the framework previously instanced | |
void ReplaceControl(int id,Object *o) | |
Used in the dialog boxes to replace a window control with the object obj of the framework previously instanced |
Samples
Creation of the main window with the management of the OnCreation event
1. Class deriving
class MainWindow:public WindowObject
{
public:
void OnCreate(void);
};
2. Statements for the creation event
void MainWindow::OnCreate(void)
{
// Some code
}
3. Startup
MainWindow w;
void AppStart(void)
{
w.Create("MyApp","My Application",0,0,0,0,StyleStandard,0,NULL);
w.Show(StyleMaximized);
}