c++ - How to install GDI+ SDK -


i downloaded gdi+ sdk following link: https://www.microsoft.com/en-us/download/confirmation.aspx?id=18909

i have it, extracts 2 folders, 1 of contains no code @ all, eula.

i not sure call files given here. assumed library, , should #included. however, c++ seems lot less straight forward importing things(java seemed lot clearer me on how use external code). again, maybe haven't found essential tutorial yet.

either way, @ loss on how incorporate gdi+ code. following site (https://msdn.microsoft.com/en-us/library/system.drawing.image(v=vs.110).aspx) says plainly system.drawing namespace, knowledge in gdi+. have following code:

#include "c:\gdi+\asms\10\msft\windows\gdiplus\gdiplus.dll" #include <stdafx.h> #include <windows.h> #include <objidl.h> #include <gdiplus.h> 

when trying code following:

using namespace system.drawing; 

i error: must namespace name.

how should install sdk files can use them in projects? clearly, not doing right.

#include header files only, cannot used add *.dll files.

using namespace system.drawing; .net, c++ doesn't know is

in visual studio use link library:

#pragma comment( lib, "gdiplus.lib" ) 

you need gdi startup , shut down.

//#pragma warning( push ) optional //#pragma warning( disable : 4458 ) #include <gdiplus.h> //#pragma warning( pop )  //link library: #pragma comment( lib, "gdiplus.lib" )  int winapi wwinmain(hinstance hinstance, hinstance, lptstr, int) {     gdiplus::gdiplusstartupinput gdiplusstartupinput;     ulong_ptr gdiplustoken;     gdiplus::gdiplusstartup(&gdiplustoken, &gdiplusstartupinput, null);      //do stuff      gdiplus::gdiplusshutdown(gdiplustoken);      return 0; } 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -