Click here to Skip to main content
15,895,656 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ifstream in mfc cause strange errors in debug only Pin
FredrickNorge18-Jul-06 8:14
FredrickNorge18-Jul-06 8:14 
GeneralRe: ifstream in mfc cause strange errors in debug only Pin
Maxwell Chen18-Jul-06 8:25
Maxwell Chen18-Jul-06 8:25 
GeneralRe: ifstream in mfc cause strange errors in debug only Pin
FredrickNorge18-Jul-06 8:37
FredrickNorge18-Jul-06 8:37 
Questionmoving existing C++ code to .NET Pin
agurnani18-Jul-06 6:14
agurnani18-Jul-06 6:14 
AnswerRe: moving existing C++ code to .NET Pin
NrmMyth18-Jul-06 8:41
NrmMyth18-Jul-06 8:41 
QuestionNeed help solving a couple of problems with the CFileDialog Pin
Z.K.18-Jul-06 5:48
Z.K.18-Jul-06 5:48 
AnswerRe: Need help solving a couple of problems with the CFileDialog Pin
David Crow18-Jul-06 6:20
David Crow18-Jul-06 6:20 
Questionforcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 4:57
goodoljosh198018-Jul-06 4:57 
Can someone explain to me how I get my dialog to repaint itself after I draw text on it via the CDC::TextOut command?

Here is my code that I am using for drawing the text.....

CFont Smaller_font;
Smaller_font.CreateFont(40,0,0,0,FW_NORMAL,FALSE,FALSE,FALSE,ANSI_CHARSET,
OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DECORATIVE, "Arial");
def_font = dc.SelectObject(&Smaller_font);
dc.SetTextColor(COLORREF RGB(0,0,0));
dc.TextOut(150, 130, "Thank you.");
Smaller_font.DeleteObject();

This draws the "Thanks you" where I tell it, but if I have the program running and another window covers up the "Thank you." that I just drew, it erases it from my dialog. I am thinking that it is not forcing the repaint command somehow, but I am not sure how to force it.

Please help....Frown | :(
AnswerRe: forcing repaint after CDC::TextOut function Pin
Chris Losinger18-Jul-06 5:01
professionalChris Losinger18-Jul-06 5:01 
AnswerRe: forcing repaint after CDC::TextOut function Pin
Maximilien18-Jul-06 5:06
Maximilien18-Jul-06 5:06 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 5:10
goodoljosh198018-Jul-06 5:10 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Steve S18-Jul-06 5:14
Steve S18-Jul-06 5:14 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 5:18
goodoljosh198018-Jul-06 5:18 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Hamid_RT18-Jul-06 5:21
Hamid_RT18-Jul-06 5:21 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 5:25
goodoljosh198018-Jul-06 5:25 
AnswerRe: forcing repaint after CDC::TextOut function Pin
Ravi Bhavnani18-Jul-06 7:29
professionalRavi Bhavnani18-Jul-06 7:29 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Hamid_RT18-Jul-06 18:40
Hamid_RT18-Jul-06 18:40 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Ali Rafiee18-Jul-06 5:14
Ali Rafiee18-Jul-06 5:14 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 6:05
goodoljosh198018-Jul-06 6:05 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Chris Losinger18-Jul-06 6:37
professionalChris Losinger18-Jul-06 6:37 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 6:40
goodoljosh198018-Jul-06 6:40 
QuestionRe: forcing repaint after CDC::TextOut function [modified] Pin
Ali Rafiee18-Jul-06 6:55
Ali Rafiee18-Jul-06 6:55 
AnswerRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 6:59
goodoljosh198018-Jul-06 6:59 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Steve S18-Jul-06 7:14
Steve S18-Jul-06 7:14 
GeneralRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 7:21
goodoljosh198018-Jul-06 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.