why old text with textOut cleared !!
hi
i use these code for add some text in my window:
[code]
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
TextOut (hdc, 90, 0,
L"Welcome To DirectX Sound Recorder.",
lstrlen (L"Welcome To DirectX Sound Recorder.")) ;
if(whatPrint == 'i'){
TextOut (hdc, 0, 2 * cyChar,
L"Ready For Start...",
lstrlen (L"Ready For Start...")) ;
}else if (whatPrint == 'r'){
TextOut (hdc, 0, indexOfLineForPrint * cyChar,
L"Recording... ",
lstrlen (L"Recording... ")) ;
//indexOfLineForPrint++;
}else if (whatPrint == 's'){
TextOut (hdc, 0, indexOfLineForPrint * cyChar,
L"Stop! ",
lstrlen (L"Stop! ")) ;
//indexOfLineForPrint++;
}
EndPaint(hWnd, &ps);
break;
[/code]
when i want add some text do like this:
[code]
whatPrint = 'n';
InvalidateRect(g_hWnd,NULL,FALSE);
[/code]
but when i minimize window and maximize it again. i see all text instead
last text cleared. how can i solve this problem ?