result r = pMainForm->Initialize(__panelId);
// Add the form to the frame
- AddControl(*pMainForm);
+ AddControl(pMainForm);
// Set the current form
SetCurrentForm(*pMainForm);
__pLabel->SetName(L"Label1");
__pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
__pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
- result r = AddControl(*__pLabel);
+ result r = AddControl(__pLabel);
// Create a Button
Button *pButton = new (std::nothrow) Button();
pButton->SetText(L"Change Text");
pButton->SetActionId(ID_BUTTON);
pButton->AddActionEventListener(*this);
- r = AddControl(*pButton);
+ r = AddControl(pButton);
return r;
}
MainForm::CreateImagePanel(void)
{
ImagePanel* pImagePanel = new (std::nothrow) ImagePanel();
- pImagePanel->Initialize(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+ result r = pImagePanel->Initialize(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
AddOrientationEventListener(*pImagePanel);
- AddControl(*pImagePanel);
+ r = AddControl(pImagePanel);
__pPanel[2] = pImagePanel;
+
+ return r;
}
result
// Create the Button panel
ButtonPanel* pButtonPanel = new (std::nothrow) ButtonPanel();
pButtonPanel->Initialize(rect);
- AddControl(*pButtonPanel);
+ AddControl(pButtonPanel);
__pPanel[0] = pButtonPanel;
// Orientation panel was created with UI Builder,