Thread: Icons and Buttons in Win32 API

  1. #1
    Quietly Lurking
    Join Date
    Aug 2001

    Icons and Buttons in Win32 API

    Is there an easy way to use an icon as the caption of a button.
    When using Visual C++ 6.0, when designing a dialog, the properties menu for a pushbutton gives you the option to check a box with the title icon, which I assumed would allow you to do this, but i dont know how to tell it which icon to use. Any help would be appreciated

  2. #2
    Registered User ExDigit's Avatar
    Join Date
    Jan 2002
    Try something like this:


    Basically sending the WM_SETICON message to the button. I haven't tested this, but it may work.
    Win32 API C
    Bloodshed Dev-C++ Beta 5
    Microsoft Windows 2000 Pro

  3. #3
    Quietly Lurking
    Join Date
    Aug 2001
    Heh, it took some time searching through MSDN, but I found the answer. You were really close, instead of sending WM_SETICON you send BM_SETIMAGE

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Putting tool buttons onto windows
    By eth0 in forum Windows Programming
    Replies: 7
    Last Post: 04-10-2006, 04:15 PM
  2. Clipart for Toolbar Buttons?
    By Davros in forum A Brief History of
    Replies: 0
    Last Post: 02-24-2006, 10:23 AM
  3. Windows XP - File Types and Icons
    By LuckY in forum Tech Board
    Replies: 7
    Last Post: 05-18-2005, 04:35 PM
  4. Icons???
    By gvector1 in forum C# Programming
    Replies: 3
    Last Post: 12-15-2003, 01:03 AM