|
Will the ShowWindow() API help you?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Use a combination of SetWindowPos and/or MoveWindow to grow/shrink said window; thus show or hiding a portion of the dialog.
|
|
|
|
|
|
|
Will the compiler optimize the MESSAGE MAP of each class?
Or else, I'd better rearrange it by putting high-frequent messages at top of the array.
|
|
|
|
|
Does it really matter?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
How could the compiler know which messages occur with more frequency?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I guess he supposes the compiler optimizing message handling on position (in the MESSAGE_MAP list) based mechanism, this way the developer could suggest the compiler itself what will be the more frequently used message.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
It's in the service pack, Mark. Come on, you're gonna have to keep up.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Exactly. You can lead a compiler to water but you can't make it fish.
led mike
|
|
|
|
|
Are you sure? That may be in the service pack as well!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
led mike wrote: Exactly. You can lead a compiler to water but you can't make it fish.
That was too good.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Reading through the list of threads below...
It must be the fishing season opener today
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: It must be the fishing season opener today
Yeah, it makes me picture that scene in Jaws where all the bounty hunters are flying around the marina in boats with shotguns and TNT etc.
led mike
|
|
|
|
|
Yeah!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
some can be determined, like
WM_PAINT vs WM_CREATE
|
|
|
|
|
followait wrote: some can be determined
By the compiler?
I don't know of any MFC/Windows-specific optimizations in the VC++ compiler.
The source code for the BEGIN_MESSAGE_MAP macro will tell you if
it's optimal to move frequent messages to the top.
FWIW, I've always done that, but I've never bothered to check if it helps.
For all I know, it's the reverse Please let me know what you find!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Do you have any metrics to claim that the MESSAGE_MAP is not optimal ?
anyway, if that's your only performance concern in your application, you can just stop there and go have a beer.
|
|
|
|
|
Why not put WM_PAINT before WM_CREATE ?
Maybe the perform here can be ignored.
|
|
|
|
|
If the MESSAGE MAP really IS a map, then the order of items is not likely to make a difference at all...
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
James R. Twine wrote: If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
That's a fantabulous quote.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Do you experience any problem with your application ? Is it so painfully slow that you need to look at each msec that you can gain ?
Otherwise, I'll cite a famous quote from Donald Knuth:
Early optimization is the root of all evil.
With which, on this specific case, I absolutely agree. You'll probably end up doing things much worse (making the code more difficult to maintain, full of bugs, ...) just to gain something totally neglectable.
|
|
|
|
|
Cedric Moonen wrote: each msec
That ought to be some fraction of nano sec, I guess.
Cedric Moonen wrote: With which, on this specific case, I absolutely agree. You'll probably end up doing things much worse (making the code more difficult to maintain, full of bugs, ...) just to gain something totally neglectable.
Well put.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
followait wrote: Will the compiler optimize the MESSAGE MAP of each class?
The answer is NO.
The arrangement of lines of code in your MFC MESSAGE_MAP has no effect on the compilers output.
Best Wishes,
-David Delaune
|
|
|
|
|
I am working on a project and i want to determine the size(memory) of the flash on which i am supposed to restore . is there anyway by which i can determine it
prashant jain malviya national institute of technology
|
|
|
|