CStatic-Derived Flat Button Class

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Description

CStaticButton is a class derived from MFC CStatic class.
With this class your applications can have standard buttons
or new and modern buttons with “flat” style!

CStaticButton features:


  • Standard CStatic properties
  • Only Bitmap Button – But, Adding Icon so esay
  • Not Depend on Format, 2 color – true color support
  • Standard or new “flat” button style
  • Change runtime from Enable-Disable Image
  • Change runtime from ToolTips and CRgn(Default-rect region)
  • Can be used via DDX_ calls
  • Can be dinamically created
  • Each button can have its own mouse pointer
  • Full source code included!
  • It’s free!

Summary

I don’t speak English very well. However, I think that the code is simple and
easy enough to follow. Just don’t forget to change the button image’s Notify
property

Downloads

Download demo project – 64 Kb
Download source – 3 Kb

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read