Unsolved Draw on other program
-
Hello,
I'm trying to draw a window of QT on a different window (same application basically), how would i make sure the window doesnt leave the bounds of the other application, and if it does, how do i "cut off" the qt app?
-
Hi
Im not sure what you mean ?
You try to draw on top of another window in same application ?
When you say draw, do you mean put the actual window on top of other window ? -
yes, so say i have a window, which isnt exactly mine, but a DLL gets injected into the process.
This dll spawns a UI and it basically has to be drawn on top of the window that already existed, as if it is a member, and when you try to drag it outside of the window that already existed it wont go outside of it, it'll just only partially draw it.
-
Hi
That sounds a bit kinky :)
is the other window also a Qt app?Since the DLL window is not really inside the other windows, im not sure we can clip it in any easy way.
-
It's not, sadly.
-
@Mehodin
Hi. ok. that makes it very hard.
i did try fast with
QWidget::createWindowContainer
and grab notepad window and place it under Qt control but
sadly the stacking order makes it impossible to move any other Widget on top of it.
The foreign window would always be top.So sadly i know no way to clip your window to the foreign window so
only option is maybe to detect when your window is moved and reduce with or height. -
hmm, how about SetForegroundWindow when it's not foreground window? Wouldn't that allow you to?
-
Hi
Nope, not with createWindowContainer it seems.
just tried.Just wondering, is you DLL window some sort of
extra info or why is it important to clip it other the foreign window? -
so it looks good, lol.
Right now i just set it to frameless borderless window hint thingy, and then grab the sizes of the other window and draw it over it, so yeah.
I guess this is a temporary solve.
-
@Mehodin
Yep, seems best way to avoid it sticking outside.