Using GDI+ in C++

#undef WIN32_LEAN_AND_MEAN // Need some rarely-used stuff from Windows headers

#include <Winsock2.h> // Must precede windows.h if used at all.
#include <windows.h> // Needed for gdiplus.h
#include <gdiplus.h>
// Following are more carefully designed and vetted headers:
#include <windowsx.h>
#include <stdlib.h>
#include <malloc.h>
#include <memory.h>
#include <tchar.h>
#include <stdio.h>
#include <string>
#include <time.h>
#include <iostream> 

Tech-Archive thread.

Another way:

#include <algorithm>
using std::min;
using std::max;
#include <windows.h>
#include <gdiplus.h>

Leave a Reply (Markdown is enabled)

Your email address will not be published. Required fields are marked *