Re: do not update the programm window for a while
Why are you hiding the buttons? Maybe that is what is eating up the time
and making them flash since hiding them and showing them would make them
temporarily invisible.
Tom
"fiversen" <fiversen@wedding.in-berlin.de> wrote in message
news:f6051712-70c5-4962-b92f-a0f6e5706a9e@59g2000hsb.googlegroups.com...
I have an mfc application with an a field of buttons.
These button are organized in the programm in logical pages:
****
How do you mean "logical pages"?
****
Beside the CButtons I have structure
-touchlayout
--touchpage
---touchkey
with only text, position, color
To display a page,
I put the properties from the touchkeys of a touchpage to the real
existing CButtons.
1-first-page
but1 but2 but3 ..
2-first-page
but1 but2 but3 ..
At runtime the user switch from one page to another.
****
How?
****
Another touchpage with different touchkeys, .. properties to
CButton ...
The pages are build with the same buttons,
I only change the text and the command, when the button is press,
sometimes the background bitmap.
Problem:
When I change one button after another - then the programm is a little
bit slowly.
****
You would have to explain how you do this
****
slowly
- hide the CButton
- change properties of the CButtons
- show
quick
- hide all CButtons at one time, hide the parent of all the CButtons
- change properties of all the CButtons
- show the parent -> show all the CButtons
Much more better is, I hide the parent of the button before the
changes and then show it
again.
****
But you suggested that the parent is the dialog. It is hard to tell what
you are doing,
so it is hard to suggest how you might improve it.
The hierachie of Windows:
CFrameWnd
- CStatic - Background Bitmap
- - CButtons
Thanks, I first try the hints from the colleges
- LockWindow / UnlockWindow
- SetRedraw
--
Frank Iversen