Click here to Skip to main content
15,891,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: Scope problem with CList? Pin
David Crow23-Nov-04 2:57
David Crow23-Nov-04 2:57 
GeneralRe: Scope problem with CList? Pin
Cpt Rick23-Nov-04 5:42
Cpt Rick23-Nov-04 5:42 
GeneralRe: Scope problem with CList? Pin
Steve S23-Nov-04 6:00
Steve S23-Nov-04 6:00 
GeneralRe: Scope problem with CList? Pin
Cpt Rick24-Nov-04 6:49
Cpt Rick24-Nov-04 6:49 
AnswerRe: Scope problem with CList? Pin
BaldwinMartin23-Nov-04 9:51
BaldwinMartin23-Nov-04 9:51 
QuestionAre class definitions constant? Pin
One Stone23-Nov-04 0:51
One Stone23-Nov-04 0:51 
AnswerRe: Are class definitions constant? Pin
vikramlinux23-Nov-04 1:05
vikramlinux23-Nov-04 1:05 
AnswerRe: Are class definitions constant? Pin
Andrew Walker23-Nov-04 1:48
Andrew Walker23-Nov-04 1:48 
Questionabstract base class and data member doubt ? Pin
xcavin23-Nov-04 0:51
xcavin23-Nov-04 0:51 
AnswerRe: abstract base class and data member doubt ? Pin
geo_m23-Nov-04 1:30
geo_m23-Nov-04 1:30 
AnswerRe: abstract base class and data member doubt ? Pin
Andrew Walker23-Nov-04 1:41
Andrew Walker23-Nov-04 1:41 
GeneralHelp with writing class and imp them Pin
bhangie23-Nov-04 0:46
bhangie23-Nov-04 0:46 
GeneralRe: Help with writing class and imp them Pin
Maximilien23-Nov-04 2:41
Maximilien23-Nov-04 2:41 
GeneralRe: Help with writing class and imp them Pin
BaldwinMartin23-Nov-04 9:57
BaldwinMartin23-Nov-04 9:57 
GeneralAfxBeginThread Pin
jaime.lopez23-Nov-04 0:27
jaime.lopez23-Nov-04 0:27 

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.