c++, win 32 , Erase text using TextOut or DrawText [on hold]
- by XXXXX
How to erase the inputted character on the window and to write the another one on its place???
Say, for example, d d d d was inputted, I want to redraw it to d j j f
I'm trying to do this in the following way:
TextOut(hdc,rect.right,rect.top,(LPCWSTR)" ",2);
DrawText( hdc, (LPCWSTR)str, -1, &rect, DT_SINGLELINE | DT_NOCLIP ) ;
or
DrawText( hdc, (LPCWSTR)" ", -1, &rect, DT_SINGLELINE | DT_NOCLIP ) ;
DrawText( hdc, (LPCWSTR)str, -1, &rect, DT_SINGLELINE | DT_NOCLIP ) ;
Anyway, some characters are redrawn, and in some cases(f, j,i characters) the junks are seen(one character is just drawn on another).
I haven't set the SetBkMode to transparent.
What to do?
Thanks much in advance!!!