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

RedrawWindow for desktop restore?

11 views
Skip to first unread message

Clearco

unread,
Nov 26, 2009, 12:12:49 PM11/26/09
to
Hi all,

I am trying to write on a rect covering the entire screen on the
desktop (WinCE 5.0) using GetDC(NULL) to take control of the screen.
How may I restore the desktop when I ReleaseDC?
How may I force the desktop to refresh?
I already tried RedrawWindow(NULL, &rc, NULL, RDW_ERASE |
RDW_INVALIDATE | RDW_INTERNALPAINT | RDW_UPDATENOW);
where rc is the rectangle corresponding to the entire screen.

thanks for the hint.

Filippo

Paul G. Tobey [eMVP]

unread,
Nov 27, 2009, 11:27:37 AM11/27/09
to
InvalidateWindow() is what you'd do normally do to cause something to
redraw... You can call GetDesktopWindow() to get the desktop.

Paul T.

"Clearco" <fgbo...@gmail.com> wrote in message
news:aeb8d318-845b-47cb...@p8g2000yqb.googlegroups.com...

Clearco

unread,
Dec 2, 2009, 11:48:16 AM12/2/09
to
On 27 Nov, 17:27, "Paul G. Tobey [eMVP]" <paul tobey _AT_ earthlink

_DOT_ net> wrote:
> InvalidateWindow() is what you'd do normally do to cause something to
> redraw...  You can call GetDesktopWindow() to get the desktop.
>

Thanks Paul.

I am trying now to restore a window minimized by the opening
of another window related to some other task...
Should I use the same functions? They seem not working...

Regards

Filippo

Paul G. Tobey [ eMVP ]

unread,
Dec 2, 2009, 2:05:01 PM12/2/09
to
What are you actually trying to do? Note that we need to know *what* you're
doing, not how you've decided to try to do it. You may have picked a bad
strategy.

None of the normal operations that an application would perform need to do
any of this.

Paul T.

"Clearco" wrote:

> .
>

Clearco

unread,
Dec 3, 2009, 2:36:59 AM12/3/09
to
Paul G. Tobey [ eMVP ] ha scritto:

> What are you actually trying to do? Note that we need to know *what* you're
> doing, not how you've decided to try to do it. You may have picked a bad
> strategy.
>
> None of the normal operations that an application would perform need to do
> any of this.
>

Of course you are right, I made the same mistake that I often blame
when
supporting my customers...

I am trying to design a CE driver that need to take exclusive
control of the screen for displaying messages that have not
to be hidden or misplaced or minimized for any reason by
any other thread opening windows.
After the driver has finished, I have to restore the previous
desktop appearance.

Thanks

Regards

Filippo

Paul G. Tobey [ eMVP ]

unread,
Dec 4, 2009, 11:22:01 AM12/4/09
to
It seems that a modal dialog run from a high-priority user interface thread
and set to be front-most would do that without all the screwing around. If
you do it this way, you can bypass trying to rewrite the window manager
yourself. When the dialog closes, things act just like when any other window
closes and the right stuff is redrawn.

Paul T.

"Clearco" wrote:

> .
>

Clearco

unread,
Dec 10, 2009, 6:29:24 AM12/10/09
to
Thanks Paul,
I will try that way.

Filippo


On 4 Dic, 17:22, Paul G. Tobey [eMVP] <paultobey _at_ earthlink _dot_

0 new messages