News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

GDI+

Started by post from old forum, September 14, 2004, 04:19:23 AM

Previous topic - Next topic

post from old forum

Pelle:

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

Robert Wishlaw

post from old forum

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

czerny

Hallo,

is this (Pelles version) include file available somewhere?

czerny

CommonTater

#3
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.

czerny

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

CommonTater

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.

zbaka

Quote from: 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
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).

AlexN

Quote from: zbaka on December 17, 2011, 09:20:46 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
best regards
Alex ;)

czerny

Yes, but gdiplusflat.h is'nt included.

As Pelle wrote:

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

czerny

JohnF

Do you still need gdiplusflat.h ?

John

czerny

QuoteDo 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

JohnF

I made the API calls as Gdip... and the converted C++ calls as Gp...

Not a problem I thought.

John