1

I'm building a Win32 application with C++ which needs to display a list of relatively simple items from Twitter. Each item in the list would include the author and the tweet text along some icons. It would be nice to have smooth scrolling and acceleration along the lines of the Twitter client on OS X (probably done using Core Animation). I only need to support Windows 7.

I'm assuming I need to create some type of owner drawn listbox which is virtualized to allow for a lot of items. Are there some examples of this out there that do something similar?

I've been thinking of using Direct2D and DirectWrite, but these don't seem to be suited to control development. I'm assuming that these new technologies would require me to implement hit testing as I'd be responsible for rendering each of the items, and I'd also have to work out the physics for scrolling the list. Is it sane to continue researching this? Has anyone got examples of Direct2D as a replacement for owner-drawn Win32 controls.

Brian Lyttle
  • 14,558
  • 15
  • 68
  • 104

1 Answers1

1

Direct2D is a pretty simple and easy API to use. I did write my own controls in it (only relatively simple ones like buttons) and it wasn't terribly difficult at all. I found it easier than researching the WinAPI controls, that's for sure. Of course, Direct2D is intended for high-performance 2D rendering, not necessarily interactive controls.

Puppy
  • 144,682
  • 38
  • 256
  • 465
  • 1
    I found a sample from MS that does something along the lines of what I need to do at http://msdn.microsoft.com/en-us/library/dd756746(v=vs.85).aspx. They seem to have "Samples" and "Samples and Code Examples" sections on the site which is confusing. – Brian Lyttle Jan 07 '11 at 15:09