본문 바로가기
반응형

C & C++444

[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.
(Tip) 포인터 값으로 추적하는 디버그 팁 종종 프로그램을 짜다 보면 이상한 알수없는 16진수 형식의 숫자와 함께 띵~ 하는 효과음을 동반한 에러가 발생할 경우가 있다... 보통 그런경우 포인터에 의한 메모리 접근상의 오류 일 경우가 대부분이다.. 그리고 그런 값들은 몇가지 정해진 값들이 반복적으로 나온다는 사실을 알게 된다.. 이러한 값들과 그 값에 해당하는 에러를 살펴 보도록 하자 0xcccccccc (3435973836) - 초기화 되지 않은 지역변수. 0xcdcdcdcd (3452816845) - 초기화되지 않은 힙에 할당된 메모리. 0xdddddddd (3722304989) - 힙에서 free된 메모리. 0xfeeefeee (4277075694) - 힙에서 free된 메모리. 0xfdfdfdfd (4261281277) - 힙에 할당된 메.. 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.
반응형