Re: What is the correct way to response to the wxEVT_DPI_CHANGED event?

AsmWarrior <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
Hi, Vadim Zeitlin and Maarten Bent. I think I found a mistake.

In my test code, it has such line:

sizer->Add(new wxButton(page, wxID_ANY, _T("Hello World"), 
wxDefaultPosition, wxWindow::FromDIP(wxSize(250,50), 0)));

Which is totally wrong here, because I have used the wrong argument for the 
FromDIP( wxSize(250,50), 0 ), the second argument 0 is totally wrong.

Now, I have removed the second argument, and the result is: when I click 
the ResetMode button, I don't have the reduced button size. (Which shows in 
the third screen shot of the forum post here:
How does the FromDIP function work under different DPI scaling? - wxWidgets 
Discussion Forum — https://forums.wxwidgets.org/viewtopic.php?f=1&t=50267)

I'm sorry about that, I think it was a copy and paste error. Also, when we 
pass the second 0 argument, can the function report something, because it 
will call a function below:

static wxSize wxWindow::FromDIP ( const wxSize &   sz,
const wxWindow *   w 
) 

Where the w pointer is 0.

Asmwarrior


-- 
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/70175682-4376-4f62-a22f-7aa57b54d0f7n%40googlegroups.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.