Click here to Skip to main content
15,921,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOnRButtonUp Pin
greba10-Dec-04 8:33
greba10-Dec-04 8:33 
GeneralRe: OnRButtonUp Pin
greba10-Dec-04 9:13
greba10-Dec-04 9:13 
GeneralRe: OnRButtonUp Pin
G. Steudtel10-Dec-04 9:16
G. Steudtel10-Dec-04 9:16 
Generalregular experssion in C++ Pin
pnpfriend10-Dec-04 7:47
pnpfriend10-Dec-04 7:47 
GeneralRe: regular experssion in C++ Pin
John M. Drescher10-Dec-04 8:03
John M. Drescher10-Dec-04 8:03 
GeneralRe: regular experssion in C++ Pin
Jack Puppy10-Dec-04 11:17
Jack Puppy10-Dec-04 11:17 
GeneralRe: regular experssion in C++ Pin
John R. Shaw10-Dec-04 18:44
John R. Shaw10-Dec-04 18:44 
GeneralCDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 7:01
moredip10-Dec-04 7:01 
Hi all,

I'm trying to fix some efficiency issues with some graph-drawing code in my application. This is an MFC application, so I'm using CDCs. Different parts of the graph display are rendered to seperate in-memory CDCs, and then they are combined into a final in-memory CDC via BitBlt() calls. This final CDC is then BitBlt()ed to the window's CClientDC during OnPaint().

I've added some QueryPerformanceCounter() calls into my rendering code to try and figure out what calls are eating up the most cycles, and I'm seeing some wierd behaviour. Here's an example:

<------------SNIP------------------>
C2DTrajWindow::UpdateVirt(): m_memDC.BitBlt( 0, 0, 1280, 827, &m_decorationsMemDC, 0, 0, SRCAND ) ] took 0.017600 milliseconds
C2DTrajWindow::UpdateVirt(): m_memDC.BitBlt( 0, 0, 1280, 839, &m_decorationsMemDC, 0, 0, SRCAND ) ] took 0.017600 milliseconds
C2DTrajWindow::UpdateVirt(): m_memDC.BitBlt( 0, 0, 1280, 837, &m_decorationsMemDC, 0, 0, SRCAND ) ] took 876.786575 milliseconds
C2DTrajWindow::UpdateVirt(): m_memDC.BitBlt( 0, 0, 1280, 814, &m_decorationsMemDC, 0, 0, SRCAND ) ] took 0.017879 milliseconds
<------------SNIP------------------>

As you can see, normally this BitBlt() operation takes very little time, but every now and then it jumps up to around 800ms. I can't figure out why!

Any one have any suggestions?

TIA,

Pete
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 7:22
G. Steudtel10-Dec-04 7:22 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 7:31
moredip10-Dec-04 7:31 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 7:52
G. Steudtel10-Dec-04 7:52 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 8:16
moredip10-Dec-04 8:16 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
G. Steudtel10-Dec-04 9:10
G. Steudtel10-Dec-04 9:10 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 9:22
moredip10-Dec-04 9:22 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
Jack Puppy10-Dec-04 11:37
Jack Puppy10-Dec-04 11:37 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip10-Dec-04 11:46
moredip10-Dec-04 11:46 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
Jack Puppy11-Dec-04 13:09
Jack Puppy11-Dec-04 13:09 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
moredip13-Dec-04 4:48
moredip13-Dec-04 4:48 
GeneralRe: CDC::BitBlt(...) - strange speed variations Pin
John R. Shaw10-Dec-04 19:09
John R. Shaw10-Dec-04 19:09 
GeneralWM message Pin
Ann6610-Dec-04 6:45
sussAnn6610-Dec-04 6:45 
GeneralRe: WM message Pin
prcarp10-Dec-04 7:00
prcarp10-Dec-04 7:00 
GeneralBaisc Pointer Question Pin
Anonymous10-Dec-04 6:18
Anonymous10-Dec-04 6:18 
GeneralRe: Baisc Pointer Question Pin
Maximilien10-Dec-04 6:40
Maximilien10-Dec-04 6:40 
GeneralRe: Baisc Pointer Question Pin
Anonymous10-Dec-04 6:51
Anonymous10-Dec-04 6:51 
GeneralRe: Baisc Pointer Question Pin
John M. Drescher10-Dec-04 9:56
John M. Drescher10-Dec-04 9: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.