Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using UpdateLayeredWindow on a region of a window

I'm using UpdateLayeredWindow to create a layered window, and I've implemented drawing logic for the child controls. My problem is that every time a change occurs to the uI, the whole frame needs to be redrawn. I wondered if there was a way to only redraw a specific CRect or CRgn of the window (ie, passing the relevant CDC into UpdateLayeredWindow, but specifying the CRect you want to be invlidated).

Would using UpdateLayeredWindowIndirect, and setting the prcDirty CRect in the UPDATELAYEREDWINDOWINFO struct, to the client area of the control, cause an update of only that area?

like image 937
user965369 Avatar asked Oct 09 '22 04:10

user965369


1 Answers

The psize and pptSrc parameters let you specify what portion of the window you want to update. UpdateLayeredWindow does not use an invalidation model. It uses an update model.

like image 101
Raymond Chen Avatar answered Oct 13 '22 10:10

Raymond Chen