Click here to Skip to main content
15,916,945 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
OK,

Here is what I have tried now....

When the user clicks the button to trigger the drawing of text, I set a boolean value to true (RegKeyAvail).

And I also implemented this...

void CMartinPhDDlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
if(RegKeyAvail){
dc.SelectObject(&Welcome_font);
dc.SetBkMode(TRANSPARENT);
dc.SetTextColor(COLORREF RGB(255,0,0));
dc.TextOut(30,30, "WELCOME");
Welcome_font.DeleteObject();

}

if (IsIconic())
{....

However, now the text isn't showing up at all. I know that the OnPaint is being called because I have set breakpoints in there and the functions walks through the dc.TextOut call, but does nothing......

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 
GeneralRe: forcing repaint after CDC::TextOut function Pin
Ali Rafiee18-Jul-06 7:41
Ali Rafiee18-Jul-06 7:41 
QuestionRe: forcing repaint after CDC::TextOut function Pin
goodoljosh198018-Jul-06 7:24
goodoljosh198018-Jul-06 7:24 

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.