在黑暗中举起探索的火炬的网志
在喧闹、混杂的生活中
你应该与你的心灵和平相处
尽管这世上有很多假冒和欺骗
有很多单调乏味的工作
和众多破灭的梦幻
它仍然是一个美好的世界
记住:你应该努力去追求幸福。
是的,记住:你应该努力去追求幸福。
每个早晨灿烂的太阳升起的时候,
每个人都应
-
2004-04-29
[原创] DynamicCreateButton - [VC开发专辑]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
// DynamicCreateButtonDlg.h : header file // #if !defined(AFX_DYNAMICCREATEBUTTONDLG_H__BF0B7061_9F30_484D_92DA_97435414E97A__INCLUDED_) #define AFX_DYNAMICCREATEBUTTONDLG_H__BF0B7061_9F30_484D_92DA_97435414E97A__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "TextBtn.h" ///////////////////////////////////////////////////////////////////////////// // CDynamicCreateButtonDlg dialog class CDynamicCreateButtonDlg : public CDialog { // Construction public: CDynamicCreateButtonDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDynamicCreateButtonDlg) enum { IDD = IDD_DYNAMICCREATEBUTTON_DIALOG }; int m_nCntofDBtn; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDynamicCreateButtonDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CDynamicCreateButtonDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void On_Btn_Create(); afx_msg void On_Btn_Erase(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: CTextBtn* m_btn; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DYNAMICCREATEBUTTONDLG_H__BF0B7061_9F30_484D_92DA_97435414E97A__INCLUDED_) // DynamicCreateButtonDlg.cpp : implementation file // #include "stdafx.h" #include "DynamicCreateButton.h" #include "DynamicCreateButtonDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #define ID_MYBTN 1978 ///////////////////////////////////////////////////////////////////////////// // 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() ///////////////////////////////////////////////////////////////////////////// // CDynamicCreateButtonDlg dialog CDynamicCreateButtonDlg::CDynamicCreateButtonDlg(CWnd* pParent /*=NULL*/) : CDialog(CDynamicCreateButtonDlg::IDD, pParent) { //{{AFX_DATA_INIT(CDynamicCreateButtonDlg) m_nCntofDBtn = 0; //}}AFX_DATA_INIT // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); } void CDynamicCreateButtonDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CDynamicCreateButtonDlg) DDX_Text(pDX, IDC_EDIT1, m_nCntofDBtn); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CDynamicCreateButtonDlg, CDialog) //{{AFX_MSG_MAP(CDynamicCreateButtonDlg) ON_WM_SYSCOMMAND() ON_WM_PAINT() ON_WM_QUERYDRAGICON() ON_BN_CLICKED(IDC_BUTTON1, On_Btn_Create) ON_BN_CLICKED(IDC_BUTTON2, On_Btn_Erase) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CDynamicCreateButtonDlg message handlers BOOL CDynamicCreateButtonDlg::OnInitDialog() { CDialog::OnInitDialog(); // Add "About..." menu item to system menu. // IDM_ABOUTBOX must be in the system command range. ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_
http://junglesong.yourblog.org/logs/163422.html
随机文章:
[转载] Visual C++ 编程问答(三) 2004-04-29[转载] Visual C++ 编程问答(一) 2004-04-29[原创] SHFolder 2004-04-29[原创] CAutoCompleteCombo 2004-04-29[转贴] 学好VC++的十大良好习惯 2004-04-09
收藏到:Del.icio.us





