Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using FindFirstFile Pin
*Dreamz7-Dec-04 18:43
*Dreamz7-Dec-04 18:43 
GeneralRe: Using FindFirstFile Pin
fogmen7-Dec-04 19:20
fogmen7-Dec-04 19:20 
Generalquestion about event handles Pin
pwinant7-Dec-04 15:02
pwinant7-Dec-04 15:02 
QuestionWhat language should I use? Pin
ajax19717-Dec-04 14:41
ajax19717-Dec-04 14:41 
AnswerRe: What language should I use? Pin
ThatsAlok7-Dec-04 17:16
ThatsAlok7-Dec-04 17:16 
AnswerRe: What language should I use? Pin
John R. Shaw7-Dec-04 20:01
John R. Shaw7-Dec-04 20:01 
AnswerRe: What language should I use? Pin
Henry miller8-Dec-04 4:39
Henry miller8-Dec-04 4:39 
GeneralVery high processor usage when trying to make program flicker free Pin
Jinegelen7-Dec-04 14:04
Jinegelen7-Dec-04 14:04 
I was trying to make this (indeed, Click here to download)
code flikker free and so I altered the CCRDTuningDlg::OnPaint() to the following code:

// CPaintDC dc(this); // this was the original code which flickered
// pg->OnPaint(&dc); // this was the original code which flickered
// CDialog::OnPaint(); // this was the original code which flickered

if (!dont_redraw)
CDialog::OnPaint();

CRect rcClient;
GetClientRect( rcClient );

CDC MemDC, *pDC;
CBitmap MemBitmap;

pDC = this->GetDC();
MemDC.CreateCompatibleDC(pDC);
MemBitmap.CreateCompatibleBitmap( pDC, rcClient.right, rcClient.bottom );

CBitmap *pOldBitmap = ( CBitmap* ) MemDC.SelectObject( &MemBitmap );
MemDC.FillSolidRect(rcClient, RGB(224,223,227));

pg->OnPaint(&MemDC);

pDC->BitBlt(95,0,rcClient.right,rcClient.bottom,&MemDC,95,0,SRCCOPY);
MemDC.SelectObject(pOldBitmap);

ReleaseDC(pDC);
ReleaseDC(&MemDC);

dont_redraw = true;


But now the processor shoots up to the maximum as the application starts. Comment the new code and un-comment the old code to see the difference.

I'm an engineer in electronics, so programming isn't my strongest side.

For those who are interested, this program is used to reprogram a Common Rail engine tuning box. By doing this, you can gain up to 40% of power.

Greetz Tom
GeneralI forgot something Pin
Jinegelen7-Dec-04 14:20
Jinegelen7-Dec-04 14:20 
GeneralRe: Very high processor usage when trying to make program flicker free Pin
Ryan Binns7-Dec-04 17:58
Ryan Binns7-Dec-04 17:58 
GeneralRe: Very high processor usage when trying to make program flicker free Pin
Jinegelen8-Dec-04 1:03
Jinegelen8-Dec-04 1:03 
GeneralVisual C++ 7 Setting Debug exe Pin
Phil10267-Dec-04 13:08
Phil10267-Dec-04 13:08 
GeneralActivating a minimized window Pin
Vancouver7-Dec-04 12:10
Vancouver7-Dec-04 12:10 
QuestionMultiple DataType in List? Pin
bitpusher7-Dec-04 11:19
bitpusher7-Dec-04 11:19 
Generalconverting MFC App to dll Pin
vinayakdl7-Dec-04 10:47
vinayakdl7-Dec-04 10:47 
Generalmonitoring window usage Pin
BlackDice7-Dec-04 10:21
BlackDice7-Dec-04 10:21 
GeneralRe: monitoring window usage Pin
David Crow8-Dec-04 3:09
David Crow8-Dec-04 3:09 
GeneralRe: monitoring window usage Pin
BlackDice10-Dec-04 4:09
BlackDice10-Dec-04 4:09 
QuestionHow/Where to Change MFC Default Menu? Pin
bitpusher7-Dec-04 8:35
bitpusher7-Dec-04 8:35 
AnswerRe: How/Where to Change MFC Default Menu? Pin
Neville Franks7-Dec-04 9:11
Neville Franks7-Dec-04 9:11 
GeneralUsing VisStudio 2003 to make a COM in C++ Pin
caronwill7-Dec-04 7:01
caronwill7-Dec-04 7:01 
GeneralNeed AfxFindResourceHandle method on Win32 API Pin
Eugene Pustovoyt7-Dec-04 6:55
Eugene Pustovoyt7-Dec-04 6:55 
GeneralRe: Need AfxFindResourceHandle method on Win32 API Pin
David Crow7-Dec-04 7:36
David Crow7-Dec-04 7:36 
GeneralRe: Need AfxFindResourceHandle method on Win32 API Pin
Eugene Pustovoyt7-Dec-04 8:06
Eugene Pustovoyt7-Dec-04 8:06 
GeneralRe: Need AfxFindResourceHandle method on Win32 API Pin
David Crow7-Dec-04 8:14
David Crow7-Dec-04 8:14 

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.