CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Apr 2004
    Posts
    204

    GDI+ and Flat API

    I am trying to figure out how to call a GDI+ Flat Api function, but cannot get anything working.

    Here is my code:
    Code:
    #include <windows.h>
    #include <objidl.h>
    #include <gdiplus.h>
    #include <GdiplusFlat.h>
    using namespace Gdiplus;
    #pragma comment (lib,"Gdiplus.lib")
    
    VOID OnPaint(HDC hdc)
    {
    	Graphics graphics(hdc);
    	Pen      pen(Color(255, 0, 0, 255));
    	//graphics.DrawLine(&pen, 0, 0, 200, 100);
    	GdipDrawLine(&graphics, &pen, 0, 0, 200, 0); //Flat Api version
    }
    Here I am trying to call only one flat function GdipDrawLine.

    Any suggestions?
    Last edited by mmscg; December 8th, 2011 at 11:08 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured