Hi,
I need to have a user application receive some notification
whenever it's visibility changes. For example, I need to know when
the window becomes partially or completely covered up, when something that
had obscured part of the window is removed making more of the window visible,
or when the window is destroyed, etc.
I'm using windows XP / XP embedded.
I am also writing a KMDF driver for a device that is display-related, but
I am not writing, nor can I modify the display driver itself.
Here is the original approach:
The user app could pass the window handle to the driver. The driver could
call EngCreateWnd, and specify a WNDOBJCHANGEPROC callback that would get
invoked
when GDI changes the window visibility. The driver could pass a list of
visible rectangles back to the user app.
The problem with this approach is that I don't have access to any of the
SURFOBJ information
that is needed by the EngCreateWnd call to create the window object.
I have also considered the method identified in "Tracking Window Changes"
http://msdn2.microsoft.com/en-us/library/ms797870.aspx
but the application's ExtEscape call needs a device context. From what I
can tell,
this "Device Context" is different from a device context which I define for
my device. That makes me think that the DrvEscape will be invoked in the
display driver, not my driver.
Does anyone know how a driver can get the needed information to do this ?
Or better yet, is there possibly something we are missing in the user
mode interface that can notify an application when when window visibility
changes?
(This would be more that just a Paint Event)
Thanks in advance,
Jay