Reputation:
I am working on legacy code that relies on GDI (not GDI+) for drawing. GDI has no provision for variable width pens and you need to create/destroy new ones every time.
Is there any hack that allows to bypass that creation process and directly modify the width of an existing pen ?
Upvotes: 0
Views: 304
Reputation:
I did not find a way to alter a pen. So the solution I adopted is to keep a permanent pen of with 1 (most often used), and temporarily create a custom one when another width is requested. This at least allows me to mix two different widths without multiple creations/deletions.
Upvotes: 0