enhzflep Posted July 16, 2008 Share Posted July 16, 2008 (edited) Just found a great article on CodeProject a few minutes ago and it just seemed too good not to share. I realize many of you will visit there already. But this just seemed like a gem, worthy of mentioning. The idea is to programmatically build up an image using layers, in much the same way as Photoshop. After these layers have been assembled, a single bitmap is created showing the result of combining them. This means that re-draws are lightning-quick, since all the hard-work has already been done, and the code is just blasting a HBITMAP back onto the screen. Like all articles it comes with full source, though you've got to be a member to download them. So I'll just provide a link to the original article as well as the downloads for it. This image above was created using the shield as a png, and just 7 lines of code! - OOps, I mean 9 lines of code. This image just shows some of things possible. I'm a bit of two minds, as to whether our std practice of including images for everything is going to be better, or if this appraoch will be better. I suppose that if it doesn't suit you, you can always return it :tongue: No, to be fair - the thing I like about it most, is the ability to provide a complex interface that the user can customize the colours of at run-time, without us having to (a) include as many different colour schemes as we can think of, or ( do all the dirty work needed to colorize images used for interface items. In any case, it seems pretty damn neat from where I'm sitting. You can read the article here: [s]http://www.codeproject.com/KB/cpp/Style_Toolkit.aspx [EDIT] The article has since been moved to: http://www.codeproject.com/KB/GDI-plus/Style_Toolkit.aspx - thanks Azmo. StyleToolkit_src.zip StyleToolkit_exe.zip StyleToolkit_demo_src.zip Edited July 18, 2008 by enhzflep Link to comment
zugo Posted July 16, 2008 Share Posted July 16, 2008 http://www.codeproject.com/KB/cpp/Style_Toolkit.aspx Page Not Found Link to comment
azmo Posted July 16, 2008 Share Posted July 16, 2008 try this http://www.codeproject.com/KB/GDI-plus/Style_Toolkit.aspxazmo Link to comment
oricode Posted July 23, 2008 Share Posted July 23, 2008 Nice.. will keep me occupied tonight Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now