Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CListCtrl: subitem edit problem

CListCtrl: subitem edit problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NoName II
    wrote on last edited by
    #1

    I have CListCtrl(REPORT) which uses the LVS_EDITLABELS style. Have can I edit subitem of the list?

    A N H 3 Replies Last reply
    0
    • N NoName II

      I have CListCtrl(REPORT) which uses the LVS_EDITLABELS style. Have can I edit subitem of the list?

      A Offline
      A Offline
      AkiraOne
      wrote on last edited by
      #2

      You have tried with: BOOL SetItemText( int nItem, int nSubItem, LPCTSTR lpszText ); Too many plans make the health badly!!

      N 1 Reply Last reply
      0
      • A AkiraOne

        You have tried with: BOOL SetItemText( int nItem, int nSubItem, LPCTSTR lpszText ); Too many plans make the health badly!!

        N Offline
        N Offline
        NoName II
        wrote on last edited by
        #3

        I mean else... i'd like to edit subitem text in controler

        1 Reply Last reply
        0
        • N NoName II

          I have CListCtrl(REPORT) which uses the LVS_EDITLABELS style. Have can I edit subitem of the list?

          N Offline
          N Offline
          NoName II
          wrote on last edited by
          #4

          wrote smth like this..... void CGraphDataEdtDlg::OnBeginlabeledit(NMHDR *pNMHDR, LRESULT *pResult) { NMLVDISPINFO *pDispInfo = reinterpret_cast(pNMHDR); if (m_subitem) { CEdit *edit=m_list.GetEditControl(); if (edit!=NULL) { CRect rtSubItem; m_list.GetSubItemRect(m_item,m_subitem,LVIR_BOUNDS ,rtSubItem); edit->MoveWindow(rtSubItem); CString str; str.Format(_T("left top(%d,%d)\nright bot(%d,%d)"),rtSubItem.left,rtSubItem.top,rtSubItem.right,rtSubItem.bottom); AfxMessageBox(str); edit->SetWindowText(m_list.GetItemText(m_item,m_subitem)); } } *pResult = 0; } call this function with m_list.EditLabel(item); as result my editcontroler always covers 0-subitem of item-raw....

          1 Reply Last reply
          0
          • N NoName II

            I have CListCtrl(REPORT) which uses the LVS_EDITLABELS style. Have can I edit subitem of the list?

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Whats problem with LVN_ENDLABELEDIT_**


            **_

            whitesky


            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups