diff options
author | Ash Wolf <ninji@wuffs.org> | 2023-07-09 20:59:16 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2023-07-09 20:59:16 +0100 |
commit | c920fe38a19013b99f3f74e48da9724fb053c212 (patch) | |
tree | 6bb036fd3f61b85daceb26f74378eadcdd977db1 /src/T2NewDlg.cpp | |
parent | 96a63139221587c6be9659c1e07eacd3a8e7f048 (diff) | |
download | t2win-c920fe38a19013b99f3f74e48da9724fb053c212.tar.gz t2win-c920fe38a19013b99f3f74e48da9724fb053c212.zip |
support building from VC++ IDE, add resources
Diffstat (limited to '')
-rw-r--r-- | src/T2NewDlg.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/T2NewDlg.cpp b/src/T2NewDlg.cpp index c08afe1..94fab17 100644 --- a/src/T2NewDlg.cpp +++ b/src/T2NewDlg.cpp @@ -1,9 +1,10 @@ -#include "GlobalFunc.h" -#include "T2BitImage.h" +#include "StdAfx.h" +#include "T2DLL/GlobalFunc.h" +#include "T2DLL/T2BitImage.h" #include "T2NewDlg.h" #include "T2NewDlgTmp.h" -#include "T2PluginLoader.h" -#include "T2PluginSpecifier.h" +#include "T2DLL/T2PluginLoader.h" +#include "T2DLL/T2PluginSpecifier.h" #include "T2TowerDoc.h" #ifdef _DEBUG @@ -16,7 +17,7 @@ static char THIS_FILE[] = __FILE__; IMPLEMENT_DYNCREATE(T2NewDlg, CFrameWnd) T2NewDlg::T2NewDlg() { - HRSRC rsrc = FindResource(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(100), "PALETTE"); + HRSRC rsrc = FindResource(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDR_DEFAULT_PALETTE), "PALETTE"); HGLOBAL theHandle = LoadResource(AfxGetApp()->m_hInstance, rsrc); void *resData = LockResource(theHandle); @@ -44,7 +45,7 @@ T2NewDlg::T2NewDlg() { free(theLogPalette); - mBitmap.LoadBitmap(170); + mBitmap.LoadBitmap(IDB_PATTERN_BRUSH); mBrush.CreatePatternBrush(&mBitmap); mPlugins = NULL; @@ -71,6 +72,7 @@ T2NewDlg::T2NewDlg() { } BEGIN_MESSAGE_MAP(T2NewDlg, CFrameWnd) + //{{AFX_MSG_MAP(T2NewDlg) ON_WM_CLOSE() ON_WM_TIMER() ON_WM_CREATE() @@ -79,8 +81,9 @@ BEGIN_MESSAGE_MAP(T2NewDlg, CFrameWnd) ON_WM_KEYDOWN() ON_COMMAND(IDOK, OnCommandOK) ON_COMMAND(IDCANCEL, OnCommandCancel) - ON_COMMAND(106, OnCommand106) - ON_COMMAND(107, OnCommand107) + ON_COMMAND(ID_LEFT, OnCommand106) + ON_COMMAND(ID_RIGHT, OnCommand107) + //}}AFX_MSG_MAP END_MESSAGE_MAP() void T2NewDlg::Setup(T2TowerDoc *inDoc, T2PluginLoader *inPluginLoader, BOOL inShowCancelButton) { @@ -176,7 +179,7 @@ int T2NewDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { return -1; T2NewDlgTmp newDlgTmp(this); - newDlgTmp.Create(166); + newDlgTmp.Create(T2NewDlgTmp::IDD); CRect rect1, rect2, rect3, rect4; newDlgTmp.GetWindowRect(rect1); @@ -239,10 +242,10 @@ int T2NewDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { rect5.left = rect5.right - 18; rect5.top = rect5.bottom - 68; - mButton4.Create(NULL, BS_ICON | WS_CHILD, rect5, this, 107); + mButton4.Create(NULL, BS_ICON | WS_CHILD, rect5, this, ID_RIGHT); mButton4.SetFont(&mFont); mButton4.ShowWindow(SW_SHOW); - mButton4.SetIcon(AfxGetApp()->LoadIcon(169)); + mButton4.SetIcon(AfxGetApp()->LoadIcon(IDI_RIGHT)); if (mPluginCount <= 6) mButton4.EnableWindow(false); @@ -266,10 +269,10 @@ int T2NewDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { rect5.left = rect6.left; rect5.right = rect5.left + 18; - mButton3.Create(NULL, BS_ICON | WS_CHILD, rect5, this, 106); + mButton3.Create(NULL, BS_ICON | WS_CHILD, rect5, this, ID_LEFT); mButton3.SetFont(&mFont); mButton3.ShowWindow(SW_SHOW); - mButton3.SetIcon(AfxGetApp()->LoadIcon(168)); + mButton3.SetIcon(AfxGetApp()->LoadIcon(IDI_LEFT)); mButton3.EnableWindow(false); |