I am running a small test of gdiplus. I have this code:
#include <windows.h>
#include <gdiplus.h>
#include <iostream>
using namespace Gdiplus;
using namespace std;
int main()
{
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
// Create a window
HWND hWnd = CreateWindow(L"STATIC", L"My Window", WS_OVERLAPPEDWINDOW,
100, 100, 500, 500, NULL, NULL, NULL, NULL);
ShowWindow(hWnd, SW_SHOW);
// Create a device context
HDC hdc = GetDC(hWnd);
// Create a GDI+ graphics object
Graphics graphics(hdc);
// Draw a line
Pen pen(Color(255, 0, 0, 255));
graphics.DrawLine(&pen, 10, 10, 200, 200);
// Clean up
ReleaseDC(hWnd, hdc);
GdiplusShutdown(gdiplusToken);
return 0;
}
However, it is complaining the Pen is ambiguous. Can anyone help me see the two or more places where Pen is declared?
Thank you.