* ë°œí‘œì— ê¼ ë“¤ì–´ê°€ì•¼ í• ê²ƒë“¤ * í‘¸ì‰¬ë²„íŠ¼ì€ ì–´ë–»ê²Œ 만드나? * í‘¸ì‰¬ë²„íŠ¼ì„ ëˆŒë €ì„ ë•Œì˜ ì²˜ë¦¬ëŠ” 어떻게 하나? * ë¼ë””ì˜¤ë²„íŠ¼ì€ ì–´ë–»ê²Œ 만드나? * ë¼ë””ì˜¤ë²„íŠ¼ì´ ì„ íƒë˜ì–´ 있는지 어떻게 확ì¸í•˜ë‚˜? * ì²´í¬ë°•ìŠ¤ëŠ” 어떻게 만드나? * ì²´í¬ë°•ìŠ¤ê°€ ì²´í¬ë˜ì–´ 있는지 어떻게 확ì¸í•˜ë‚˜? * 다ì´ì–¼ë¡œê·¸ 박스ì—ì„œ ë§Œë“¤ê³ ì‚¬ìš©í•˜ëŠ” ë°©ë²•ì„ ë°œí‘œí•˜ë©´ 안ë¨! == 버튼 == === CMy111View === {{{~cpp public: CButton myButton1, myButton2, myButton3, myButton4; }}} {{{~cpp protected: //{{AFX_MSG(CMy111View) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); }}} {{{~cpp BEGIN_MESSAGE_MAP(CMy111View, CView) //{{AFX_MSG_MAP(CMy111View) ON_WM_CREATE() ON_BN_CLICKED(1,OnButton1Click) }}} {{{~cpp // CMy111View message handlers int CMy111View::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CView::OnCreate(lpCreateStruct) == -1) return -1; // Create a push button. myButton1.Create(_T("푸시 버튼"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, CRect(10,10,200,30), this, 1); // Create a radio button. myButton2.Create(_T("ë¼ë””오 버튼"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON, CRect(10,40,200,70), this, 2); // Create an auto 3-state button. myButton3.Create(_T("3ìƒíƒœ 버튼"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE, CRect(10,70,200,100), this, 3); // Create an auto check box. myButton4.Create(_T("ì²´í¬ë°•ìŠ¤"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX, CRect(10,100,200,130), this, 4); return 0; } void CMy111View::OnButton1Click() { MessageBox(_T("ë²„íŠ¼ì´ ëˆŒë ¤ì¡ŒìŠµë‹ˆë‹¤.")); } }}} ||Value|| Meaning || ||BST_UNCHECKED|| Button state is unchecked. || ||BST_CHECKED|| Button state is checked. || ||BST_INDETERMINATE|| Button state is indeterminate (applies only if the button has the BS_3STATE or BS_AUTO3STATE style). || {{{~cpp void CMy111View::OnButton1Click() { check3=myButton3.GetCheck(); if(check3==BST_CHECKED) MessageBox(_T("3버튼 ì²´í¬ë˜ì–´ 있ìŒ")); else if(check3==BST_UNCHECKED) MessageBox(_T("3버튼 ì²´í¬ ì•ˆë˜ì–´ 잇ìŒ")); else if(check3==BST_INDETERMINATE) MessageBox(_T("3버튼 í¬ë„므리하게 ì²´í¬ë˜ì–´ 있ìŒ")); } }}} {{{~cpp myButton2.SetCheck( BST_CHECKED ); }}} {{{~cpp check2=myButton2.GetCheck(); if(check3==BST_CHECKED) MessageBox(_T("ë¼ë””오버튼 ì²´í¬ë˜ì–´ 있ìŒ")); else if(check3==BST_UNCHECKED) MessageBox(_T("ë¼ì´ì˜¤ë²„튼 ì²´í¬ ì•ˆë˜ì–´ 잇ìŒ")); }}} ||Upload:CButton.zip||