I have a winform window in which I am drawing manually/programmatically, I would like to provide a HWND handle to a process I cannot modify that expressly awaits a win32 HWND (this process is then going to draw its own things in my window, using the HWND handle).
The important point of detail is that I want the HWND to point at a certain location in my window.
Is there a way to create a new artificial HWND which would point a particular zone of my window?
You can only get a HWND to a window and every control like buttons checkboxes etc are also considered windows. So if there is no control located at the "zone" where you want to get a HWND to, that is not possible. But if there is a groupbox on that place for instance, it is possible.
You want to draw to a certain area. So why not just get a handle to the window and with the use of GetClientRect and GetWindowRect and draw to the x/y coordinates you want.