none
How to LB RRS feed

  • 질문

  • void CExListBoxView::OnInitialUpdate()
    {
     CFormView::OnInitialUpdate();
     GetParentFrame()->RecalcLayout();
     ResizeParentToFit();

     m_list.AddString("사과");

    }

    void CExListBoxView::OnADD()
    {
     // TODO: Add your control notification handler code here
     CString str;
     m_edit.GetWindowText(str);
     m_list.AddString(str);

    }

    void CExListBoxView::OnDel()
    {
     // TODO: Add your control notification handler code here
     int nIndex = m_list.GetCurSel();
     if(nIndex != LB_ERR)
      m_list.DeleteString(nIndex);

    }

    void CExListBoxView::OnDblclkList1()
    {
     // TODO: Add your control notification handler code here

     int nIndex = m_list.GetCurSel();
     if(nIndex != LB_ERR){
      CString str;
      m_list.GetText(nIndex, str);
      MessageBox(str);
     }
    }

    void CExListBoxView::OnSelchangeList1()
    {
     // TODO: Add your control notification handler code here
     int nIndex = m_list.GetCurSel();
     if(nIndex != LB_ERR){
      CString str;
      m_list.GetText(nIndex, str);
      CWnd *ptr =AfxGetMainWnd();
      ptr->SetWindowText(str);
     }
    }

    void CExListBoxView::OnChangeEdit1()
    {
     // TODO: If this is a RICHEDIT control, the control will not
     // send this notification unless you override the CFormView::OnInitDialog()
     // function and call CRichEditCtrl().SetEventMask()
     // with the ENM_CHANGE flag ORed into the mask.
     
     // TODO: Add your control notification handler code here
     
     CString str;
     m_edit.GetWindowText(str);
     CWnd *ptr =AfxGetMainWnd();
     ptr->SetWindowText(str);


    }

    • 이동됨 Alicia CalesMicrosoft employee 2010년 4월 14일 수요일 오전 6:58 Forums Consolidation (이전 위치:Smart Devices Native C++ Development)
    2009년 12월 14일 월요일 오후 12:10