Click here to Skip to main content
15,905,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual Studio 6 IDE Pin
Roger Allen3-Jun-03 2:47
Roger Allen3-Jun-03 2:47 
GeneralRe: Visual Studio 6 IDE Pin
73Zeppelin3-Jun-03 14:56
73Zeppelin3-Jun-03 14:56 
Generalmissing storage class or type identifier Pin
mr20032-Jun-03 5:24
mr20032-Jun-03 5:24 
GeneralRe: missing storage class or type identifier Pin
Joaquín M López Muñoz2-Jun-03 5:26
Joaquín M López Muñoz2-Jun-03 5:26 
GeneralRe: missing storage class or type identifier Pin
mr20032-Jun-03 6:49
mr20032-Jun-03 6:49 
GeneralJumping child windows during scroll Pin
pankajdaga2-Jun-03 5:21
pankajdaga2-Jun-03 5:21 
GeneralRe: Jumping child windows during scroll Pin
basementman2-Jun-03 7:35
basementman2-Jun-03 7:35 
GeneralRe: Jumping child windows during scroll Pin
Roger Allen3-Jun-03 2:55
Roger Allen3-Jun-03 2:55 
Try modifying you OnEraseBkGnd as follows:

BOOL CSomeView::OnEraseBkgnd(CDC* pDC) 
{
	CRect	clip;
	static int dont_erase_indexes[] =
	{
	// add control id's here to stop them flickering during a re-draw
	IDC_TITLE_PROMPT,
	IDC_TITLE,
	IDC_TRAY,
	IDC_ASSAY
	};

	pDC->SaveDC();
	for (int i = 0; i < sizeof(dont_erase_indexes[) / sizeof(int); i++)
	{
		// only exclude the visible windows
		CWnd *pWnd = GetDlgItem(dont_erase_indexes[[i]);
		if (pWnd && pWnd->IsWindowVisible())
		{
			pWnd->GetWindowRect(&clip);		// get rect of the control
			ScreenToClient(&clip);
			pDC->ExcludeClipRect(&clip);
		}
	}
	pDC->GetClipBox(&clip);
	pDC->FillSolidRect(clip, GetSysColor(COLOR_BTNFACE));
	pDC->RestoreDC(-1);
	return FALSE;
}


I usually fins when a window is re-drawn this solves many flicker problems

Roger Allen
Sonork 100.10016

Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
GeneralMFC MDI with an edit box on toolbar Pin
mahoni_5012-Jun-03 5:19
mahoni_5012-Jun-03 5:19 
GeneralDifference in VC++ 6.0 and C++.NET Pin
mr20032-Jun-03 4:48
mr20032-Jun-03 4:48 
GeneralRe: Difference in VC++ 6.0 and C++.NET Pin
Navin2-Jun-03 5:11
Navin2-Jun-03 5:11 
GeneralXP explorer crash Pin
Navin2-Jun-03 4:46
Navin2-Jun-03 4:46 
GeneralRe: XP explorer crash Pin
Chris Richardson2-Jun-03 9:20
Chris Richardson2-Jun-03 9:20 
QuestionSaving paint image (CDC) to file? Pin
Jim D2-Jun-03 4:41
Jim D2-Jun-03 4:41 
AnswerRe: Saving paint image (CDC) to file? Pin
basementman2-Jun-03 4:54
basementman2-Jun-03 4:54 
AnswerRe: Saving paint image (CDC) to file? Pin
dabs2-Jun-03 4:55
dabs2-Jun-03 4:55 
Questionhow can i get the DSN list? Pin
Peter Keung2-Jun-03 3:57
Peter Keung2-Jun-03 3:57 
AnswerRe: how can i get the DSN list? Pin
David Crow2-Jun-03 4:05
David Crow2-Jun-03 4:05 
GeneralRe: how can i get the DSN list? Pin
Peter Keung2-Jun-03 4:17
Peter Keung2-Jun-03 4:17 
GeneralRe: how can i get the DSN list? Pin
basementman2-Jun-03 4:38
basementman2-Jun-03 4:38 
GeneralRe: how can i get the DSN list? Pin
basementman2-Jun-03 4:39
basementman2-Jun-03 4:39 
GeneralRe: how can i get the DSN list? Pin
Peter Keung2-Jun-03 5:59
Peter Keung2-Jun-03 5:59 
GeneralRe: how can i get the DSN list? Pin
David Crow2-Jun-03 6:51
David Crow2-Jun-03 6:51 
GeneralInitCommonControlsEx sets Error 2 Pin
psychicfriend2-Jun-03 3:56
psychicfriend2-Jun-03 3:56 
GeneralRe: InitCommonControlsEx sets Error 2 Pin
psychicfriend2-Jun-03 4:56
psychicfriend2-Jun-03 4:56 

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.