Now that the carousel code is working correctly across a range of devices, I decided to upload it as a preview (download here). The code illustrates the carousel animation and user control as a strip on the child window of the WTL main frame. I'm still wondering how this "control" should be implemented, either as a "widget" on the main frame or as a toolbar-like control.
The main frame approach would implement the carousel code in the main frame allowing it to correctly resize the child window and even allowing the application to change the child view (like in a property sheet). With this approach it might also be easier to implement a means to change the location of the bar whan the screen is rotated. In fact, the carousel looks much nicer in a vertical position when you rotate your screen to landscape (right or left would be up to you).
Implementing this as a toolbar control would have the advantage of allowing the developer to reuse the code outside the main window, especially on dialogs and modified property sheets...
While I think about what to do, please do take a look at the code. The icons were "created" with Axialis IconWorkshop, one of the best icon editors around. Please note that these icons can only be used by registered users of the product and I'm not sure that you can reuse them on your applications.
Wednesday, November 07, 2007
Subscribe to:
Post Comments (Atom)
3 comments:
Nice control!
At the moment I haven't the time to look at the code, so I just compiled it.
Just a question: in CarouselDemoView, there are 2 references to ILC_COLOR32, but in this way I get a compiler error...I replaced them with ILC_COLOR, afaik Windows Mobile SDK has support only for that, isn't it?
This constant is defined on my Windows Mobile 5.0 Pocket PC SDK on the header file commctrl.h. Interestingly, I already shared this source code with others who complained about the very same thing...
Ok, with Windows Mobile 5 SDK I have that define, previously I compiled with PPC 2003 SDK (it was selected by default when I opened the solution).
Post a Comment