Click here to Skip to main content
16,012,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I leave a CButton in pressed state ? Pin
Koep28-Oct-02 23:08
Koep28-Oct-02 23:08 
AnswerRe: How can I leave a CButton in pressed state ? Pin
Stephane Rodriguez.28-Oct-02 23:31
Stephane Rodriguez.28-Oct-02 23:31 
GeneralRe: How can I leave a CButton in pressed state ? Pin
Koep29-Oct-02 1:59
Koep29-Oct-02 1:59 
QuestionFlicker problem :( - can someone help me out? Pin
Jason Troitsky (was Hattingh)28-Oct-02 22:39
Jason Troitsky (was Hattingh)28-Oct-02 22:39 
AnswerRe: Flicker problem :( - can someone help me out? Pin
Christian Graus28-Oct-02 23:27
protectorChristian Graus28-Oct-02 23:27 
GeneralRe: Flicker problem :( - can someone help me out? Pin
Jason Troitsky (was Hattingh)29-Oct-02 2:11
Jason Troitsky (was Hattingh)29-Oct-02 2:11 
GeneralRe: Flicker problem :( - can someone help me out? Pin
Christian Graus29-Oct-02 10:12
protectorChristian Graus29-Oct-02 10:12 
AnswerRe: Flicker problem :( - can someone help me out? Pin
Roger Allen29-Oct-02 2:18
Roger Allen29-Oct-02 2:18 
When moving a lot of windows around, I have found a main problem of flickering to be the cause of OnEraseBkgnd(). I n the past I have solved this by exlcuding the area of the controls that are shown from the erase area like this:

BOOL CSGAControlView::OnEraseBkgnd(CDC* pDC) 
{
	static int dont_erase_indexes[] =
		{
		IDC_STANDARDS_TRAY_SGA,
		IDC_STANDARDS_TRAY_LDA,
		IDC_THUMB1,
		IDC_THUMB5,
		IDC_THUMB2,
		IDC_THUMB6,
		IDC_TRAY1_TEXT,
		IDC_TRAY2_TEXT,
		IDC_TRAY3_TEXT,
		IDC_TRAY4_TEXT,
		IDC_TRAYNAME4,
		IDC_TRAYNAME3,
		IDC_TRAYNAME2,
		IDC_TRAYNAME1
		} ;

	CRect	clip ;
	for (int i = 0 ; i < sizeof(dont_erase_indexes) / sizeof(int) ; i++)
		{
		if (GetDlgItem(dont_erase_indexes[i])->GetStyle() & WS_VISIBLE)
			{
			// only exclude if its visible
			GetDlgItem(dont_erase_indexes[i])->GetWindowRect(&clip);		// get rect of the control
			ScreenToClient(&clip);
			pDC->ExcludeClipRect(&clip);
			}
		}
	pDC->GetClipBox(&clip);
    pDC->FillSolidRect(clip, GetSysColor(COLOR_BTNFACE));
	return FALSE;
}


I havn't been able to run your example exe as I don't have gdiplus, but hopefully this is releated to your problem.

Roger Allen
Sonork 100.10016

I have a terminal disease. Its called life!
GeneralRe: Flicker problem :( - can someone help me out? Pin
Jason Troitsky (was Hattingh)29-Oct-02 2:57
Jason Troitsky (was Hattingh)29-Oct-02 2:57 
QuestionUnicode...? Pin
alex.barylski28-Oct-02 22:32
alex.barylski28-Oct-02 22:32 
AnswerRe: Unicode...? Pin
Stephane Rodriguez.28-Oct-02 22:40
Stephane Rodriguez.28-Oct-02 22:40 
GeneralRe: Unicode...? Pin
alex.barylski29-Oct-02 11:30
alex.barylski29-Oct-02 11:30 
AnswerRe: Unicode...? Pin
ian mariano29-Oct-02 1:28
ian mariano29-Oct-02 1:28 
GeneralRe: Unicode...? Pin
Maximilien29-Oct-02 2:18
Maximilien29-Oct-02 2:18 
GeneralRe: Unicode...? Pin
ian mariano29-Oct-02 2:55
ian mariano29-Oct-02 2:55 
AnswerRe: Unicode...? Pin
Paul M Watt29-Oct-02 4:44
mentorPaul M Watt29-Oct-02 4:44 
GeneralRe: Unicode...? Pin
alex.barylski29-Oct-02 11:28
alex.barylski29-Oct-02 11:28 
Questionhow to resize the custom view class? Pin
Anonymous28-Oct-02 22:31
Anonymous28-Oct-02 22:31 
GeneralVariable / fixed width font issues Pin
alex.barylski28-Oct-02 22:28
alex.barylski28-Oct-02 22:28 
Generalfetching printer information in mfc Pin
Anonymous28-Oct-02 21:57
Anonymous28-Oct-02 21:57 
QuestionWhy gethostbyaddr() doesn't work for dial-up client? Pin
Wenrich28-Oct-02 21:33
Wenrich28-Oct-02 21:33 
AnswerRe: Why gethostbyaddr() doesn't work for dial-up client? Pin
Anonymous29-Oct-02 0:59
Anonymous29-Oct-02 0:59 
AnswerRe: Why gethostbyaddr() doesn't work for dial-up client? Pin
ian mariano29-Oct-02 1:38
ian mariano29-Oct-02 1:38 
GeneralEdit control question Pin
alex.barylski28-Oct-02 20:43
alex.barylski28-Oct-02 20:43 
GeneralRe: Edit control question Pin
Anonymous29-Oct-02 0:57
Anonymous29-Oct-02 0:57 

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.