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. Is it better solution for Refreshing Problem in List Control...

Is it better solution for Refreshing Problem in List Control...

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
1 Posts 1 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.
  • R Offline
    R Offline
    Ravi Sankar S
    wrote on last edited by
    #1

    Hello All I am using List control on my Form View (VC 6.0 on Windows 2000). I have derived my own class from CListCtrl and overwritten "OnCustomDraw" to draw my own List Control. I have placed the control on top of the Tab Control. When I switch from my application to another application and come back, repainting is not happening properly. I am seeing the tab control and the list control is not visible. After some time it appears automatically or if i go to some other tab and come back it appears. I have not overloaded OnDraw in my View Class.If I use CListCtrl without using my own class then repainting happens properly. As a solution for above problem I overloaed OnDraw in my view class and i painted the list controls. void CMyView::OnDraw(CDC* pDC) { if (m_oTabCtrl.GetCurSel () == 0) { m_oMyListCtrl1.Invalidate (); } else { m_oMyListCtrl2.Invalidate (); } } After this I am not getting any painting problem. Please let me know what was the cause for above problem and whether is there any better solution than this? Thanks for your time Ravi

    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