亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? day2_addcontroldlg.cpp

?? 書籍:Teach Yourself Visual C++ 6 in 21 Days 第2章的源碼:所有的源碼都是我邊讀邊寫的
?? CPP
字號:
// Day2_AddControlDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Day2_AddControl.h"
#include "Day2_AddControlDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDay2_AddControlDlg dialog

CDay2_AddControlDlg::CDay2_AddControlDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CDay2_AddControlDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDay2_AddControlDlg)
	m_strMessage = _T("");
	m_strProgToRun = _T("");
	m_bEnableMsg = FALSE;
	m_bEnablePgm = FALSE;
	m_bShowMsg = FALSE;
	m_bShowPgm = FALSE;
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CDay2_AddControlDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDay2_AddControlDlg)
	DDX_Text(pDX, IDC_MSG, m_strMessage);
	DDX_CBString(pDX, IDC_PROGTORUN, m_strProgToRun);
	DDX_Check(pDX, IDC_CHECKENBLMSG, m_bEnableMsg);
	DDX_Check(pDX, IDC_CHECKENBLPGM, m_bEnablePgm);
	DDX_Check(pDX, IDC_CHECKSHWMSG, m_bShowMsg);
	DDX_Check(pDX, IDC_CHECKSHWPGM, m_bShowPgm);
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CDay2_AddControlDlg, CDialog)
	//{{AFX_MSG_MAP(CDay2_AddControlDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_BN_CLICKED(IDC_EXIT, OnExit)
	ON_BN_CLICKED(IDC_SHWMSG, OnShwmsg)
	ON_BN_CLICKED(IDC_CLRMSG, OnClrmsg)
	ON_BN_CLICKED(IDC_CHECKENBLMSG, OnCheckenblmsg)
	ON_BN_CLICKED(IDC_CHECKSHWMSG, OnCheckshwmsg)
	ON_BN_CLICKED(IDC_RUNPGM, OnRunpgm)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDay2_AddControlDlg message handlers

BOOL CDay2_AddControlDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	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);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here
	// ADD CODE
    ///////////////////////
     // MY CODE STARTS HERE
     ///////////////////////
 
     // Put a default message in the message edit
     m_strMessage = "Place a message here";
 
     // Set all of the check boxes to checked
    m_bShowMsg = TRUE;
     m_bShowPgm = TRUE;
     m_bEnableMsg = TRUE;
     m_bEnablePgm = TRUE;
 
     // Update the dialog with the values
     UpdateData(FALSE);
 
     ///////////////////////
     // MY CODE ENDS HERE
     ///////////////////////

	
	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CDay2_AddControlDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CDay2_AddControlDlg::OnPaint() 
{
	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		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;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}
}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CDay2_AddControlDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CDay2_AddControlDlg::OnExit() 
{
	// TODO: Add your control notification handler code here
    // ADD CODE:
	OnOK();
	
}

void CDay2_AddControlDlg::OnShwmsg() 
{
	// TODO: Add your control notification handler code here
	// ADD CODE
	// Read the variable value 
	UpdateData(TRUE);
	MessageBox(m_strMessage);
}

void CDay2_AddControlDlg::OnClrmsg() 
{
	// TODO: Add your control notification handler code here
	// ADD CODE
	// Clear the message
    m_strMessage = "";
	// Update the screen
	UpdateData(FALSE);

}

void CDay2_AddControlDlg::OnCheckenblmsg() 
{
	// TODO: Add your control notification handler code here
	// ADD CODE
///////////////////////
// MY CODE STARTS HERE
///////////////////////

// Get the current values from the screen
UpdateData(TRUE);

// Is the Enable Message Action check box checked?
if (m_bEnableMsg == TRUE)
{
    // Yes, so enable all controls that have anything
    // to do with showing the user message
    GetDlgItem(IDC_MSG)->EnableWindow(TRUE);
    GetDlgItem(IDC_SHWMSG)->EnableWindow(TRUE);
    GetDlgItem(IDC_DFLTMSG)->EnableWindow(TRUE);
    GetDlgItem(IDC_CLRMSG)->EnableWindow(TRUE);
    GetDlgItem(IDC_STATICMSG)->EnableWindow(TRUE);
}
else
{
    // No, so disable all controls that have anything
    // to do with showing the user message
    GetDlgItem(IDC_MSG)->EnableWindow(FALSE);
    GetDlgItem(IDC_SHWMSG)->EnableWindow(FALSE);
    GetDlgItem(IDC_DFLTMSG)->EnableWindow(FALSE);
    GetDlgItem(IDC_CLRMSG)->EnableWindow(FALSE);
    GetDlgItem(IDC_STATICMSG)->EnableWindow(FALSE);
}

///////////////////////
// MY CODE ENDS HERE
///////////////////////

	
}

