Page 1 of 1

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

Posted: Fri Aug 07, 2020 1:09 am
by bsenftner
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?

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

Posted: Fri Aug 07, 2020 6:31 am
by PB
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.