wxMAXIMIZE style is not working!
wxMAXIMIZE style is not working!
Hello,
the wxMAXIMIZE style is not working for apps launched outside the IDE (Code::Blocks, ...).
is this a bug ?
Thank you for your understanding.
the wxMAXIMIZE style is not working for apps launched outside the IDE (Code::Blocks, ...).
is this a bug ?
Thank you for your understanding.
Re: wxMAXIMIZE style is not working!
Hi,
What OS?
Are trying to run from the Terminal/Command Prompt or from the Explorer/Finder/whatever Linux uses?
Thank you.
What OS?
Are trying to run from the Terminal/Command Prompt or from the Explorer/Finder/whatever Linux uses?
Thank you.
Re: wxMAXIMIZE style is not working!
Actually it is a wxMSW related issue (sorry for not mentioning that).
When I run it inside Code::Blocks IDE it shows full screen, but when I run it directly from the windows explorer (double-clicking it) it wouldn't.
I have found that adding this code:
in my frame constructor will fix the issue, but this is just a workaround, and the main problem persists.
For some reason under windows, WS_MAXIMIZE style is getting ignored even added to the main window list of styles.
I thing this is a bug, tell me if I am wrong.
Code: Select all
MyFrame1( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("test"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxDEFAULT_FRAME_STYLE|wxMAXIMIZE|wxTAB_TRAVERSAL );
I have found that adding this code:
Code: Select all
m_maximizeOnShow = true;
For some reason under windows, WS_MAXIMIZE style is getting ignored even added to the main window list of styles.
I thing this is a bug, tell me if I am wrong.
Re: wxMAXIMIZE style is not working!
Hi,
I think you needed a second pair of eyes.
In your constructor call you supply 2 contradicting statements - you set the size of the window and at the same time you want it to be maximized.
You should have either one of those.
Thank you.
I think you needed a second pair of eyes.
In your constructor call you supply 2 contradicting statements - you set the size of the window and at the same time you want it to be maximized.
You should have either one of those.
Thank you.
Re: wxMAXIMIZE style is not working!
No, I don't. I am already wearing glasses
and BTW, that piece of code has been generated using wxFormBuilder (not me). And I have also tried with wxSize(-1, -1) and wxDefaultSize before posting here.
Thank you.
and BTW, that piece of code has been generated using wxFormBuilder (not me). And I have also tried with wxSize(-1, -1) and wxDefaultSize before posting here.
Thank you.
Re: wxMAXIMIZE style is not working!
Hi,
How do you call the constructor?
Thank you.
How do you call the constructor?
Thank you.
Re: wxMAXIMIZE style is not working!
Code: Select all
testFrame::testFrame(wxWindow *parent) : MyFrame1(parent)
{
#if wxUSE_STATUSBAR
m_statusBar1->SetStatusText(_("Hello Code::Blocks user!"), 0);
m_statusBar1->SetStatusText(wxbuildinfo(short_f), 1);
#endif
const void* jpegData = NULL;
size_t jpegSize = 0;
wxLoadUserResource(&jpegData, &jpegSize, "image1", RT_RCDATA, wxGetInstance());
wxMemoryInputStream is(jpegData, jpegSize);
m_panel1->LoadFile(is, wxBITMAP_TYPE_JPEG);
if (!m_mediaCtrl1->ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_DEFAULT))
// error - warn user
wxMessageBox("Could not show player controls");
m_listCtrl1->AppendColumn(_(""), wxLIST_FORMAT_CENTER, 20);
m_listCtrl1->AppendColumn(_("File"), wxLIST_FORMAT_LEFT, /*wxLIST_AUTOSIZE_USEHEADER*/305);
m_listCtrl1->AppendColumn(_("Length"), wxLIST_FORMAT_CENTER, 75);
AddToPlayList("test");
bSizer2->ShowItems(false);
m_maximizeOnShow = true; // <------------- THIS FIXED THE PROBLEM
//Center();
//Maximize();
}
Code: Select all
testFrame* frame = new testFrame(NULL);
frame->SetIcon(wxICON(aaaa)); // To Set App Icon
frame->Show();
Re: wxMAXIMIZE style is not working!
Hi,
Which wx version?
Also, I presume, it is Win10?
And final question - did you include proper "manifest"?
Thank you.
Which wx version?
Also, I presume, it is Win10?
And final question - did you include proper "manifest"?
Thank you.
Re: wxMAXIMIZE style is not working!
wx v3.1.1
Windows 7 Pro with SP1 32-Bit
Manifest included:[/b]
if you search for WS_MAXIMIZE ignored in google you will see that lots of people complaining about this problem for Win API.
Windows 7 Pro with SP1 32-Bit
Manifest included:
Code: Select all
#include "wx/msw/wx.rc"
if you search for WS_MAXIMIZE ignored in google you will see that lots of people complaining about this problem for Win API.
Re: wxMAXIMIZE style is not working!
Please take the "minimal" sample, add the wxMAXIMIZE flag to MyFrame and run it. I'm pretty sure it will work correctly.
This is nothing from wxWidgets itself. So i assume something in the wxFormBuilder code is responsible.
Code: Select all
m_maximizeOnShow = true; // <------------- THIS FIXED THE PROBLEM
Use the source, Luke!
Re: wxMAXIMIZE style is not working!
it did not worked either for the minimal sample
look:
look:
Re: wxMAXIMIZE style is not working!
Hi,
You can also call "frame->Maximize()" to make sure that the frame is maximized, before calling the "frame->Show()" to avoid flickering.
Thank you.
You can also call "frame->Maximize()" to make sure that the frame is maximized, before calling the "frame->Show()" to avoid flickering.
Thank you.
Re: wxMAXIMIZE style is not working!
Code: Select all
m_maximizeOnShow = true; // <------------- THIS FIXED THE PROBLEM
Unfortunately i have no explanation why wxMAXIMIZE doesn't work for you.
Use the source, Luke!
Re: wxMAXIMIZE style is not working!
This is why I thought, it could be a wxMSW port bug.
Should I report an issue in github ?
Should I report an issue in github ?