WinapiZone.net




Extensions > ImageButton

ImageButton


Buttons with images are beautiful, and I've always appreciated programs which use them. There are plenty of samples created by users using MFC (you'll find them on Codeguru.com or Codeproject.com). But, what about WinAPIs? It seems that there's no article about buttons+images for WinAPIs. So, with the help of MSDN and followind a trial-and-error way I've "created" these owner drawn button you can see on top of this page.

Here's a list of the main features.

Features

  • Buttons are aware of Windows XP themes
  • Support for Unicode
  • Compatibility with older version of Windows
  • Both bitmaps and icons can be used
  • An image can be shown when the mouse hovers the button
  • An image can be shown when the button is disabled
  • You can use a lighter image as hover image for the button
  • You can use a grayscale image as disabled image for the button
  • You can change a cursor or all cursor programmatically
  • You can load and display icons with any size you want
  • You can load images from dlls and exes different from your current one
  • You can create a button without any image... (only text)
  • ...and you can create a button without text (only image)

This page was last modified 45 months, a week, 3 days and 5 hours ago