Get graphic context in a mouse call?


I’m trying to get the same “Graphic &g” as in paint() call, but inside my mousedown call , via some ‘get context’ function. How is that possible ?


my guess is that you are going about this a little backwards…

don’t try to paint in a mouse event as you are unnecessarily locking up the message thread.

Rather, set some kind of flag, IE:

_userClickedSomewhereICareAbout = true;

then call repaint().

In your paint() override, just check for the state flag and paint accordingly.

This answered my question !