声明
class A :
public BaseForm,
public ITextEventListener,
public IScrollPanelEventListener
{
// Construction
public:
A(void);
virtual ~A(void);
bool Initialize();
result OnInitializing(void);
result OnTerminating(void);
static const int ID_BUTTON_SEND = 100;
static const int ID_BITMAP = 101;
static const int ID_STRING = 102;
// Implementation
protected:
EditArea * __pEditArea;
// Generated call-back functions
public:
void OnActionPerformed(const Osp::Ui::Control&, int);
virtual void OnTextValueChanged(const Control& source);
virtual void OnTextValueChangeCanceled(const Control& source);
virtual void OnOverlayControlCreated(const Osp::Ui::Control& source);
virtual void OnOverlayControlOpened(const Osp::Ui::Control& source);
virtual void OnOverlayControlClosed(const Osp::Ui::Control& source);
virtual void OnOtherControlSelected(const Osp::Ui::Control& source);
};
创建一个Form实例
A _pA = new A();
_pA->Initialize();
pFrame->AddControl(*_pA);
pFrame->SetCurrentForm(*_pA);
->instack(_pA);
_pA->Draw();
_pA->Show();
return;
函数定义:
A::Initialize()
{
Form::Construct(L"IDF_SEND_FORM");