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

C / C++ / MFC

 
GeneralRe: Window activation in XP Pin
2-Jan-02 5:47
suss2-Jan-02 5:47 
GeneralRe: Window activation in XP Pin
Ravi Bhavnani2-Jan-02 6:28
professionalRavi Bhavnani2-Jan-02 6:28 
GeneralPreventing unauthorised access to an ISAPI extension Pin
divbanjoe1-Jan-02 23:01
divbanjoe1-Jan-02 23:01 
GeneralRe: Preventing unauthorised access to an ISAPI extension Pin
Derek Waters2-Jan-02 11:13
Derek Waters2-Jan-02 11:13 
GeneralRe: Preventing unauthorised access to an ISAPI extension Pin
divbanjoe2-Jan-02 18:22
divbanjoe2-Jan-02 18:22 
GeneralRe: Preventing unauthorised access to an ISAPI extension Pin
Derek Waters2-Jan-02 18:31
Derek Waters2-Jan-02 18:31 
GeneralGetDeviceCaps and Printer Pin
Braulio Dez1-Jan-02 22:44
Braulio Dez1-Jan-02 22:44 
GeneralRe: GetDeviceCaps and Printer Pin
Ernest Laurentin2-Jan-02 4:25
Ernest Laurentin2-Jan-02 4:25 
GeneralTrying to rotate 90º EMF Pin
Braulio Dez1-Jan-02 20:58
Braulio Dez1-Jan-02 20:58 
QuestionIn eVC how to make FullScreen in PocketPC ? Pin
subang1-Jan-02 20:51
subang1-Jan-02 20:51 
AnswerRe: In eVC how to make FullScreen in PocketPC ? Pin
NormDroid1-Jan-02 21:15
professionalNormDroid1-Jan-02 21:15 
GeneralMaking an Image Transparent Pin
clemence1-Jan-02 19:52
clemence1-Jan-02 19:52 
GeneralRe: Making an Image Transparent Pin
Christian Graus2-Jan-02 0:19
protectorChristian Graus2-Jan-02 0:19 
GeneralOwner drawn button flicker hell Pin
Christian Graus1-Jan-02 18:19
protectorChristian Graus1-Jan-02 18:19 
GeneralRe: Owner drawn button flicker hell Pin
Rick Dangerous2-Jan-02 0:30
Rick Dangerous2-Jan-02 0:30 
Whenever your window is being resized, your main window is receiving a WM_ERASEBKGND message. This message by default erases all the controls on the window which then need to be redrawn. This is bad for flicker. One was around this would be to use the following routine to only fill in that windows area by excluding the areas of the controls on the window so they are not erased:

int dont_erase_indexes[] =
	{
    IDC_DPAS_LAMP,
	IDC_INSTRUMENT_TYPE,
	IDC_LABEL1,
	IDC_LABEL2,
	IDC_DESTINATION,
	IDC_CURRENT_STATUS,
	IDC_LOG,
	IDC_GRAPH,
	IDC_DOWNLOAD_STATUS,
	IDC_DOWNLOAD_PROGRESS,
	ID_AUTO_LOAD,
	IDC_UPLOAD_ASSAYS,
	IDC_AUTO_UPLOAD,
	IDC_BROWSE_FOR_FOLDER
	} ;

BOOL CYourWindow::OnEraseBkgnd(CDC* pDC) 
{
	static int dont_erase_indexes[] =
		{// this is a list of the ID's of the controls on the parent window
		IDC_DPAS_LAMP,
		IDC_INSTRUMENT_TYPE,
		IDC_LABEL1,
		IDC_LABEL2,
		IDC_DESTINATION,
		IDC_CURRENT_STATUS,
		IDC_LOG,
		IDC_GRAPH,
		IDC_DOWNLOAD_STATUS,
		IDC_DOWNLOAD_PROGRESS,
		ID_AUTO_LOAD,
		IDC_UPLOAD_ASSAYS,
		IDC_AUTO_UPLOAD,
		IDC_BROWSE_FOR_FOLDER
		} ;
	CRect	clip ;
	pDC->SaveDC() ;
	for (int i = 0 ; i < sizeof(dont_erase_indexes) / sizeof(int) ; i++)
		{
		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));
	pDC->RestoreDC(-1) ;
	return FALSE;
}


Hope this helps out

Roger Bin Allen
Big Grin | :-D
GeneralRe: Owner drawn button flicker hell Pin
Christian Graus2-Jan-02 0:52
protectorChristian Graus2-Jan-02 0:52 
Generalmalloc() question Pin
1-Jan-02 17:26
suss1-Jan-02 17:26 
GeneralRe: malloc() question Pin
Philip Patrick1-Jan-02 19:14
professionalPhilip Patrick1-Jan-02 19:14 
GeneralRe: malloc() question Pin
1-Jan-02 19:15
suss1-Jan-02 19:15 
GeneralRe: malloc() question Pin
Philip Patrick1-Jan-02 19:23
professionalPhilip Patrick1-Jan-02 19:23 
Generalremove popup menu arrow Pin
1-Jan-02 15:35
suss1-Jan-02 15:35 
GeneralProblem with Multithreads Pin
Mustafa Demirhan1-Jan-02 6:06
Mustafa Demirhan1-Jan-02 6:06 
GeneralRe: Problem with Multithreads Pin
Mustafa Demirhan1-Jan-02 6:12
Mustafa Demirhan1-Jan-02 6:12 
GeneralRe: Problem with Multithreads Pin
1-Jan-02 6:32
suss1-Jan-02 6:32 
GeneralRe: Problem with Multithreads Pin
1-Jan-02 6:56
suss1-Jan-02 6: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.