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. CListBox Header

CListBox Header

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++tutorial
2 Posts 2 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.
  • D Offline
    D Offline
    D Manivelan
    wrote on last edited by
    #1

    Hi, I am working in MFC application. I faced one problem in my application. This application is alread developed. It has CAlarm class it inherited CListbox like

    class CAlarmList : public CListBox

    it displays value through DrawItem

    void CAlarmList::DrawItem(LPDRAWITEMSTRUCT lpDIS)
    {
    // TODO: Add your code to draw the specified item

    int iListItem = lpDIS->itemID;
    CDC lDC;
    lDC.Attach(lpDIS->hDC);
    

    It working fine but not have header. but client looking header but CListbox not have header control how to add header please help me.

    J 1 Reply Last reply
    0
    • D D Manivelan

      Hi, I am working in MFC application. I faced one problem in my application. This application is alread developed. It has CAlarm class it inherited CListbox like

      class CAlarmList : public CListBox

      it displays value through DrawItem

      void CAlarmList::DrawItem(LPDRAWITEMSTRUCT lpDIS)
      {
      // TODO: Add your code to draw the specified item

      int iListItem = lpDIS->itemID;
      CDC lDC;
      lDC.Attach(lpDIS->hDC);
      

      It working fine but not have header. but client looking header but CListbox not have header control how to add header please help me.

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

      Might you try changing to a CListCtrl (that has a built in header)? or maybe add a CHeaderCtrl object just above the list box?

      "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst

      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