Click here to Skip to main content
15,921,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to display series of numbers ? Pin
Hamid_RT8-Apr-06 1:35
Hamid_RT8-Apr-06 1:35 
GeneralRe: How to display series of numbers ? Pin
Surivevoli9-Apr-06 12:47
Surivevoli9-Apr-06 12:47 
GeneralRe: How to display series of numbers ? Pin
Hamid_RT9-Apr-06 18:45
Hamid_RT9-Apr-06 18:45 
AnswerRe: How to display series of numbers ? Pin
ThatsAlok7-Apr-06 23:42
ThatsAlok7-Apr-06 23:42 
GeneralRe: How to display series of numbers ? Pin
Surivevoli8-Apr-06 0:13
Surivevoli8-Apr-06 0:13 
QuestionFlicker draw nightmare Pin
Axonn Echysttas7-Apr-06 11:24
Axonn Echysttas7-Apr-06 11:24 
AnswerRe: Flicker draw nightmare Pin
Richard Andrew x647-Apr-06 13:33
professionalRichard Andrew x647-Apr-06 13:33 
AnswerRe: Flicker draw nightmare Pin
Ravi Bhavnani7-Apr-06 15:41
professionalRavi Bhavnani7-Apr-06 15:41 
Axonn Echysttas wrote:
If I do 10 repaits per second I see an annoying flicker.


This is a common problem, especially in applications that need to constantly update a status string. A workaround is to use a "smart" SetText() method, as in:
void SmartSetText
  (CWnd* pWnd,
   CString strText)
{
  ASSERT (pWnd != NULL);
  ASSERT (pWnd->GetSafeHwnd() != NULL);
  CString strOldText;
  pWnd->GetWindowText (strOldText);
  if (strOldText.Compare (strText) != 0)
     pWnd->SetWindowText (strText);

}
It's a simple solution that works quite well.

/ravi

My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com

QuestionWindows Form Application Problems Pin
Bob X7-Apr-06 10:15
Bob X7-Apr-06 10:15 
QuestionRegistering File Extensions Pin
Bob X7-Apr-06 7:37
Bob X7-Apr-06 7:37 
AnswerRe: Registering File Extensions Pin
Waldermort7-Apr-06 8:06
Waldermort7-Apr-06 8:06 
GeneralRe: Registering File Extensions Pin
Bob X7-Apr-06 8:19
Bob X7-Apr-06 8:19 
GeneralRe: Registering File Extensions Pin
sasikumarselvarajan7-Apr-06 22:39
sasikumarselvarajan7-Apr-06 22:39 
AnswerRe: Registering File Extensions Pin
David Crow7-Apr-06 9:14
David Crow7-Apr-06 9:14 
QuestionFile Load/Save Windows Pin
Bob X7-Apr-06 7:20
Bob X7-Apr-06 7:20 
AnswerRe: File Load/Save Windows Pin
Waldermort7-Apr-06 7:31
Waldermort7-Apr-06 7:31 
GeneralRe: File Load/Save Windows Pin
Bob X7-Apr-06 7:50
Bob X7-Apr-06 7:50 
GeneralRe: File Load/Save Windows Pin
David Crow7-Apr-06 8:24
David Crow7-Apr-06 8:24 
QuestionRelease build problem Pin
Waldermort7-Apr-06 6:42
Waldermort7-Apr-06 6:42 
AnswerRe: Release build problem Pin
Ravi Bhavnani7-Apr-06 6:57
professionalRavi Bhavnani7-Apr-06 6:57 
GeneralRe: Release build problem Pin
Waldermort7-Apr-06 7:07
Waldermort7-Apr-06 7:07 
GeneralRe: Release build problem Pin
Richard Andrew x647-Apr-06 7:30
professionalRichard Andrew x647-Apr-06 7:30 
GeneralRe: Release build problem Pin
Waldermort7-Apr-06 7:34
Waldermort7-Apr-06 7:34 
GeneralRe: Release build problem Pin
Waldermort7-Apr-06 7:39
Waldermort7-Apr-06 7:39 
GeneralRe: Release build problem Pin
Richard Andrew x647-Apr-06 7:45
professionalRichard Andrew x647-Apr-06 7:45 

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.