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. GDI+ doesn't work

GDI+ doesn't work

Scheduled Pinned Locked Moved C / C++ / MFC
winformsgraphicsquestion
6 Posts 2 Posters 1 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.
  • N Offline
    N Offline
    nightrider13
    wrote on last edited by
    #1

    Hi, I've set up GDI+ in an application but i onldy get unresolved linker errors. The compiler can't find "_GdiplusStartup@12" and "_GdiplusShutdown@4". Does anyone knows what i can do to get GDI+ running? thx

    L 1 Reply Last reply
    0
    • N nightrider13

      Hi, I've set up GDI+ in an application but i onldy get unresolved linker errors. The compiler can't find "_GdiplusStartup@12" and "_GdiplusShutdown@4". Does anyone knows what i can do to get GDI+ running? thx

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

      nightrider13 wrote:

      've set up GDI+ in an application

      What do you mean the you setup GDI+ in an application? Did you include gdiplus.h? Link to the gdiplus library? Tell us what you did do and maybe someone can tell you what you didn't do...

      N 1 Reply Last reply
      0
      • L Lost User

        nightrider13 wrote:

        've set up GDI+ in an application

        What do you mean the you setup GDI+ in an application? Did you include gdiplus.h? Link to the gdiplus library? Tell us what you did do and maybe someone can tell you what you didn't do...

        N Offline
        N Offline
        nightrider13
        wrote on last edited by
        #3

        Yeah you're right, sorry :) Yes I already included gdiplus.h. Then the next step was to declare these variables in CWinApp derived class: private: GdiplusStartupInput m_gdiplusStartupInput; ULONG_PTR m_pGdiToken; After that I added at the beginning of the InitInstance: GdiplusStartup(&m_pGdiToken,&m_gdiplusStartupInput,NULL); //gdi+ init And in the ExitInstance: GdiplusShutdown(m_pGdiToken); Thats it! Next step was compiling.

        L 1 Reply Last reply
        0
        • N nightrider13

          Yeah you're right, sorry :) Yes I already included gdiplus.h. Then the next step was to declare these variables in CWinApp derived class: private: GdiplusStartupInput m_gdiplusStartupInput; ULONG_PTR m_pGdiToken; After that I added at the beginning of the InitInstance: GdiplusStartup(&m_pGdiToken,&m_gdiplusStartupInput,NULL); //gdi+ init And in the ExitInstance: GdiplusShutdown(m_pGdiToken); Thats it! Next step was compiling.

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

          nightrider13 wrote:

          Yeah you're right, sorry

          No problem. Was half afraid that I came on too strong. I get alot of "it's broke" type stuff... I could be wrong but I think that you need to add the gdiplus.lib to your project linker properties.

          N 1 Reply Last reply
          0
          • L Lost User

            nightrider13 wrote:

            Yeah you're right, sorry

            No problem. Was half afraid that I came on too strong. I get alot of "it's broke" type stuff... I could be wrong but I think that you need to add the gdiplus.lib to your project linker properties.

            N Offline
            N Offline
            nightrider13
            wrote on last edited by
            #5

            Yeah you aren't wrong, that was the problem. Thank you Wes! ;)

            L 1 Reply Last reply
            0
            • N nightrider13

              Yeah you aren't wrong, that was the problem. Thank you Wes! ;)

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

              No problem. Glad that was 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