Pelles C forum

Pelles C => Feature requests => Topic started by: post from old forum on September 14, 2004, 04:19:23 AM

Title: GDI+
Post by: post from old forum on September 14, 2004, 04:19:23 AM
Pelle:

Do you have any plans to add GDI+ graphics support to Pelles C?

Robert Wishlaw
Title: GDI+
Post by: post from old forum on September 14, 2004, 04:19:45 AM
Hello Robert,

I have an almost finished include file for the 'flat API' (gdiplusflat.h). Not sure how useful it is. This is what Microsoft says:

"Microsoft Windows GDI+ exposes a flat application programming interface (API) that consists of about 600 functions, which are implemented in Gdiplus.dll and declared in Gdiplusflat.h. The functions in the GDI+ flat API are wrapped by a collection of about 40 C++ classes. It is recommended that you do not directly call the functions in the flat API. Whenever you make calls to GDI+, you should do so by calling the methods and functions provided by the C++ wrappers. Microsoft Product Support Services will not provide support for code that calls the flat API directly."

Pelle
Title: Re: GDI+
Post by: czerny on December 12, 2011, 01:22:39 AM
Hallo,

is this (Pelles version) include file available somewhere?

czerny
Title: Re: GDI+
Post by: CommonTater on December 12, 2011, 02:01:27 AM
GDI+ is included automatically when you #include <windows.h> ... there's nothing to add.

Windows itself uses GDI+ to draw windows.

If you add #define WIN32_DEFAULT_LIBS before your #includes, the headers will sort it out for you.
Title: Re: GDI+
Post by: czerny on December 13, 2011, 10:07:33 AM
Hallo,

I asked for the header file gdiplusflat.h. This file is in its original form not usable for C-Programmers.
It seems that Pelle has produced an adapted version.

czerny
Title: Re: GDI+
Post by: CommonTater on December 13, 2011, 07:32:49 PM
Ah... this I would not know.  I mostly work with windows controls and haven't done a whole lot of drawing apps...

So, I apologize,  if I've lead you down the wrong path, here.
Title: Re: GDI+
Post by: zbaka on December 17, 2011, 09:20:46 AM
Hallo,

I asked for the header file gdiplusflat.h. This file is in its original form not usable for C-Programmers.
It seems that Pelle has produced an adapted version.

czerny
Yes, although GDI+ is a flat API, Microsoft doesn't support the C langage. "John F" has converted the whole GDI+ headers to be compatible with Pelles C.  This work can be found on this forum (I don't remember where).
Title: Re: GDI+
Post by: AlexN on December 21, 2011, 08:17:02 AM
This work can be found on this forum (I don't remember where).

Or you can find it on Johns homepage: www.johnfindlay.plus.com/pellesc/libs/libs.html (http://www.johnfindlay.plus.com/pellesc/libs/libs.html)
Title: Re: GDI+
Post by: czerny on December 21, 2011, 11:07:36 AM
Yes, but gdiplusflat.h is'nt included.

As Pelle wrote:

Quote
I have an almost finished include file for the 'flat API' (gdiplusflat.h). Not sure how useful it is.

czerny
Title: Re: GDI+
Post by: JohnF on December 28, 2011, 12:59:57 PM
Do you still need gdiplusflat.h ?

John
Title: Re: GDI+
Post by: czerny on December 28, 2011, 11:55:18 PM
Quote
Do you still need gdiplusflat.h ?

I do not NEED this file. I thought I could have one consistent interface to gdiplus.

I am still a little bit confused. The two sets of functions Gdip* and Gp* are not equivalent.
As your example 'GdiPlusDecoders' shows, some functions do not exist in its Gp* form.
But it is easier to use the Gp* form when translating a cpp example. Otherwise it is more C-like to use the Gdip* functions. 

czerny
Title: Re: GDI+
Post by: JohnF on December 29, 2011, 07:56:37 AM
I made the API calls as Gdip... and the converted C++ calls as Gp...

Not a problem I thought.

John