Page 1 of 1

How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 10:00 am
by AlSith
Hi guys,
I'd a problem in management of toolbar size.
I updated wxWidgets version from 2.9.3 to 3.1.3, compiling in UNICODE_UTF8 mode, both on linux and windows; my application code create a toolbar and, on windows system, I'm not able to view correctly the bar.. I had to change the 'wxDefaultSize' to a specific 'wxSize(x, y)'.. and, in this case, I had the relative problem that it doesn't expand if I select full screen.

Code: Select all

int toolbarStyle = wxTB_TEXT | wxTB_NODIVIDER | wxTB_FLAT | wxTB_HORIZONTAL | wxSIMPLE_BORDER;
int sizerStyle = wxVERTICAL;
wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
wxToolBar *toolbar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, toolbarStyle);
toolbar->SetToolBitmapSize(wxSize(32,32));
SetSizer(new wxBoxSizer(sizerStyle));
SetAutoLayout(true);
GetSizer()->Add(toolbar, 0, wxEXPAND);
..on windows, to view the bar, I've to change

Code: Select all

wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(1000, 700), wxTAB_TRAVERSAL);
..someone could help me to understand why on windows seems to be a different management of size?

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 1:50 pm
by ONEEYEMAN
Hi,
Couple of questions:
1. How many toolbars you create?
2. Are you able to see toolbar when the program starts? Do you start the program as full-screen?
3. What is the Windows version you are trying under?
4. Can you build the toolbar and display samples and see if you can reproduce the issue? Display sample has a menu for the full-screen mode.

Thank you.

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 2:52 pm
by AlSith
sorry .. I'll try to give you more details.
1. How many toolbars you create?
I had 2 toolbar.. the main one and a secondary one that change with selection on the main
2. Are you able to see toolbar when the program starts? Do you start the program as full-screen?
The program starts with a defined size (900x675).. if I apply the specific size as in the first post, I see both bars
3. What is the Windows version you are trying under?
I'm developing on a virtual machine with windows XP (64bit)
4. Can you build the toolbar and display samples and see if you can reproduce the issue? Display sample has a menu for the full-screen mode.
I compile the relative example and I note the same issue.. if I select the full-screen mode, the bar doesn't adapt its size and the buttons and the menus don't work (that is the second problem I also have with my toolbar.. but we'll arrive on it next)
screenshot.JPG
screenshot.JPG (17.66 KiB) Viewed 346 times

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 3:06 pm
by ONEEYEMAN
Hi,
Did you modify the sample in any way?
Or the library source code?
What compiler do you use What version?
Also - do you have access to more recent Windows version? Maybe even a real hardware and not a VM...

Thank you.

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 3:40 pm
by AlSith
Did you modify the sample in any way?
No, the sample is the original
Or the library source code?
I modified bites of source code to be able to compile in UTF8 mode.. (I don't know if you remember my previous issue #UTF-8BuildOnWindows).. but, no change about toolbar..
What compiler do you use What version?
Microsoft (R) 32-bit C/c++ Optimizing Compiler versione 16.00.30319.01 per 80x86
Also - do you have access to more recent Windows version? Maybe even a real hardware and not a VM...
..at the moment, I am working in an intelligent way.. and therefore, the VM is the only way I can use.. and the program must remain compatible with Windows XP..

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 4:14 pm
by ONEEYEMAN
Hi,
UTF8 shouldn't affect anything, but...

Can you try to build the unmodified version of the library and sample?

Also - are you using HiDPI monitor with the VM?

Thank you.

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 5:11 pm
by AlSith
Ok ONEEYEMAN, thanks for suggestion..
UTF8 shouldn't affect anything, but...
no, in theory, it shouldn't affect anything
Can you try to build the unmodified version of the library and sample?
if I compile unmodified version, the sample runs correctly.. therefore, I'd to review my modified version..
#-o #-o #-o

..I keep you updated..thanks..!!

Re: How manage DefaultSize on Windows

Posted: Wed Jun 10, 2020 5:21 pm
by ONEEYEMAN
Hi,
AlSith wrote:
Wed Jun 10, 2020 5:11 pm
Ok ONEEYEMAN, thanks for suggestion..
UTF8 shouldn't affect anything, but...
no, in theory, it shouldn't affect anything
Unfortunately it looks like it did. ;-)
AlSith wrote:
Wed Jun 10, 2020 5:11 pm
Can you try to build the unmodified version of the library and sample?
if I compile unmodified version, the sample runs correctly.. therefore, I'd to review my modified version..
#-o #-o #-o

..I keep you updated..thanks..!!
Yes, you probably overdid the changes.
Or the sizing code is really depends on this settings.

Remind me again - why do ou need the UTF8 build on Windows?

Thank you.

Re: How manage DefaultSize on Windows

Posted: Mon Jun 15, 2020 9:50 am
by AlSith
Remind me again - why do ou need the UTF8 build on Windows?
My company has developed a client/server program compatible linux/windows.. (server only on linux machine).. on linux we're changing to work in utf-8 mode.. and I've to evalutate if it could be better also work so under windows or convert information between uf-8 and utf-16

Re: How manage DefaultSize on Windows

Posted: Mon Jun 15, 2020 3:50 pm
by ONEEYEMAN
Hi,
If you have a client/server app, then you shouldn't depend on whether the client or server uses UTF16, UTF8, UTF32, EBCDIC or 8851.
All you should depend on is the protocol - what traffic is sent and what traffic is received.

Thank you.