Creating a window of w,h does not create a window of w,h Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
bsenftner
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu May 26, 2016 9:19 pm

Creating a window of w,h does not create a window of w,h

Post by bsenftner » Fri Aug 07, 2020 1:09 am

Working in C++, developing with Visual Studio, using latest WxWidgets, and deploying to Windows and Linux...

I am working on a small application requiring pixel accuracy of the layout, controls, windows etc.

I am pretty confident that when requesting my application's main frame to be x pixels by y pixels in dimensions, what is actually delivered is a top window frame with the width equal to requested_width * 0.99125 and the height is requested_height * 0.9911392.

I've gone through multiple wxWidgets applications I've created over the last few years in an attempt to see if this size multiplier is the same across all the applications, and it is. Consistently, the windows requested are slightly smaller than their creation dimension request.

What is going on here?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2672
Joined: Sun Jan 03, 2010 5:45 pm

Re: Creating a window of w,h does not create a window of w,h

Post by PB » Fri Aug 07, 2020 6:31 am

I have no idea about Linux or constant ratios, the following applies to frames on Win10...

Please see here for possible explanation and here for an attempt at wxWidgets workaround code.

Post Reply