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. Drawing a CListCtrl to a MemDC

Drawing a CListCtrl to a MemDC

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsperformancehelptutorialquestion
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.
  • A Offline
    A Offline
    Alex Deem
    wrote on last edited by
    #1

    Hi guys, i am somewhat new to GDI coding, and i am about at my wits end as to how to accomplish this.... What i want to do is have 2 CListCtrls, one on top of the other, and then animate the top one moving off (to reveal the other underneath). The top one animates out of view and all we are left with is the bottom one. I am attempting to create an effect somewhat like that in the bar on the left hand side in MS Outlook (though with CListCtrls). My first thoughts as to how to do this nicely were to create two memory dcs and render each ListCtrl to one. Then, at regular time intervals i would BitBlt an amount from each DC to the screenDC and i would have my lovely animation ;) I can create a memDC for the ListCtrl which is at first on the top because i can do a GetDC and then bitblt() from it. However..:confused:...i cannot do the same for the ListCtrl which is initially hidden as its DC will be blank (it hasnt been painted). Is there anyone out there who knows how to get a window to paint itself to a given Memory DC? Or is there anyone who has a better suggestion for creating this effect? Any help would be greatly appreciated, thanks. ~Alex

    M 1 Reply Last reply
    0
    • A Alex Deem

      Hi guys, i am somewhat new to GDI coding, and i am about at my wits end as to how to accomplish this.... What i want to do is have 2 CListCtrls, one on top of the other, and then animate the top one moving off (to reveal the other underneath). The top one animates out of view and all we are left with is the bottom one. I am attempting to create an effect somewhat like that in the bar on the left hand side in MS Outlook (though with CListCtrls). My first thoughts as to how to do this nicely were to create two memory dcs and render each ListCtrl to one. Then, at regular time intervals i would BitBlt an amount from each DC to the screenDC and i would have my lovely animation ;) I can create a memDC for the ListCtrl which is at first on the top because i can do a GetDC and then bitblt() from it. However..:confused:...i cannot do the same for the ListCtrl which is initially hidden as its DC will be blank (it hasnt been painted). Is there anyone out there who knows how to get a window to paint itself to a given Memory DC? Or is there anyone who has a better suggestion for creating this effect? Any help would be greatly appreciated, thanks. ~Alex

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      Check out WM_PRINT - it renders a window into a DC that you supply. --Mike-- http://home.inreach.com/mdunn/ This must be Thursday. I never could get the hang of Thursdays...

      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