Hi everyone!
I'm using WTL and have a class that wraps the window
that is taskbar's child (HHTaskbar).
As this window needs to be transparent I need to capture WM_REPAINT
messages of the taskbar, get the DC it has
repainted itself, and then repaint the background of the child window.
(or at least I think this is the right way to accomplish this ;-)
The problem is that you cannot pass class member function as the
new window procedure (NewWndProc) using SetWindowLong() as long as it is
not static.
Having a static NewWndProc is not possible, because I need to remember
the address of the OldWndProc on a place available only to the
NewWndProc so that I may pass the messages to the OldWndProc.
Having a global variable/class that will store the OldWndProc is not an
option, as I may have more windows that should be transparent and they
should make a WndProc chain, i.e.
Window 2->Window 1->Taskbar
The solution I'm thinking about is to create a single "monitor" child
window that will subclass the HHTaskbar() and then implement Observer
pattern to notify observers on HHTaskbar's repaint.
Huh, maybe I'm just missing something. Is there any way to make a hook
under win ce 4.*? Any other ideas?
Greetings,
---
Esad Hajdarevic
ESSE Software Engineering