I have a program which is not written by me. I dont have its source and the developer of that program is developing independently. He gives me the HWND
and HINSTANCE
handles of that program.
I have created a child window ON his window, using win32
api.
First thing I need is to make this child window have transparency on some area and opaque on other area(like a Heads up display(HUD) for a game), so that the user may see things in both windows.
The second thing that I need is to direct all the input to the parent window. My child window needs no input.
I know that WS_EX_TRANSPARENT
only makes the child draw at the end like in painters algorithm.
I cant use WS_EX_LAYERED
because its a child window.
p.s.
I have looked everywhere but didn't find any solution though there were similar questions around the internet.
Actually this is a HUD like thing for that game. I can't draw directly on parent window because of the complexity with multi-threads any many other reasons.
-- EDIT ---------------------------
I am still working on it. I am trying different ways with what you all suggested. Is there a way to combine directX
and SetWindowRgn()
function or directx
with BitBlt()
function? I think that will do the trick. Currently I am testing all the stuff as a child window and a Layered window.