Improve frame size in the listctrl sample

Make it bigger on high DPI displays and smaller on normal ones.
This commit is contained in:
Vadim Zeitlin 2024-01-05 03:03:55 +01:00
parent dc627da250
commit cfdfd14c59

View file

@ -170,7 +170,7 @@ wxEND_EVENT_TABLE()
// My frame constructor
MyFrame::MyFrame(const wxString& title)
: wxFrame(nullptr, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500))
: wxFrame(nullptr, wxID_ANY, title)
{
m_listCtrl = nullptr;
m_logWindow = nullptr;
@ -293,6 +293,9 @@ MyFrame::MyFrame(const wxString& title)
RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
// Make the list control big enough to show its initial contents.
m_listCtrl->SetInitialSize(FromDIP(wxSize(600, 300)));
#ifdef __WXMSW__
// this is useful to know specially when debugging :)
wxLogMessage("Your version of comctl32.dll is: %d",