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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to draw a banner and button ?

How to draw a banner and button ?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
7 Posts 3 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.
  • V Offline
    V Offline
    VCProgrammer
    wrote on last edited by
    #1

    hi all, i want t draw banner and button for the dialog box according to current system theme. please help me how can i do this. thanks in advance.

    _ L 2 Replies Last reply
    0
    • V VCProgrammer

      hi all, i want t draw banner and button for the dialog box according to current system theme. please help me how can i do this. thanks in advance.

      _ Offline
      _ Offline
      _Flaviu
      wrote on last edited by
      #2

      For button, you can use CBitmapButton[^], and for the banner, you can use CStatic[^], where you can put there a bitmap, like banner ... of course, you can find here a derived CButton controls ...

      V 1 Reply Last reply
      0
      • _ _Flaviu

        For button, you can use CBitmapButton[^], and for the banner, you can use CStatic[^], where you can put there a bitmap, like banner ... of course, you can find here a derived CButton controls ...

        V Offline
        V Offline
        VCProgrammer
        wrote on last edited by
        #3

        i dont want to use image for this. i want to get current system theme and its color than according to this draw the graphics. what can i do for this? thanks.

        _ 1 Reply Last reply
        0
        • V VCProgrammer

          i dont want to use image for this. i want to get current system theme and its color than according to this draw the graphics. what can i do for this? thanks.

          _ Offline
          _ Offline
          _Flaviu
          wrote on last edited by
          #4

          Well, then you only must setup a style for your application (setup manifest file) and you'll have a current system style on your button and CStatic. If I well understand ...

          V 1 Reply Last reply
          0
          • _ _Flaviu

            Well, then you only must setup a style for your application (setup manifest file) and you'll have a current system style on your button and CStatic. If I well understand ...

            V Offline
            V Offline
            VCProgrammer
            wrote on last edited by
            #5

            yes how can use setup style?

            _ 1 Reply Last reply
            0
            • V VCProgrammer

              yes how can use setup style?

              _ Offline
              _ Offline
              _Flaviu
              wrote on last edited by
              #6

              Very simple: add manifest file in your project resource folder, and then open Resource.h:

              #if _MSC_VER <= 1200
              #ifndef IDR_MANIFEST
              #define IDR_MANIFEST 1
              #endif
              #ifndef RT_MANIFEST
              #define RT_MANIFEST 24
              #endif
              #endif // _MSC_VER <= 1200

              if you don't have a manifest file, I could send you through email ... Check here[^] too.

              1 Reply Last reply
              0
              • V VCProgrammer

                hi all, i want t draw banner and button for the dialog box according to current system theme. please help me how can i do this. thanks in advance.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Take a look at this section on MSDN[^].

                One of these days I'm going to think of a really clever signature.

                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