How manage DefaultSize on Windows

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
User avatar
AlSith
Knows some wx things
Knows some wx things
Posts: 30
Joined: Fri Dec 20, 2019 7:43 am

How manage DefaultSize on Windows

Post 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?
Do or Do Not; there is No Try.
Before giving good Advice, good Examples must be given.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How manage DefaultSize on Windows

Post 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.
User avatar
AlSith
Knows some wx things
Knows some wx things
Posts: 30
Joined: Fri Dec 20, 2019 7:43 am

Re: How manage DefaultSize on Windows

Post 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 1363 times
Do or Do Not; there is No Try.
Before giving good Advice, good Examples must be given.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How manage DefaultSize on Windows

Post 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.
User avatar
AlSith
Knows some wx things
Knows some wx things
Posts: 30
Joined: Fri Dec 20, 2019 7:43 am

Re: How manage DefaultSize on Windows

Post 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..
Do or Do Not; there is No Try.
Before giving good Advice, good Examples must be given.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How manage DefaultSize on Windows

Post 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.
User avatar
AlSith
Knows some wx things
Knows some wx things
Posts: 30
Joined: Fri Dec 20, 2019 7:43 am

Re: How manage DefaultSize on Windows

Post 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..!!
Do or Do Not; there is No Try.
Before giving good Advice, good Examples must be given.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How manage DefaultSize on Windows

Post 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.
User avatar
AlSith
Knows some wx things
Knows some wx things
Posts: 30
Joined: Fri Dec 20, 2019 7:43 am

Re: How manage DefaultSize on Windows

Post 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
Do or Do Not; there is No Try.
Before giving good Advice, good Examples must be given.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How manage DefaultSize on Windows

Post 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.
Post Reply