Re: Fitting persistent window to screen when screen size changes

Kenneth Porter <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
On 5/3/2024 2:20 PM, Igor Korot wrote:
> Are you talking about the DPI change, screen rotation,
> changing the size of the screen from 1920xN to 1440XN for
> example?

My Remote Desktop session is set to 1280x1024. I often connect to 
systems with 1024x768 displays. I might also use a session from my 4k 
screen. Imagine I move the window on my 4k screen to the right half. 
Then I release the session to someone using the PC locally. The window 
is way off the right edge of their screen. The same would happen if I 
closed the app with the window off to the right and they started the app.

So I need two things: One is to move the window from its persisted 
location back onto the smaller display, potentially resizing to fit. 
Second, when a user using a smaller screen takes control, I need to 
intercept some event and bring the window back onto the now smaller display.

The first part I could do with explicit code, but I'm wondering if 
there's something in the library that can already do this. For the 
second part I just need to know if there's an event to intercept when 
the screen changes between local and remote. Or even someone plugging a 
different monitor in.

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/2d0ca09f-35a9-4613-9fea-3ad9a19f2be0%40sewingwitch.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.