Is it a good idea to create a GraphicsContext (GC) path outside an
EVT_PAINT handler using a ClientDC and then later pass this path on to
be drawn onto a WindowDC within the EVT_PAINT handler? Both the
ClientDC and WindowDC are created with the same panel.
It seems to work for me. But when I try to add another path to be
passed around my application crashes. Is it just a really bad idea to
do this at all?
I can try and reduce my program down to a simple example if what I am
asking is in any way unclear.
Is it a good idea to create a GraphicsContext (GC) path outside an
EVT_PAINT handler using a ClientDC and then later pass this path on to
be drawn onto a WindowDC within the EVT_PAINT handler? Both the
ClientDC and WindowDC are created with the same panel.
I assume you mean PaintDC here, which is what should always be used in a EVT_PAINT event.
It seems to work for me. But when I try to add another path to be
passed around my application crashes. Is it just a really bad idea to
do this at all?
No, it should work.
I can try and reduce my program down to a simple example if what I am
asking is in any way unclear.