c - Invalidate or clip text -
i'm trying monitor mouse position on client area of window. example:
wm_mousemove: { std::ostringstring oss; xpos = loword(lparam); ypos = hiword(lparam); oss << xpos << ", " << ypos; textout(hdc, 100, 100, oss.str().c_str(), oss.str().size()); }
do need measure height, width of fonts area erase before drawing out new text? don't understand if need clipping redraw region or invalidate rect enough drawing text.
every time draw text, use gettextextentpoint32 measure size of area written, , save somewhere. when try draw new, can pass rectangle based on value invalidaterect indicate desire erase, updatewindow make erasure happen immediately.
Comments
Post a Comment