MFC and GDI+ - the resolution.
- From: "David Webber" <dave@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 20 Apr 2007 20:46:15 +0100
I asked a question on 16 April, and got some useful hints.
For which my thanks. I can now report the resolution for anyone
interested.
[The inspiration came from
http://www.codeproject.com:80/vcpp/gdiplus/gdipprint.asp to which a friend
pointed me.]
The problem:
Replacing
==
pDC->MoveTo(...);
pDC->LineTo(....);
===
by
===
Graphics graphics( pDC->m_hDC );
graphics.SetSmoothingMode( SmoothingModeAntiAlias );
graphics.DrawLine(....);
===
was working on any kind of DC except the printer.
The resolution:
===
Graphics graphics( pDC->m_hDC );
graphics.SetPageUnit( UnitPixel ); //***********!!!!!
graphics.SetSmoothingMode( SmoothingModeAntiAlias );
graphics.DrawLine(....);
===
(as I was using MM_TEXT in pDC) and Bob's your uncle!
[I *think* I can now carry a Graphics object throughout my complicated
drawing code in parallel with pDC and use GDI+ where desirable.] I'll may
have more problems with GDI+ in due course, but so far it is looking good.
Dave
--
David Webber
Author MOZART the music processor for Windows -
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm
.
- Prev by Date: Re: DHTML_EVENT_ONMOUSEOVER not caught for <TR> and other tags
- Next by Date: Re: Vector Graphics - was MFC and GDI+
- Previous by thread: problem using self built DLL
- Next by thread: Registering a CWnd class
- Index(es):
Relevant Pages
|