Re: ClientToWindowSize() doesn't work correctly with minimized windows on MSW

Igor Korot <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CA+FnnTwoOsN5_7FSyQeAAQoNfX+A-_equXEdoW7MVhJuNRX5aA@mail.gmail.com>
Hi, Andreas,

On Sun, Aug 11, 2024, 9:22 AM Andreas Falkenhahn <[email protected]>
wrote:

> I've noticed that using ClientToWindowSize() or WindowToClientSize()
> yields wrong results when the window is minimized on MSW because minimized
> windows on MSW have a size of 0/0 so the following calculation done by
> ClientToWindowSize()
>
>     const wxSize diff(GetSize() - GetClientSize());
>
> yields a difference of whatever size is in GetSize() and this difference
> is then added to the size passed to ClientToWindowSize() which obviously
> leads to completely wrong dimensions returned by ClientToWindowSize().
>
> The fact that ClientToWindowSize() doesn't work correctly when the window
> is minimized also has the implications that functions like
> SetMinClientSize() etc. don't work correctly with minimized windows on
> MSW...
>
> So I'm wondering if this is this something that should be fixed or are
> those functions simply not supposed to be used on minimized windows on MSW?
>

How do you calculate the .united window client size?
The window I. It's mini.ised form doesn't have a size and so doesn't have
any client area.

Thank you.


> --
> Best regards,
>  Andreas Falkenhahn                          mailto:[email protected]
>
> --
> 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/1604051370.20240811162229%40falkenhahn.com
> .
>

-- 
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/CA%2BFnnTwoOsN5_7FSyQeAAQoNfX%2BA-_equXEdoW7MVhJuNRX5aA%40mail.gmail.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.