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

Andreas Falkenhahn <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
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?

-- 
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.
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.