void CDay2_AddControlDlg::OnCheckshwmsg() 
{
	// TODO: Add your control notification handler code here
	// ADD CODE
	///////////////////////
// MY CODE STARTS HERE
///////////////////////

// Get the current values from the screen
UpdateData(TRUE);

// Is the Show Message Action check box checked?
if (m_bShowMsg == TRUE)
{
    // Yes, so show all controls that have anything
    // to do with showing the user message
    GetDlgItem(IDC_MSG)->ShowWindow(TRUE);
    GetDlgItem(IDC_SHWMSG)->ShowWindow(TRUE);
    GetDlgItem(IDC_DFLTMSG)->ShowWindow(TRUE);
    GetDlgItem(IDC_CLRMSG)->ShowWindow(TRUE);
    GetDlgItem(IDC_STATICMSG)->ShowWindow(TRUE);
}
else
{
    // No, so hide all controls that have anything
    // to do with showing the user message
    GetDlgItem(IDC_MSG)->ShowWindow(FALSE);
    GetDlgItem(IDC_SHWMSG)->ShowWindow(FALSE);
    GetDlgItem(IDC_DFLTMSG)->ShowWindow(FALSE);
    GetDlgItem(IDC_CLRMSG)->ShowWindow(FALSE);
    GetDlgItem(IDC_STATICMSG)->ShowWindow(FALSE);
}

///////////////////////
// MY CODE ENDS HERE
///////////////////////
}

