From: poy <po...@12...> - 2007-10-08 17:36:57
|
finally, 3rd try with the stats frame... this time, instead of modifying the onPainting signal so that it dispatches the rect, i simply used an onRaw call; then StatsFrame can handle WM_PAINT the way it wants to (see the comment next to the onRaw call). i've still included the previous patch (patch-StatsFrame-pRect.patch), just in case. and by the way, the following 2 problems are still here, but i wanted to see if this way of getting the update rect is ok before going further: poy wrote: > almost ok, except: > - there's flickering when resizing the window, because of the > invalidateWidget() in layout() which invalidates everything. > - colors are always black, the ::SelectDCPenColor i've used doesn't seem > fine... SmartWin's pens can't be "free" (without a canvas attached) so i > couldn't find a way to store pens as members of StatsFrame like before > in the WTL version. Yeah, it used to be the same for brushes...you can either create the pen each time you use the canvas (I think this is what the smartwin people intended) or change the pen class to make it standalone (like the brush is now)...technically, you only need the pen while drawing so recreating it each time shouldn't present any major problems (I think)... poy |