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. using GDI+ in C++ windows project

using GDI+ in C++ windows project

Scheduled Pinned Locked Moved C / C++ / MFC
c++winformsgraphicsquestion
9 Posts 2 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.
  • M Offline
    M Offline
    mpastchenko
    wrote on last edited by
    #1

    Greetings All, How does one initializes GDI+ in C++? Thanks. Sincerely, Max Pastchenko

    C 1 Reply Last reply
    0
    • M mpastchenko

      Greetings All, How does one initializes GDI+ in C++? Thanks. Sincerely, Max Pastchenko

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If you got to the appropriate section, I have a series of GDI+ articles, including one on how to get it working in VC6. Christian Graus - Microsoft MVP - C++

      M 1 Reply Last reply
      0
      • C Christian Graus

        If you got to the appropriate section, I have a series of GDI+ articles, including one on how to get it working in VC6. Christian Graus - Microsoft MVP - C++

        M Offline
        M Offline
        mpastchenko
        wrote on last edited by
        #3

        certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko

        M C 2 Replies Last reply
        0
        • M mpastchenko

          certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko

          M Offline
          M Offline
          mpastchenko
          wrote on last edited by
          #4

          http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingcolormemberstopic.asp\\ What I really want to do is use a Dll that works with colors in GDI+, so I need to be able to send Color I want to use to that DLL from C++, if this makes sence. Sincerely, Max Pastchenko

          C 1 Reply Last reply
          0
          • M mpastchenko

            certainly, I understand that a header file needs to be included but this is not quite what i asked. Lets say i want to start wowrking with colors once i inluded everything... Sincerely, Max Pastchenko

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            mpastchenko wrote: Lets say i want to start wowrking with colors once i inluded everything... Well, you didn't ask that. Read some tutorials, 'how do I work with colors' is a pretty broad question. Christian Graus - Microsoft MVP - C++

            M 1 Reply Last reply
            0
            • M mpastchenko

              http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingcolormemberstopic.asp\\ What I really want to do is use a Dll that works with colors in GDI+, so I need to be able to send Color I want to use to that DLL from C++, if this makes sence. Sincerely, Max Pastchenko

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              That link leads to the Colors enum, I'm not sure that's visible in GDI+ using C++. If it is, did you write this dll ? What is it ? Why do you need to pass these values ? An enum is just a bunch of numbers, you should have no trouble passing it around. Christian Graus - Microsoft MVP - C++

              1 Reply Last reply
              0
              • C Christian Graus

                mpastchenko wrote: Lets say i want to start wowrking with colors once i inluded everything... Well, you didn't ask that. Read some tutorials, 'how do I work with colors' is a pretty broad question. Christian Graus - Microsoft MVP - C++

                M Offline
                M Offline
                mpastchenko
                wrote on last edited by
                #7

                Ok, sorry, i will be more specific. My area of expertise in GDI+ in C++ environment is still lacking, i have been using it in C# without problems. I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. I did not write the DLL originaly, i added some modofications to it, so i know what it is supposed to do. Sincerely, Max Pastchenko

                C 1 Reply Last reply
                0
                • M mpastchenko

                  Ok, sorry, i will be more specific. My area of expertise in GDI+ in C++ environment is still lacking, i have been using it in C# without problems. I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. I did not write the DLL originaly, i added some modofications to it, so i know what it is supposed to do. Sincerely, Max Pastchenko

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  mpastchenko wrote: I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. Why do you need to pass a Color from the enum ? They are just a lookup to a red/green/blue value anyhow, and that's what your code will need to skip colors ( the R/G/B ). Why not pass a COLORREF ? Or even three bytes ? Christian Graus - Microsoft MVP - C++

                  M 1 Reply Last reply
                  0
                  • C Christian Graus

                    mpastchenko wrote: I have a DLL that contains some operations using GDI+, using System.Drawing.Color for some operation for example. One of the set properties in the DLL is supposed to Set this Color... it will use it then for further operation. For example, I need to pass color which needs to be skipped in bitmap comparison. Why do you need to pass a Color from the enum ? They are just a lookup to a red/green/blue value anyhow, and that's what your code will need to skip colors ( the R/G/B ). Why not pass a COLORREF ? Or even three bytes ? Christian Graus - Microsoft MVP - C++

                    M Offline
                    M Offline
                    mpastchenko
                    wrote on last edited by
                    #9

                    I think passing one of the two will solve the problem. very good Sincerely, Max Pastchenko

                    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