From: Peter Olcott on
All of the links that I have found say they are showing you
how to use GDI+ from C++, by they actually show you how to
use GDI+ from C, not C++. For example they show you how to
modify the WinMain() function. There is no WinMain()
function in my MFC code.

I want to be able to load and save PNG files and BMP files.
Since Windows now does this, I would prefer to use Windows
instead of any third party library.


From: David Lowndes on
>All of the links that I have found say they are showing you
>how to use GDI+ from C++, by they actually show you how to
>use GDI+ from C, not C++. For example they show you how to
>modify the WinMain() function. There is no WinMain()
>function in my MFC code.

Just because it's using WinMain doesn't necessarily mean it's using
'C' rather than C++.

Anyhow, what code are these examples putting in WinMain that is posing
you with a problem?

Dave
From: Peter Olcott on

"David Lowndes" <DavidL(a)example.invalid> wrote in message
news:f1coo5t5u8kc3q3q8n3rbiqd97v05fo1kd(a)4ax.com...
> >All of the links that I have found say they are showing
> >you
>>how to use GDI+ from C++, by they actually show you how to
>>use GDI+ from C, not C++. For example they show you how to
>>modify the WinMain() function. There is no WinMain()
>>function in my MFC code.
>
> Just because it's using WinMain doesn't necessarily mean
> it's using
> 'C' rather than C++.
>
> Anyhow, what code are these examples putting in WinMain
> that is posing
> you with a problem?

Now I have the problem simplified down to this command line
code sample will not compile:
http://msdn.microsoft.com/en-us/library/ms533837(VS.85).aspx
I am getting a bunch of link errors, here is one of them:

gdipng.obj : error LNK2019: unresolved external symbol
_GdipFree@4 referenced in function "public: static void
__cdecl Gdiplus::GdiplusBase::operator delete(void *)"

>
> Dave


From: David Ching on
"Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote in message
news:W7mdncFCK47CsRHWnZ2dnUVZ_v-dnZ2d(a)giganews.com...
> All of the links that I have found say they are showing you how to use
> GDI+ from C++, by they actually show you how to use GDI+ from C, not C++.
> For example they show you how to modify the WinMain() function. There is
> no WinMain() function in my MFC code.
>

You may want to read about CImage.

-- David

From: David Ching on
"Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote in message
news:rfKdndhqLPufrhHWnZ2dnUVZ_vOdnZ2d(a)giganews.com...
> Now I have the problem simplified down to this command line code sample
> will not compile:
> http://msdn.microsoft.com/en-us/library/ms533837(VS.85).aspx
> I am getting a bunch of link errors, here is one of them:
>
> gdipng.obj : error LNK2019: unresolved external symbol _GdipFree@4
> referenced in function "public: static void __cdecl
> Gdiplus::GdiplusBase::operator delete(void *)"
>

Are you linking with gdiplus.lib? This needs to go into the Linker
settings, I believe in the Additional Dependencies option.

-- David