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