Apply new AppResourceId policy
authorwoo <s-w.woo@samsung.com>
Thu, 11 Apr 2013 08:45:18 +0000 (17:45 +0900)
committerwoo <s-w.woo@samsung.com>
Thu, 11 Apr 2013 08:45:40 +0000 (17:45 +0900)
Change-Id: Ib7a116a84bcebd838e924564fa4a6575ba6a9403
Signed-off-by: woo <s-w.woo@samsung.com>
project/inc/AppResourceId.h [new file with mode: 0644]
project/src/AppResourceId.cpp [new file with mode: 0644]
project/src/MainForm.cpp

diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h
new file mode 100644 (file)
index 0000000..a13d805
--- /dev/null
@@ -0,0 +1,7 @@
+#ifndef _APP_RESOURCE_ID_H_
+#define _APP_RESOURCE_ID_H_
+
+extern const wchar_t* IDF_MAINFORM;
+extern const wchar_t* IDC_ORIENTATIONPANEL;
+extern const wchar_t* IDC_BUTTON_ORIENTATION;
+#endif // _APP_RESOURCE_ID_H_
diff --git a/project/src/AppResourceId.cpp b/project/src/AppResourceId.cpp
new file mode 100644 (file)
index 0000000..98b8155
--- /dev/null
@@ -0,0 +1,6 @@
+#include "AppResourceId.h"
+
+const wchar_t* IDF_MAINFORM = L"IDF_MAINFORM";
+const wchar_t* IDC_ORIENTATIONPANEL = L"IDC_ORIENTATIONPANEL";
+const wchar_t* IDC_BUTTON_ORIENTATION = L"IDC_BUTTON_ORIENTATION";
+
index 8fc74be..5a898cb 100644 (file)
@@ -18,6 +18,7 @@
 #include <FApp.h>
 #include <FBase.h>
 
+#include "AppResourceId.h"
 #include "ButtonPanel.h"
 #include "ImagePanel.h"
 #include "MainForm.h"
@@ -45,7 +46,7 @@ MainForm::~MainForm(void)
 result
 MainForm::Initialize(int panelId)
 {
-       result r = Form::Construct(L"IDF_MAINFORM");
+       result r = Form::Construct(IDF_MAINFORM);
 
        if (panelId >= 0 && panelId <= 2)
        {
@@ -120,10 +121,10 @@ MainForm::OnInitializing(void)
 
        // 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)
                {