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. bitmap on button

bitmap on button

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestion
9 Posts 5 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
    Sunshine Always
    wrote on last edited by
    #1

    hi, i need to place a bitmap on button along with the text on the button. i tried using CBitmapButton but don't get the text or rather the caption of the button. any suggestions???

    M P Y 3 Replies Last reply
    0
    • S Sunshine Always

      hi, i need to place a bitmap on button along with the text on the button. i tried using CBitmapButton but don't get the text or rather the caption of the button. any suggestions???

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      I think you can only do that on toolbar control buttons, not on standard buttons. You can make the text part of the bitmap though :) May be a problem for a multi-language app though.

      S 1 Reply Last reply
      0
      • M Mark Salsbery

        I think you can only do that on toolbar control buttons, not on standard buttons. You can make the text part of the bitmap though :) May be a problem for a multi-language app though.

        S Offline
        S Offline
        Sunshine Always
        wrote on last edited by
        #3

        isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?

        H M 2 Replies Last reply
        0
        • S Sunshine Always

          isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          Can you derived CButton and use of WM_DRAWITEM ?


          WhiteSky


          1 Reply Last reply
          0
          • S Sunshine Always

            hi, i need to place a bitmap on button along with the text on the button. i tried using CBitmapButton but don't get the text or rather the caption of the button. any suggestions???

            P Offline
            P Offline
            priyeshtinku
            wrote on last edited by
            #5

            This is right approch to go with CBitmapButton. use LoadBitmaps after create cBitmapButton Please give code how u r doing this Subhash jain(Sundyne Technologies Pvt. Ltd. Lower Parel Mumabi)

            S H 2 Replies Last reply
            0
            • P priyeshtinku

              This is right approch to go with CBitmapButton. use LoadBitmaps after create cBitmapButton Please give code how u r doing this Subhash jain(Sundyne Technologies Pvt. Ltd. Lower Parel Mumabi)

              S Offline
              S Offline
              Sunshine Always
              wrote on last edited by
              #6

              why do you need LoadBitmap after CBitmapButton?

              1 Reply Last reply
              0
              • S Sunshine Always

                isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #7

                Sunshine Always wrote:

                isn't there a way to keep the caption of the button same and getting the bitmap in one corner of the button?

                I agree with WhiteSky. You'd have to draw it yourself.

                1 Reply Last reply
                0
                • P priyeshtinku

                  This is right approch to go with CBitmapButton. use LoadBitmaps after create cBitmapButton Please give code how u r doing this Subhash jain(Sundyne Technologies Pvt. Ltd. Lower Parel Mumabi)

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #8

                  Can you more explain


                  WhiteSky


                  1 Reply Last reply
                  0
                  • S Sunshine Always

                    hi, i need to place a bitmap on button along with the text on the button. i tried using CBitmapButton but don't get the text or rather the caption of the button. any suggestions???

                    Y Offline
                    Y Offline
                    yarksun
                    wrote on last edited by
                    #9

                    I think that your question is that has a function that set visibly.

                    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