Gg1Dlg.cpp
上传用户:wxchtg88
上传日期:2022-05-17
资源大小:3340k
文件大小:3k
- // Gg1Dlg.cpp : 备泅 颇老
- //
- #include "stdafx.h"
- #include "Gg1.h"
- #include "Gg1Dlg.h"
- #include "Console.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #endif
- // 览侩 橇肺弊伐 沥焊俊 荤侩登绰 CAboutDlg 措拳 惑磊涝聪促.
- class CAboutDlg : public CDialog
- {
- public:
- CAboutDlg();
- // 措拳 惑磊 单捞磐涝聪促.
- enum { IDD = IDD_ABOUTBOX };
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 瘤盔涝聪促.
- // 备泅涝聪促.
- protected:
- DECLARE_MESSAGE_MAP()
- };
- CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
- {
- }
- void CAboutDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- }
- BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
- END_MESSAGE_MAP()
- // CGg1Dlg 措拳 惑磊
- CGg1Dlg::CGg1Dlg(CWnd* pParent /*=NULL*/)
- : CDialog(CGg1Dlg::IDD, pParent)
- {
- m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
- }
- void CGg1Dlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- }
- BEGIN_MESSAGE_MAP(CGg1Dlg, CDialog)
- ON_WM_SYSCOMMAND()
- ON_WM_PAINT()
- ON_WM_QUERYDRAGICON()
- //}}AFX_MSG_MAP
- ON_BN_CLICKED(IDC_BTN_GG_1, &CGg1Dlg::OnBnClickedBtnGg1)
- ON_WM_DESTROY()
- END_MESSAGE_MAP()
- // CGg1Dlg 皋矫瘤 贸府扁
- BOOL CGg1Dlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // 矫胶袍 皋春俊 "沥焊..." 皋春 亲格阑 眠啊钦聪促.
- // IDM_ABOUTBOX绰 矫胶袍 疙飞 裹困俊 乐绢具 钦聪促.
- ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
- ASSERT(IDM_ABOUTBOX < 0xF000);
- CMenu* pSysMenu = GetSystemMenu(FALSE);
- if (pSysMenu != NULL)
- {
- CString strAboutMenu;
- strAboutMenu.LoadString(IDS_ABOUTBOX);
- if (!strAboutMenu.IsEmpty())
- {
- pSysMenu->AppendMenu(MF_SEPARATOR);
- pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
- }
- }
- // 捞 措拳 惑磊狼 酒捞能阑 汲沥钦聪促. 览侩 橇肺弊伐狼 林 芒捞 措拳 惑磊啊 酒匆 版快俊绰
- // 橇饭烙况农啊 捞 累诀阑 磊悼栏肺 荐青钦聪促.
- SetIcon(m_hIcon, TRUE); // 奴 酒捞能阑 汲沥钦聪促.
- SetIcon(m_hIcon, FALSE); // 累篮 酒捞能阑 汲沥钦聪促.
- // TODO: 咯扁俊 眠啊 檬扁拳 累诀阑 眠啊钦聪促.
- return TRUE; // 器目胶甫 牧飘费俊 汲沥窍瘤 臼栏搁 TRUE甫 馆券钦聪促.
- }
- void CGg1Dlg::OnSysCommand(UINT nID, LPARAM lParam)
- {
- if ((nID & 0xFFF0) == IDM_ABOUTBOX)
- {
- CAboutDlg dlgAbout;
- dlgAbout.DoModal();
- }
- else
- {
- CDialog::OnSysCommand(nID, lParam);
- }
- }
- // 措拳 惑磊俊 弥家拳 窜眠甫 眠啊且 版快 酒捞能阑 弊府妨搁
- // 酒贰 内靛啊 鞘夸钦聪促. 巩辑/轰 葛胆阑 荤侩窍绰 MFC 览侩 橇肺弊伐狼 版快俊绰
- // 橇饭烙况农俊辑 捞 累诀阑 磊悼栏肺 荐青钦聪促.
- void CGg1Dlg::OnPaint()
- {
- if (IsIconic())
- {
- CPaintDC dc(this); // 弊府扁甫 困茄 叼官捞胶 牧咆胶飘
- SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
- // 努扼捞攫飘 荤阿屈俊辑 酒捞能阑 啊款单俊 嘎娩聪促.
- int cxIcon = GetSystemMetrics(SM_CXICON);
- int cyIcon = GetSystemMetrics(SM_CYICON);
- CRect rect;
- GetClientRect(&rect);
- int x = (rect.Width() - cxIcon + 1) / 2;
- int y = (rect.Height() - cyIcon + 1) / 2;
- // 酒捞能阑 弊赋聪促.
- dc.DrawIcon(x, y, m_hIcon);
- }
- else
- {
- CDialog::OnPaint();
- }
- }
- // 荤侩磊啊 弥家拳等 芒阑 掺绰 悼救俊 目辑啊 钎矫登档废 矫胶袍俊辑
- // 捞 窃荐甫 龋免钦聪促.
- HCURSOR CGg1Dlg::OnQueryDragIcon()
- {
- return static_cast<HCURSOR>(m_hIcon);
- }
- void CGg1Dlg::OnBnClickedBtnGg1()
- {
- CConsole::GetInstance()->Print("text1n");
- CConsole::GetInstance()->Print("%d.%d.%dn", 1, 2, 3);
- }
- void CGg1Dlg::OnDestroy()
- {
- CDialog::OnDestroy();
- CConsole::Release();
- }