I need to make a transparent window just like those in Windows 2000/XP, but it should be working on Windows 98. Can anyone give me an idea how this can be achieved.
My initial idea was to override the drawing of a dialog window in such a way that, when it needs repainting, all painting to occur in a memory device context instead of the default screen dc, which afterwards to be BitBlt-ed to screen using a transparency technique. But there appeared serious problems which I still can't find solutions for. What I tried so far is: Made a new dialog and overrode WM_PAINT, WM_NCPAINT and WM_ERASEBACKGROUND to prevent it from drawing on screen. The outcome was the following:
1. Although WM_NCPAINT does nothing (simply returns), the title bar still redraws when I press the taskbar button of the application.
2. Even when I call ValidateRect in WM_PAINT, the controls contained into the dialog still do redraw from time to time (e.g. when moving the window).
And more questions are arising even if this worked fine (e.g. nothing ever was drawn to screen):
- how can I make all child controls paint themselves to a specified dc;
- how can I intercept and process repainting messages for the child controls (e.g. editing in an EditBox, selecting a button and so on)
10x in advance and looking forward to receiving advises!
My initial idea was to override the drawing of a dialog window in such a way that, when it needs repainting, all painting to occur in a memory device context instead of the default screen dc, which afterwards to be BitBlt-ed to screen using a transparency technique. But there appeared serious problems which I still can't find solutions for. What I tried so far is: Made a new dialog and overrode WM_PAINT, WM_NCPAINT and WM_ERASEBACKGROUND to prevent it from drawing on screen. The outcome was the following:
1. Although WM_NCPAINT does nothing (simply returns), the title bar still redraws when I press the taskbar button of the application.
2. Even when I call ValidateRect in WM_PAINT, the controls contained into the dialog still do redraw from time to time (e.g. when moving the window).
And more questions are arising even if this worked fine (e.g. nothing ever was drawn to screen):
- how can I make all child controls paint themselves to a specified dc;
- how can I intercept and process repainting messages for the child controls (e.g. editing in an EditBox, selecting a button and so on)
10x in advance and looking forward to receiving advises!