Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCompiling DLL - what is the sequence of compilation? SOLVED Pin
Vaclav_16-Mar-14 8:53
Vaclav_16-Mar-14 8:53 
AnswerRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan16-Mar-14 23:11
mveRichard MacCutchan16-Mar-14 23:11 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Vaclav_17-Mar-14 3:47
Vaclav_17-Mar-14 3:47 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Gisle Vanem17-Mar-14 4:00
Gisle Vanem17-Mar-14 4:00 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan17-Mar-14 4:16
mveRichard MacCutchan17-Mar-14 4:16 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Vaclav_17-Mar-14 7:42
Vaclav_17-Mar-14 7:42 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan17-Mar-14 7:54
mveRichard MacCutchan17-Mar-14 7:54 
QuestionDrawText() blinking problem Pin
econy15-Mar-14 1:36
econy15-Mar-14 1:36 
I met a weird DrawText() blinking problem. in a loop, interval is 2 seconds, I want to show some messages on a dialog screen.
i.e. 0-2 sec, message1; 2-4 sec,message2; 4-6, message3 ...
but, now the message shows like:
flash message1; 0 sec
black screen;
flash message2; 2 sec
black screen;
flash message3; 6 sec.
black screen;

what I want is :
message1; 0-2 sec
message2; 2-4 sec
message3; 4-6 sec
C++
void CTestDlg::DrawMsg(LPCTSTR iMsgStr) 
{
  CDC* 	pDC;
  CRect	rect;
  CString MsgStr;
  HDC hDC;
  LOGFONT lf;
  HFONT FontNew, FontOld;	
	
  pDC = GetDC();
  hDC = pDC->GetSafeHdc();
	
   memset(&lf, 0, sizeof(LOGFONT));	
   lf.lfHeight = -14 * GetDeviceCaps(hDC,LOGPIXELSY)/72;
   lf.lfWeight = 0;
   FontNew = CreateFontIndirect(&lf);
   FontOld = (HFONT)SelectObject(hDC,FontNew);
   
  rect.SetRect(CPoint(274,442), CPoint(514,514));	
  SetBkMode(hDC,TRANSPARENT);
 
  DrawText(hDC,dtcMsgStr,-1,rect,DT_WORDBREAK|DT_LEFT);
  InvalidateRect(rect,FALSE);

   SelectObject(hDC,FontOld);
   DeleteObject(FontNew);
   ReleaseDC(pDC);
}

AnswerRe: DrawText() blinking problem Pin
PJ Arends15-Mar-14 6:07
professionalPJ Arends15-Mar-14 6:07 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 6:33
econy15-Mar-14 6:33 
AnswerRe: DrawText() blinking problem Pin
Richard MacCutchan15-Mar-14 6:39
mveRichard MacCutchan15-Mar-14 6:39 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 6:44
econy15-Mar-14 6:44 
GeneralRe: DrawText() blinking problem Pin
Richard MacCutchan15-Mar-14 6:54
mveRichard MacCutchan15-Mar-14 6:54 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 6:54
econy15-Mar-14 6:54 
GeneralRe: DrawText() blinking problem Pin
Richard MacCutchan15-Mar-14 6:56
mveRichard MacCutchan15-Mar-14 6:56 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 7:24
econy15-Mar-14 7:24 
GeneralRe: DrawText() blinking problem Pin
Richard MacCutchan15-Mar-14 7:39
mveRichard MacCutchan15-Mar-14 7:39 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 8:00
econy15-Mar-14 8:00 
QuestionWhat this function does? Pin
Django_Untaken14-Mar-14 19:56
Django_Untaken14-Mar-14 19:56 
AnswerRe: What this function does? Pin
Jochen Arndt14-Mar-14 23:42
professionalJochen Arndt14-Mar-14 23:42 
Question"Shift+Delete" and "Ctrl+X" Pin
Member 802179614-Mar-14 11:41
Member 802179614-Mar-14 11:41 
AnswerRe: "Shift+Delete" and "Ctrl+X" Pin
Richard MacCutchan15-Mar-14 0:51
mveRichard MacCutchan15-Mar-14 0:51 
GeneralRe: "Shift+Delete" and "Ctrl+X" Pin
Member 802179617-Mar-14 6:25
Member 802179617-Mar-14 6:25 
GeneralRe: "Shift+Delete" and "Ctrl+X" Pin
Richard MacCutchan17-Mar-14 6:43
mveRichard MacCutchan17-Mar-14 6:43 
GeneralRe: "Shift+Delete" and "Ctrl+X" Pin
Member 802179617-Mar-14 7:12
Member 802179617-Mar-14 7:12 

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.