Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Icon/Bitmap + text on a button

Icon/Bitmap + text on a button

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphics
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shay Harel
    wrote on last edited by
    #1

    Here is an easy one for you experts.... How do I put a bitmap or an icon on a CButton control and include test as well. what I need is to have the text "Open..." on the button with a small folder icon/bitmap on the left side. Any naswers ? Thanks in advance, Shay

    C N 2 Replies Last reply
    0
    • S Shay Harel

      Here is an easy one for you experts.... How do I put a bitmap or an icon on a CButton control and include test as well. what I need is to have the text "Open..." on the button with a small folder icon/bitmap on the left side. Any naswers ? Thanks in advance, Shay

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      there are a number of bitmap button classes here on CP that will do what you want. i happen to like this one[^]. Cleek | Image Toolkits | Thumbnail maker

      J 1 Reply Last reply
      0
      • C Chris Losinger

        there are a number of bitmap button classes here on CP that will do what you want. i happen to like this one[^]. Cleek | Image Toolkits | Thumbnail maker

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #3

        Unfortunately, that class doesn't handle XP themes, so it would look really ugly in an XP GUI. -- Pictures[^] from my Japan trip.

        C 1 Reply Last reply
        0
        • J Jorgen Sigvardsson

          Unfortunately, that class doesn't handle XP themes, so it would look really ugly in an XP GUI. -- Pictures[^] from my Japan trip.

          C Offline
          C Offline
          Chris Losinger
          wrote on last edited by
          #4

          Jörgen Sigvardsson wrote:

          so it would look really ugly in an XP GUI

          doesn't everything? i still use the 'classic' (Win98) style in XP. Cleek | Image Toolkits | Thumbnail maker

          J 1 Reply Last reply
          0
          • C Chris Losinger

            Jörgen Sigvardsson wrote:

            so it would look really ugly in an XP GUI

            doesn't everything? i still use the 'classic' (Win98) style in XP. Cleek | Image Toolkits | Thumbnail maker

            J Offline
            J Offline
            Jorgen Sigvardsson
            wrote on last edited by
            #5

            > doesn't everything? Indeed. Which is why I'm using the ChaNinja style. > i still use the 'classic' (Win98) style in XP. Yikes! My customers however mostly run XP as is. I doubt many of them know what a theme is. I do know though that they will be able to spot the difference between a seemingly square chunky thing and the rest of the GUI (the Fisher Price/Lego Duplo theme ;)). The worst part is that I've got customers running Win98, Me, NT4 and 2000, so anytime I need to hack up a control, I have to give it two rendering routines. :sigh: (And I refuse to buy a third party class library as well. On a pre-XP box, I want things to look pre-XP. I guess I'm a stubborn GUI fascist :)) -- Pictures[^] from my Japan trip.

            1 Reply Last reply
            0
            • S Shay Harel

              Here is an easy one for you experts.... How do I put a bitmap or an icon on a CButton control and include test as well. what I need is to have the text "Open..." on the button with a small folder icon/bitmap on the left side. Any naswers ? Thanks in advance, Shay

              N Offline
              N Offline
              normanS
              wrote on last edited by
              #6

              I recommend the brute force approach. Since you want to put a bitmap on the button, why not simply include the text you want in the bitmap? (i.e. your bitmap has the text "Open" with the small folder picture next to it.)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups