Commit 9577f5f3 authored by CjhGm's avatar CjhGm
Browse files

start coding!

parent 7c97fda0
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -189,6 +189,7 @@
<ItemGroup>
<ClInclude Include="AircraftBattle.h" />
<ClInclude Include="AircraftBattleDlg.h" />
<ClInclude Include="AircraftMain.h" />
<ClInclude Include="framework.h" />
<ClInclude Include="pch.h" />
<ClInclude Include="Resource.h" />
......@@ -197,6 +198,7 @@
<ItemGroup>
<ClCompile Include="AircraftBattle.cpp" />
<ClCompile Include="AircraftBattleDlg.cpp" />
<ClCompile Include="AircraftMain.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
......
......@@ -33,6 +33,9 @@
<ClInclude Include="pch.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="AircraftMain.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AircraftBattle.cpp">
......@@ -44,6 +47,9 @@
<ClCompile Include="pch.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="AircraftMain.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="AircraftBattle.rc">
......
......@@ -7,6 +7,7 @@
#include "AircraftBattle.h"
#include "AircraftBattleDlg.h"
#include "afxdialogex.h"
#include "AircraftMain.h"
#ifdef _DEBUG
#define new DEBUG_NEW
......@@ -65,6 +66,7 @@ BEGIN_MESSAGE_MAP(CAircraftBattleDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDOK, &CAircraftBattleDlg::OnBnClickedOk)
END_MESSAGE_MAP()
......@@ -153,3 +155,13 @@ HCURSOR CAircraftBattleDlg::OnQueryDragIcon()
return static_cast<HCURSOR>(m_hIcon);
}
void CAircraftBattleDlg::OnBnClickedOk()
{
// TODO: 在此添加控件通知处理程序代码
//CDialogEx::OnOK();
AircraftMain* dlg = new AircraftMain;
dlg->Create(IDD_DIALOG1, this); //第一个参数是对话框ID号
dlg->ShowWindow(SW_SHOW);
}
......@@ -31,4 +31,6 @@ protected:
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
};
// AircraftMain.cpp: 实现文件
//
#include "pch.h"
#include "AircraftBattle.h"
#include "AircraftMain.h"
#include "afxdialogex.h"
// AircraftMain 对话框
IMPLEMENT_DYNAMIC(AircraftMain, CDialogEx)
AircraftMain::AircraftMain(CWnd* pParent /*=nullptr*/)
: CDialogEx(IDD_DIALOG1, pParent)
{
}
AircraftMain::~AircraftMain()
{
}
void AircraftMain::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}
BOOL AircraftMain::OnInitDialog()
{
CRect temprect(0, 0, 1500, 1000);
CWnd::SetWindowPos(NULL, 0, 0, temprect.Width(), temprect.Height(), SWP_NOZORDER | SWP_NOMOVE);
CenterWindow();
return TRUE;
}
BEGIN_MESSAGE_MAP(AircraftMain, CDialogEx)
END_MESSAGE_MAP()
// AircraftMain 消息处理程序
#pragma once
// AircraftMain 对话框
class AircraftMain : public CDialogEx
{
DECLARE_DYNAMIC(AircraftMain)
public:
AircraftMain(CWnd* pParent = nullptr); // 标准构造函数
virtual ~AircraftMain();
BOOL OnInitDialog();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_DIALOG1 };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
};
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ 生成的包含文件。
// AircraftBattle.rc 使用
// AircraftBattle.rc 使用
//
#define IDR_MAINFRAME 128
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_AIRCRAFTBATTLE_DIALOG 102
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
#define IDD_AIRCRAFTBATTLE_DIALOG 102
#define IDR_MAINFRAME 128
#define IDD_DIALOG1 129
// 新对象的下一组默认值
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_RESOURCE_VALUE 131
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
......@@ -9,5 +9,6 @@
// 添加要在此处预编译的标头
#include "framework.h"
#include <afxcontrolbars.h>
#endif //PCH_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment