- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I'm having much trouble handling 4 different toolbars in the one application - inexperience showing through here. The application (a geographical information system) operates in 4 different modes with a dedicated toolbar for each of its 4 main screens.
I switch between toolbars using ShowWindow(hTB,SW_HIDE) and ShowWindow(hTB,SW_SHOW). These calls seem to issue their own WM_PAINT messages which cause the screen refeshing functions that I call with InvalidateRect to execute twice. Normally this might not matter much, but because I am displaying dense geographical information it can take 5 or 6 seconds to display it all - to have to go throught it all twice while the toolbar changes over is too much.
The problem does not occur if I don't call ShowWindow(hTB,SW_HIDE), but then I don't get the correct toolbar - the old one is still on display. If I call it but disable my call to InvalidateRect, the screen does not get refreshed at all.
What am I doing wrong?
With many thanks in advance,
Mike
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It sounds like you need only repaint the area of the main window that is covered by the current toolbar, which is about to be deleted. Isn't this automatically done by Windows? What happens if you display another application's window so that it obscurs part of your window and then you minimise the obscuring window?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page