my program rezises the screen resolution to 800x600 (from 1280x1024) and
back;
in 800x600 I have no taskbar ( it apears after some time)
back in 1280x1024 the taskbar stays as in 800x600.
I think I have to repaint or update the screen ..
how can I do this oder how can I solve the Problem ...
Thanx
olli
I'm sure I've seen this post in more than one group today. The single
most appropriate group should be chosen. My guess is that such a
newsgroup is .winapi.
For your problem you might use GetDesktopWindow to get the window handle
for the desktop and InvalidateRect on that handle to force a repaint.
See Win32.hlp for more details.
------
Mark Cashman (TeamB - C++ Builder), creator of The Temporal Doorway at
http://www.temporaldoorway.com
- Original digital art, writing, music and more -
C++ Builder / JBuilder Tips and The C++ Builder Programmer's Webring
(Join us!)
http://www.temporaldoorway.com/programming/index.htm
------
The desktop consits of a ListView and a TabControl. Use the following to update
each of these windows...
HWND DesktopLVHandle = FindWindow("ProgMan", 0);
DesktopLVHandle = GetWindow(DesktopLVHandle, GW_CHILD);
DesktopLVHandle = GetWindow(DesktopLVHandle, GW_CHILD);
ListView_RedrawItems(DesktopLVHandle, 0, 50);
InvalidateRect(DesktopLVHandle, NULL, true);
HWND HTaskBar = FindWindow("Shell_TrayWnd", NULL);
ShowWindow(HTaskBar, SW_HIDE);
ShowWindow(HTaskBar, SW_SHOW);
Good luck.
--------------------------------------
Damon Chandler
http://bcbcaq.freeservers.com
Answers to <Commonly Asked Questions>
Sorry,
I wasn't sure if this was a api or vcl problem ...
I am very new to the *.cppbuilder groups .ide .vcl .winapi, so I will try to
find
the correct groups in the future.
Thanx for your help!
Regards
olli