views:

92

answers:

1

How do I use GDI+ with C++Builder? Can someone give me a simple example of creating a surface and drawing a circle on it?

+3  A: 

It would be similar to coding a normal Windows program in C using Visual Studio.

Basically:

  • include "gdiplus.h"
  • link to gdiplus.lib
  • call GdiPlusStartup at the start of your program (before main window creation)
  • call GdiPlusShutdown at the end of your program (after the message loop has ended and the main window's been destroyed)

Here's a link with a sample program:

http://msdn.microsoft.com/en-us/library/ms533895(v=VS.85).aspx

MSDN contains much information on this topic:

http://msdn.microsoft.com/en-us/library/ms533802(v=VS.85).aspx