Click here to Skip to main content
15,868,133 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there,
In my project for drawing view, we have used GDI+. Everything was working fine until we used AdjustableArrowCap. In the view, it is looking fine but when we see the print preview, the size of the arrowhead is looking awfully big. And in different sates of zoom if the view, it is looking different. My code is simple

C++
Graphics graphics(m_pDC->m_hDC);
graphics.SetSmoothingMode(Gdiplus::SmoothingModeAntiAlias);
AdjustableArrowCap arrowCap(nArrowWidth, nArrowWidth, TRUE);
pen.SetCustomEndCap(&arrowCap);
graphics.DrawLine(&pen, P1, P2);


I have no idea why it is happening

Now I have noticed one more thing. The print preview is showing every thing but on print, only the GDI objects are coming. Rest of the elements are not shown.

Any guesses guys??

Any suggestion is welcome.

Thanks in advance!!

Regards,
Harsh
Posted
Updated 8-Jun-15 0:12am
v4
Comments
Richard MacCutchan 8-Jun-15 9:18am    
Any guesses
Are you using the correct mapping mode for you print and print preview? The code you have shown above does not really tell us ebough.
Harsh Shankar 9-Jun-15 7:23am    
Thanks for replying Richard.
Well, I am not using any specific mapping. It is same as it was. Earlier our code was using GDI APIs and the print was perfectly fine but now we changed to GDI+. The view is shown even better than before but in print preview, the arrowheads are coming of giant size. And even worse, the print on file or paper, it is showing neither of the lines, rectangles, ellipses etc.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900