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. List control in FormView

List control in FormView

Scheduled Pinned Locked Moved C / C++ / MFC
8 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.
  • H Offline
    H Offline
    hellogany
    wrote on last edited by
    #1

    Hi All I am using list control(report style) in formview. I am trying to insert the columns in OnCreate (or) Show Window Function. But Neither Works .. Any Way to Solve it. Regards Gany

    J 1 Reply Last reply
    0
    • H hellogany

      Hi All I am using list control(report style) in formview. I am trying to insert the columns in OnCreate (or) Show Window Function. But Neither Works .. Any Way to Solve it. Regards Gany

      J Offline
      J Offline
      john5632
      wrote on last edited by
      #2

      How you are doing..plz insert code!

      H 1 Reply Last reply
      0
      • J john5632

        How you are doing..plz insert code!

        H Offline
        H Offline
        hellogany
        wrote on last edited by
        #3

        m_listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); CRect rect; m_listctrl.GetClientRect(&rect); int ctl=rect.Width()/10; m_listctrl.InsertColumn(0,"ORDERNO",LVCFMT_LEFT,ctl); m_listctrl.InsertColumn(1,"MOLDNO",LVCFMT_LEFT,ctl); m_listctrl.InsertColumn(2,"OD TYPE",LVCFMT_LEFT,ctl);

        J 1 Reply Last reply
        0
        • H hellogany

          m_listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); CRect rect; m_listctrl.GetClientRect(&rect); int ctl=rect.Width()/10; m_listctrl.InsertColumn(0,"ORDERNO",LVCFMT_LEFT,ctl); m_listctrl.InsertColumn(1,"MOLDNO",LVCFMT_LEFT,ctl); m_listctrl.InsertColumn(2,"OD TYPE",LVCFMT_LEFT,ctl);

          J Offline
          J Offline
          john5632
          wrote on last edited by
          #4

          yes its working for me. Might be width problem, set it manual.

          H 1 Reply Last reply
          0
          • J john5632

            yes its working for me. Might be width problem, set it manual.

            H Offline
            H Offline
            hellogany
            wrote on last edited by
            #5

            Hi While Debugging i m gettin error in m_listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); code itself

            J 1 Reply Last reply
            0
            • H hellogany

              Hi While Debugging i m gettin error in m_listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); code itself

              J Offline
              J Offline
              JM2251
              wrote on last edited by
              #6

              whats the error!

              H 1 Reply Last reply
              0
              • J JM2251

                whats the error!

                H Offline
                H Offline
                hellogany
                wrote on last edited by
                #7

                Assertion Error!!! Where u writing the code OnCreate or OnShowWindow()????

                H 1 Reply Last reply
                0
                • H hellogany

                  Assertion Error!!! Where u writing the code OnCreate or OnShowWindow()????

                  H Offline
                  H Offline
                  hellogany
                  wrote on last edited by
                  #8

                  Hi I m using splitterwndow. left view consists of treeview with various items.. right view contains frame windows that appears when cliking an item in treeview.. With this type we can use our listcontrol right?

                  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