반응형 C & C++/MFC 컨트롤199 [List] Bitmap List // ListsDlg.h class CListsDlg : public CDialog { // Construction public: //-- CImageList m_LargeImage; CImageList m_SmallImage; //-- } // ListsDlg.cpp static CString strName[] = {_T("테스터1"), _T("테스터2"), _T("테스터3"), _T("테스터4"), _T("테스터5"), _T("테스터6"), _T("테스터7")}; static CString strMode[] = {_T("Icon"), _T("Small Icon"), _T("List"), _T("Report")}; BOOL CListsDlg::OnInitDialog() { CDialog::OnInitD.. 2011. 5. 21. [Button] Bitmap Button 02 // BitmapButton2.h class CBitmapButton2Dlg : public CDialog { // Construction public: CBitmapButton2Dlg(CWnd* pParent = NULL); // standard constructor CBitmap m_bmpOk; CBitmap m_bmpCancel; // Dialog Data //{{AFX_DATA(CBitmapButton2Dlg) enum { IDD = IDD_BITMAPBUTTON2_DIALOG }; CButton m_ctrlCancel; CButton m_ctrlOK; // NOTE: the ClassWizard will add data members here //}}AFX_DATA //... } // Bitma.. 2011. 5. 21. [Button] Bitmap Button 01 // BitmapButtonDlg.h class CBitmapButtonDlg : public CDialog { // Construction public: //... CBitmapButton Button[5]; //... } // BitmapButtonDlg.cpp BOOL CBitmapButtonDlg::OnInitDialog() { CDialog::OnInitDialog(); // 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, FA.. 2011. 5. 21. [ToolTip] 정적툴팁 // ToolTipDlg.h class CToolTipDlg : public CDialog { // Construction public: CToolTipDlg(CWnd* pParent = NULL); // standard constructor CToolTipCtrl m_ctrlTT; // Dialog Data //{{AFX_DATA(CToolTipDlg) enum { IDD = IDD_TOOLTIP_DIALOG }; CSliderCtrl m_ctrlSlider; // Control형 멤버 변수 연결 //.. } // ToolTipDlg.cpp BOOL CToolTipDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog.. 2011. 5. 21. [ToolTip] 동적 툴팁 // ToolTipDlg.h class CToolTipDlg : public CDialog { // Construction public: void OnNeedText(NMHDR *pnmh, LRESULT* pResult); CToolTipDlg(CWnd* pParent = NULL); // standard constructor CToolTipCtrl m_ctrlTT; // 인스턴스 선언 // Dialog Data //{{AFX_DATA(CToolTipDlg) enum { IDD = IDD_TOOLTIP_DIALOG }; CSliderCtrl m_ctrlSlider; //}}AFX_DATA //... } // ToolTipDlg.cpp BEGIN_MESSAGE_MAP(CToolTipDlg, CDialog).. 2011. 5. 21. [Ctrl] Checkbox 사용법 * 체크박스.. 체크하기 1. m_ctrCheck.SetCheck(1); 2. CheckDlgButton(IDC_CHECK1, TRUE); * 체크풀기 1. m_ctrCheck.SetCheck(0); 2. CheckDlgButton(IDC_CHECK1, FALSE); * 체크했는지여부 m_ctrCheck.GetCheck(); if( m_Checkbox_01.GetCheck() == 1 ) { } 2011. 5. 20. 이전 1 ··· 12 13 14 15 16 17 18 ··· 34 다음 반응형