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

C / C++ / MFC

 
QuestionISampleGrabber and ActiveMovie Window Problem Pin
Akin Ocal17-Jun-07 13:05
Akin Ocal17-Jun-07 13:05 
QuestionConnecting to FTP site Pin
frqftgbdafr17-Jun-07 8:59
frqftgbdafr17-Jun-07 8:59 
AnswerRe: Connecting to FTP site Pin
Mark Salsbery17-Jun-07 9:05
Mark Salsbery17-Jun-07 9:05 
QuestionHow to do transparent color in the CBitmapButton? [modified] Pin
Romiks17-Jun-07 7:21
Romiks17-Jun-07 7:21 
AnswerRe: How to do transparent color in the CBitmapButton? Pin
Mark Salsbery17-Jun-07 9:15
Mark Salsbery17-Jun-07 9:15 
QuestionSome video effects on directshow Pin
Akin Ocal17-Jun-07 3:08
Akin Ocal17-Jun-07 3:08 
QuestionEditing/Changing Default Command Handlers Pin
Abhijeet Pathak17-Jun-07 1:57
Abhijeet Pathak17-Jun-07 1:57 
Questiondouble buffering issue... Pin
eli1502197917-Jun-07 1:32
eli1502197917-Jun-07 1:32 
Hi,

In my project,I have to draw icon over a bitmap every 250msec.
My problem is that sometimes the drawing over the bitmap is flickering
in a very annoying way.
I know that I need to draw over the bitmap using double buffering,
and looked over some articles about it,but failed to understand
how to do it.
I can't use the classes of those articles (Safety issues...Unsure | :~ ).
Can anyone help me understand how to improve my drawing technique???
I use the following piece of code:
void Frm_WkAtol::OnTimer(UINT_PTR nIDEvent)
{
	// TODO: Add your message handler code here and/or call default
	m_AtolCorridorBitmap.Invalidate(); // cause the bitmap to redraw itself
	CDialog::OnTimer(nIDEvent);
}


void AtolCorridorBitmapClass::OnPaint() 
{
	CStatic::OnPaint();

	CRect CorridorRect;
	CDC *pDC = GetDC();
        static int x = 0;

	// Set attributes of the DC
	pDC->SetTextColor(RED_COLOR);
	pDC->SetBkMode(TRANSPARENT);   
	GetClientRect(&CorridorRect);
	szCaption.Format(_T("Test %d") , x++);
	pDC->ExtTextOut(CorridorRect.left, CorridorRect.top + 30 , ETO_OPAQUE , NULL , szCaption , NULL); 

	DrawIcon(pDC->m_hDC, CorridorRect.left , CorridorRect.top  , m_hUavInsideAtolCorridorIcon);
	
	ReleaseDC(pDC);
}


With best regards,
Eli;P
GeneralRe: double buffering issue... Pin
Matthew Faithfull17-Jun-07 2:38
Matthew Faithfull17-Jun-07 2:38 
AnswerRe: double buffering issue... [modified] Pin
Mark Salsbery17-Jun-07 15:43
Mark Salsbery17-Jun-07 15:43 
GeneralRe: double buffering issue... Pin
eli1502197917-Jun-07 23:11
eli1502197917-Jun-07 23:11 
GeneralRe: double buffering issue... Pin
eli1502197918-Jun-07 23:09
eli1502197918-Jun-07 23:09 
GeneralRe: double buffering issue... Pin
Mark Salsbery19-Jun-07 6:21
Mark Salsbery19-Jun-07 6:21 
GeneralRe: double buffering issue... Pin
eli1502197919-Jun-07 19:07
eli1502197919-Jun-07 19:07 
GeneralRe: double buffering issue... Pin
Mark Salsbery19-Jun-07 20:11
Mark Salsbery19-Jun-07 20:11 
GeneralRe: double buffering issue... Pin
eli1502197920-Jun-07 1:05
eli1502197920-Jun-07 1:05 
QuestionHow to change display properties of a computer through code? Pin
Sameer_Thakur17-Jun-07 0:18
Sameer_Thakur17-Jun-07 0:18 
AnswerRe: How to change display properties of a computer through code? Pin
Hans Ruck17-Jun-07 20:22
Hans Ruck17-Jun-07 20:22 
GeneralRe: How to change display properties of a computer through code? Pin
Sameer_Thakur18-Jun-07 1:09
Sameer_Thakur18-Jun-07 1:09 
Questionsend number to speaker Pin
SYS-MAN16-Jun-07 22:17
SYS-MAN16-Jun-07 22:17 
AnswerRe: send number to speaker Pin
azonenberg17-Jun-07 7:54
azonenberg17-Jun-07 7:54 
QuestionThreads and mutexes Pin
Cyrilix16-Jun-07 21:43
Cyrilix16-Jun-07 21:43 
AnswerRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 0:45
Matthew Faithfull17-Jun-07 0:45 
GeneralRe: Threads and mutexes Pin
Cyrilix17-Jun-07 7:02
Cyrilix17-Jun-07 7:02 
GeneralRe: Threads and mutexes Pin
Matthew Faithfull17-Jun-07 10:11
Matthew Faithfull17-Jun-07 10:11 

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.