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

PNG on button

Scheduled Pinned Locked Moved C / C++ / MFC
graphics
6 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.
  • K Offline
    K Offline
    kiranin
    wrote on last edited by
    #1

    Using Graphics DrawImage method am drawing a PNG image on button,it displays once but it is not sustaining when mouse moves on the button

    Richard Andrew x64R H CPalliniC I 4 Replies Last reply
    0
    • K kiranin

      Using Graphics DrawImage method am drawing a PNG image on button,it displays once but it is not sustaining when mouse moves on the button

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      Are you sure you have the right forum? This is for unmanaged C++. It sounds like you might want the C# forum.

      K 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        Are you sure you have the right forum? This is for unmanaged C++. It sounds like you might want the C# forum.

        K Offline
        K Offline
        kiranin
        wrote on last edited by
        #3

        yes.. in VC++ using GDI+

        1 Reply Last reply
        0
        • K kiranin

          Using Graphics DrawImage method am drawing a PNG image on button,it displays once but it is not sustaining when mouse moves on the button

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

          Show code,please?

          Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )

          1 Reply Last reply
          0
          • K kiranin

            Using Graphics DrawImage method am drawing a PNG image on button,it displays once but it is not sustaining when mouse moves on the button

            CPalliniC Offline
            CPalliniC Offline
            CPallini
            wrote on last edited by
            #5

            Probably you're writing the button in the wrong message handler (if it is a message handler). As already suggested by Hamid, you should post some code to obtain help. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
            [My articles]

            In testa che avete, signor di Ceprano?

            1 Reply Last reply
            0
            • K kiranin

              Using Graphics DrawImage method am drawing a PNG image on button,it displays once but it is not sustaining when mouse moves on the button

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              kiranin wrote:

              but it is not sustaining when mouse moves on the button

              That is not a surprise. The button redraws itself when it is hovered over, clicked on, not clicked on, when it's just plain spiteful... You need to put the drawing code in the right place. Search the articles on codeproject for owner draw buttons. (http://www.codeproject.com/KB/buttons/[^]) and replace their drawing code with your own PNG stuff. You may even find a PNG drawing button already done. Iain.

              Codeproject MVP for C++, I can't believe it's for my lounge posts...

              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