Click here to Skip to main content
15,915,324 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mimicking system tray Pin
BaldwinMartin23-Nov-04 11:24
BaldwinMartin23-Nov-04 11:24 
GeneralUsing a DLL (Importing) Pin
sweep12323-Nov-04 6:21
sweep12323-Nov-04 6:21 
GeneralRe: Using a DLL (Importing) Pin
David Crow23-Nov-04 7:10
David Crow23-Nov-04 7:10 
GeneralRe: Using a DLL (Importing) Pin
BaldwinMartin23-Nov-04 9:41
BaldwinMartin23-Nov-04 9:41 
GeneralNon Static Images Pin
Anonymous23-Nov-04 5:20
Anonymous23-Nov-04 5:20 
GeneralRe: Non Static Images Pin
toxcct23-Nov-04 7:54
toxcct23-Nov-04 7:54 
GeneralParallel port and XP Pin
Budric B.23-Nov-04 4:39
Budric B.23-Nov-04 4:39 
GeneralRe: Parallel port and XP Pin
David Chamberlain23-Nov-04 9:20
David Chamberlain23-Nov-04 9:20 
QuestionHow can I use a toolbar to suspend my thread Pin
Anonymous23-Nov-04 4:24
Anonymous23-Nov-04 4:24 
AnswerRe: How can I use a toolbar to suspend my thread Pin
Budric B.23-Nov-04 4:47
Budric B.23-Nov-04 4:47 
GeneralRe: How can I use a toolbar to suspend my thread Pin
Antony M Kancidrowski23-Nov-04 4:51
Antony M Kancidrowski23-Nov-04 4:51 
GeneralRe: How can I use a toolbar to suspend my thread Pin
David Crow23-Nov-04 4:55
David Crow23-Nov-04 4:55 
GeneralRe: How can I use a toolbar to suspend my thread Pin
Antony M Kancidrowski23-Nov-04 5:04
Antony M Kancidrowski23-Nov-04 5:04 
GeneralVC++ Pin
Manjunath K V23-Nov-04 2:43
Manjunath K V23-Nov-04 2:43 
GeneralRe: VC++ Pin
David Crow23-Nov-04 2:53
David Crow23-Nov-04 2:53 
GeneralRe: VC++ Pin
toxcct23-Nov-04 7:51
toxcct23-Nov-04 7:51 
GeneralHelp! how to design a platform like UltraEdit Pin
josephvan23-Nov-04 2:34
josephvan23-Nov-04 2:34 
GeneralRe: Help! how to design a platform like UltraEdit Pin
toxcct23-Nov-04 7:49
toxcct23-Nov-04 7:49 
GeneralLoading the add-in icon at start up. Pin
VCSharp00723-Nov-04 2:29
VCSharp00723-Nov-04 2:29 
GeneralRe: Loading the add-in icon at start up. Pin
BaldwinMartin23-Nov-04 9:55
BaldwinMartin23-Nov-04 9:55 
GeneralRequest for suggestion Pin
Azghar Hussain23-Nov-04 2:28
professionalAzghar Hussain23-Nov-04 2:28 
GeneralRe: Request for suggestion Pin
John R. Shaw23-Nov-04 3:10
John R. Shaw23-Nov-04 3:10 
GeneralRe: Request for suggestion Pin
Azghar Hussain23-Nov-04 7:01
professionalAzghar Hussain23-Nov-04 7:01 
Hi,
Thanks for your valuable suggestion.

Actually I am not drawing World Map every time. It is drawn only once but I am drawing small towers on the MainMap in OnTimer() event. There might be atleast 300 to 400 small tower bitmaps which have to be loaded and drawn on the MainMap. I think you got confused. Let me explain you.

1) In OnPaint() I have drawn a MainMap on the Dialog Box.
2) In OnTimer() I am drawing 400 small bitmaps on the Dialog Box which appears like those small towers are on the MainMap.

I think now you got it.
Problem is I have to blit 400 bitmaps every time for 500 milliseconds to get blinking effect.

When my application is running and when ever I see my CPU usage it starts with 29% and when it was drawing 400 small bitmaps suddenly CPU usage goes to 54%.

I think CPU usage is going up because I am blitting 400 small tower bitmap at once.

I want to reduce the CPU usage.

"Make sure all drawing is done in OnPaint" I cannot do this because I have to call invalidate every time from OnTimer() this may increase CPU usage even more(This is what I am thinking but I have to test this and let you know with in few days).

I hope you understood my design. Please help me.

I think instead of blitting every time small bitmaps on the Dialog BOx. I think I will take some CStatic Controls.
and call SetBitmap(HBITMAP) to change the bitmap in those controls and Move these CStatic controls on different locations on Dialog Box. This may not also work because in OnPaint() I am Drawing MainMap this MainMap may overrite on these static controls and these static controls may not be visible.

Suggest me some thing good Idea. Plsssssssss

Thanks & Regards,
Deliver.

If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
GeneralRe: Request for suggestion Pin
John R. Shaw23-Nov-04 13:45
John R. Shaw23-Nov-04 13:45 
QuestionScope problem with CList? Pin
Cpt Rick23-Nov-04 1:25
Cpt Rick23-Nov-04 1:25 

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.