0

just a hopefully not too long qquestion: Is it possible in C++ to "attach" to HWNDs to eachother? As an result the one should always follow the otehr one, no matter whether there are other windows infront of them or whether that window is ontop.

Does anyone know how that could be done? Note that the HWND is practically the only thing I know about that window which should be followed.

Thanks in advance!

DragonGamer
  • 834
  • 3
  • 9
  • 27
  • Well, knowing the HWND kind of means you have the tools to obtain mostly all the information you could want about it. – chris Oct 10 '12 at 20:07
  • Do you have control of the code in both windows? – David Heffernan Oct 10 '12 at 20:07
  • I've seen applications do it, so it is possible. Not necessarily in a (explicitly) OS-supported way, though, they might have just manually updated the position of the second window. – Paul Manta Oct 10 '12 at 20:07
  • As far as I'm aware, the closest you can do is write some tool to be notified when one window is brought foreground and then bring the other one forward. Although note that you can only have 1 foreground window at any time. – Mike Kwan Oct 10 '12 at 20:17
  • Unfortunately I've no code of the main windows where my window should be attached to. The window I want to attach is using the WS_EX_NOACTIVATE Style though, so it's not pushing itself into the foreground, I think. However, yes I would try to place the window manually and the position wouldn't be the problem. My problem is the order though. Is tehre any sort of list built-in in windows which contains all existing windows and allows me to change their order? – DragonGamer Oct 10 '12 at 20:26

0 Answers0