nanogui: Thread: UPDATEREGIONS problems


[<<] [<] Page 1 of 1 [>] [>>]
Subject: UPDATEREGIONS problems
From: ####@####.####
Date: 20 Nov 2002 07:56:32 -0000
Message-Id: <003901c29069$9b72c0f0$9af1ebd3@jedi>

I wonder if the UPDATEREGIONS flag work,

I turned on the UPDATEREGIONS flag and called "InvalidateRect()" to redraw only the designated rectangular area.
However microwindows redraw the whole window, whenever the paint message arrives.

I checked the update region which are handled in HWND structure and they had no problems.

I think the update region in HWND is passed to PSD and HDC when GetDCEx() is called but  I can't understand the mechanism.
In GetDCEx() code, the codes surrounded by UPDATEREGION do not seem to work, 
because GetDCEx() function is always called with the "hrgnClip=NULL" as parameter.

If I am wrong and there is a way to enable partial redrawing, please let me know.
I am in a serious trouble now as I have to change the whole software architecture, if partial redrawing is not possible.

Thanks in advance.
Subject: Re: [nanogui] UPDATEREGIONS problems
From: "Greg Haerr" ####@####.####
Date: 20 Nov 2002 15:19:43 -0000
Message-Id: <018301c290a7$2e6e1660$3aba46a6@xmission.com>

: I am in a serious trouble now as I have to change the whole software
architecture, if partial redrawing is not possible.

You shouldn't be in trouble.  With UPDATEREGIONS,
Microwindows calculates the union of the window
visible area and the invalidated area of the window,
allowing updating only in this usually smaller area.

: I think the update region in HWND is passed to PSD and HDC when GetDCEx() is
called but  I can't understand the mechanism.
In GetDCEx() code, the codes surrounded by UPDATEREGION do not seem to work,
because GetDCEx() function is always called with the "hrgnClip=NULL" as
parameter.

Try removing the DCX_EXCLUDEUPDATE flag passed to GetDCEx()
in the BeginPaint function in wingdi.c.  It appears I've
added it back in again for the mdemo program.

The UPDATEREGION should be correct when BeginPaint is called.
When GetDC is called, you will get just the window region.

Regards,

Greg

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.