#include <FApp.h>
#include <FBase.h>
+#include "AppResourceId.h"
#include "ButtonPanel.h"
#include "ImagePanel.h"
#include "MainForm.h"
result
MainForm::Initialize(int panelId)
{
- result r = Form::Construct(L"IDF_MAINFORM");
+ result r = Form::Construct(IDF_MAINFORM);
if (panelId >= 0 && panelId <= 2)
{
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,
// so only its button events must be defined here
- __pPanel[1] = static_cast<Panel *>(GetControl(L"IDC_ORIENTATIONPANEL"));
+ __pPanel[1] = static_cast<Panel *>(GetControl(IDC_ORIENTATIONPANEL));
if (__pPanel[1] != null)
{
- __pButtonOrientation = static_cast<Button *>(GetControl(L"IDC_BUTTON_ORIENTATION", true));
+ __pButtonOrientation = static_cast<Button *>(GetControl(IDC_BUTTON_ORIENTATION, true));
if (__pButtonOrientation != null)
{