void CDay2_AddControlDlg::OnRunpgm() 
{
	// TODO: Add your control notification handler code here
	// ADD CODE
	     ///////////////////////
     // MY CODE STARTS HERE
     ///////////////////////
 
     // Get the current values from the screen
     UpdateData(TRUE);
 
     // Declare a local variable for holding the program name
     CString strPgmName;
 
     // Copy the program name to the local variable
     strPgmName = m_strProgToRun;
 
     // Make the program name all uppercase
     strPgmName.MakeUpper();
 
     // Did the user select to run the Paint program?
     if (strPgmName == "PAINT")
         // Yes, run the Paint program
         WinExec("mspaint.exe", SW_SHOW);
 
     // Did the user select to run the Notepad program?
     if (strPgmName == "NOTEPAD")
         // Yes, run the Notepad program
         WinExec("notepad.exe", SW_SHOW);
 
     // Did the user select to run the Solitaire program?
     if (strPgmName == "SOLITAIRE")
         // Yes, run the Solitaire program
         WinExec("sol.exe", SW_SHOW);
 
     // Did the user select to run the Solitaire program?
     if (strPgmName == "EXPLORER")
         // Yes, run the Solitaire program
         WinExec("explorer.exe", SW_SHOW);
 
     ///////////////////////
     // MY CODE ENDS HERE
     ///////////////////////
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日产欧美精品一区二区三区| 99久久777色| 9191国产精品| 亚洲精品欧美在线| 99久久99精品久久久久久| 国产人成亚洲第一网站在线播放| 久久成人麻豆午夜电影| 在线成人av影院| 一级日本不卡的影视| 韩国v欧美v亚洲v日本v| 欧美成人vps| 激情综合网av| 久久这里只有精品首页| 九九九久久久精品| 欧美精品一区二区蜜臀亚洲| 国产一区二区视频在线| 久久综合久久鬼色中文字| 无吗不卡中文字幕| 337p亚洲精品色噜噜| 视频在线在亚洲| 日韩写真欧美这视频| 蜜臀av在线播放一区二区三区| 欧美大片免费久久精品三p| 麻豆91精品91久久久的内涵| 日韩欧美一二三四区| 美女免费视频一区| 欧美福利电影网| 久久国产精品区| 国产欧美日韩精品一区| 99r精品视频| 午夜伦欧美伦电影理论片| 日韩亚洲欧美一区| 粉嫩av亚洲一区二区图片| 亚洲裸体xxx| 91一区在线观看| 日韩成人av影视| 精品国产sm最大网站| 成人免费观看av| 一区二区在线观看视频在线观看| 91在线视频免费观看| 日本午夜一区二区| 欧美激情一区二区三区在线| 色婷婷激情综合| 蜜桃视频免费观看一区| 国产精品伦理在线| 欧美日韩中文字幕一区| 国产精品一品视频| 午夜精品免费在线| 久久综合成人精品亚洲另类欧美| 国产精品自拍在线| 亚洲影院久久精品| 久久先锋资源网| 欧美在线一二三四区| 国产一区二区三区av电影 | 91片在线免费观看| 色屁屁一区二区| 久久99久久99精品免视看婷婷| 中文字幕一区二区三区不卡在线| 在线播放欧美女士性生活| 成人动漫视频在线| 久久国产欧美日韩精品| 一区二区三区高清| 日韩一区二区免费在线电影| 99热99精品| 国模少妇一区二区三区| 亚洲国产欧美在线| 国产精品成人免费| 26uuu欧美日本| 91精品在线免费观看| bt7086福利一区国产| 麻豆成人久久精品二区三区红 | 日韩小视频在线观看专区| 国产高清久久久久| 亚洲一级片在线观看| 国产精品免费视频观看| 欧美精品一区二区三区蜜臀| 69堂精品视频| 欧美伊人久久久久久久久影院| 丰满少妇在线播放bd日韩电影| 日本成人在线看| 一区2区3区在线看| 亚洲精品自拍动漫在线| 国产精品久久久久永久免费观看 | 久久午夜色播影院免费高清| 欧美二区三区91| 欧美日韩亚洲另类| 欧美中文字幕亚洲一区二区va在线| 99精品视频一区| 91同城在线观看| 99久精品国产| 色婷婷综合在线| 成人深夜福利app| 粉嫩高潮美女一区二区三区| 国产福利一区二区三区在线视频| 国内精品视频666| 国产一区日韩二区欧美三区| 黄网站免费久久| 激情综合色丁香一区二区| 一区二区三区在线高清| 亚洲精品国产a| 亚洲3atv精品一区二区三区| 午夜伦理一区二区| 日本欧美一区二区三区乱码| 蜜桃视频在线观看一区二区| 亚洲大片一区二区三区| 亚洲成av人影院| 青青草成人在线观看| 麻豆高清免费国产一区| 国产美女一区二区三区| 丰满白嫩尤物一区二区| 91视频在线观看| 成人福利视频网站| 日本韩国精品在线| 欧美高清hd18日本| 久久网站热最新地址| 国产精品午夜久久| 亚洲免费av网站| 蜜桃av一区二区三区电影| 国产盗摄女厕一区二区三区| 国内精品视频一区二区三区八戒| 丁香六月综合激情| 色综合色狠狠综合色| 欧美精品久久一区二区三区| 精品精品国产高清a毛片牛牛 | 欧美日韩国产成人在线91| 一区二区不卡在线播放 | 国产在线视视频有精品| 国产成人免费视频一区| 91亚洲精华国产精华精华液| 欧美日产国产精品| 国产精品毛片久久久久久| 日韩精品每日更新| 91日韩一区二区三区| 久久综合色一综合色88| 亚洲成a人在线观看| 99在线精品免费| 精品国产91久久久久久久妲己| 一区二区视频在线看| 国产高清精品久久久久| 欧美一级欧美三级| 亚洲一区在线看| 99热这里都是精品| 国产无人区一区二区三区| 奇米777欧美一区二区| 欧美中文字幕久久| 亚洲另类在线视频| 不卡的av电影| 国产人成亚洲第一网站在线播放| 日本最新不卡在线| 欧美日韩在线播放| 一区二区三区在线观看视频| caoporn国产精品| 中文字幕巨乱亚洲| 国产另类ts人妖一区二区| 欧美电影免费提供在线观看| 午夜欧美电影在线观看| 欧美专区亚洲专区| 亚洲综合在线第一页| 91视频观看免费| 18成人在线观看| hitomi一区二区三区精品| 日本一区二区三区视频视频| 国内精品伊人久久久久影院对白| 精品伦理精品一区| 麻豆精品视频在线观看| 91精品啪在线观看国产60岁| 天天综合网天天综合色| 欧美一级在线视频| 奇米精品一区二区三区四区| 欧美一二三区精品| 久久99久久精品| 亚洲精品欧美激情| 91在线免费播放| 最近中文字幕一区二区三区| 色综合久久久久| 亚洲精品国产品国语在线app| 色久优优欧美色久优优| 亚洲国产精品精华液网站| 欧美日韩在线播放三区四区| 免费人成精品欧美精品| 26uuu另类欧美| jiyouzz国产精品久久| 亚洲影院理伦片| 日韩午夜电影av| 国产一区二区三区在线观看精品 | 欧美一卡2卡三卡4卡5免费| 久久国产尿小便嘘嘘尿| 国产欧美日韩三级| 一本到一区二区三区| 日韩电影在线免费看| 久久久精品中文字幕麻豆发布| 国产成人av一区| 亚洲综合无码一区二区| 欧美v日韩v国产v| 春色校园综合激情亚洲| 亚洲综合视频在线| 久久婷婷一区二区三区| 91蝌蚪porny九色| 美女在线一区二区| 国产精品成人免费|