wxwidget Set window size to fit screen

60 Views Asked by At

How to set application window size to fit entire screen automatically when the application start? Currently using c++ wxwidget GetClientSize but it only allows setting of absolute dimensions.

Cant find any functions or info for this.

2

There are 2 best solutions below

0
Igor On BEST ANSWER

@DappyKape,

Use ShowFullScreen().

Check display sample for the usage.

Or call Maximize().

0
万顷茫然 On

Use wxMAXIMIZE in window style.

wxFrame *frame = new wxFrame(NULL, -1, _T("Caption"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE | wxMAXIMIZE, _T("window"));