From 6189c3a64aefe185f4814ae3e92074a8281f33ec Mon Sep 17 00:00:00 2001 From: woo Date: Thu, 11 Apr 2013 17:45:18 +0900 Subject: [PATCH] Apply new AppResourceId policy Change-Id: Ib7a116a84bcebd838e924564fa4a6575ba6a9403 Signed-off-by: woo --- project/inc/AppResourceId.h | 7 +++++++ project/src/AppResourceId.cpp | 6 ++++++ project/src/MainForm.cpp | 7 ++++--- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 project/inc/AppResourceId.h create mode 100644 project/src/AppResourceId.cpp diff --git a/project/inc/AppResourceId.h b/project/inc/AppResourceId.h new file mode 100644 index 0000000..a13d805 --- /dev/null +++ b/project/inc/AppResourceId.h @@ -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 index 0000000..98b8155 --- /dev/null +++ b/project/src/AppResourceId.cpp @@ -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"; + diff --git a/project/src/MainForm.cpp b/project/src/MainForm.cpp index 8fc74be..5a898cb 100644 --- a/project/src/MainForm.cpp +++ b/project/src/MainForm.cpp @@ -18,6 +18,7 @@ #include #include +#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(GetControl(L"IDC_ORIENTATIONPANEL")); + __pPanel[1] = static_cast(GetControl(IDC_ORIENTATIONPANEL)); if (__pPanel[1] != null) { - __pButtonOrientation = static_cast