Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

desktop/screen refresh ???

4 views
Skip to first unread message

Oliver Sieben

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
Hi Folks,

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

Mark Cashman (TeamB BCB)

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
Hi, Oliver!

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
------

Damon Chandler

unread,
Jul 23, 1999, 3:00:00 AM7/23/99
to
Hi Oliver,

> I think I have to repaint or update the screen ..
> how can I do this oder how can I solve the Problem ...

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>

Oliver Sieben

unread,
Jul 24, 1999, 3:00:00 AM7/24/99
to

Mark Cashman (TeamB BCB) <mcas...@ix.netcom.com> schrieb in im Newsbeitrag:
3798DCB3...@ix.netcom.com...

> Hi, Oliver!
>
> 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.

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

0 new messages