Search found 19089 matches

by doublemax
Fri Mar 01, 2024 2:27 pm
Forum: C++ Development
Topic: How using my own sizer
Replies: 12
Views: 404

Re: How using my own sizer

meybe some more? Can You explain how const make o sizer work corectly? You said that your method doesn't get called. If you override a virtual function, its signature must match perfectly. The "const-ness" is part of the signature and the original method is "const": https://docs...
by doublemax
Fri Mar 01, 2024 2:09 pm
Forum: C++ Development
Topic: How using my own sizer
Replies: 12
Views: 404

Re: How using my own sizer

The signature of the method is wrong, it must be const.
by doublemax
Fri Mar 01, 2024 11:22 am
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

...but the performance penalty only pops up under Windows with scaling > 100%. There are two different issues here. 1) is the performance loss with scaling > 100 2) is the performance loss when using the D2D renderer instead of the GDI+ renderer. Both are a mystery :) Regarding 1): Does this scale ...
by doublemax
Fri Mar 01, 2024 10:46 am
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

It's probably too late to change your approach now, but there is of course a lot of performance wasted. The pure act of creating a wxGraphicsContext is a very "heavy" operation, especially with D2D. I'd need to run some tests to check if this could at least explain the massive loss of perf...
by doublemax
Fri Mar 01, 2024 10:14 am
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

Thanks for the code sample. Although there is room for optimization, i don't see anything that would explain the behavior. Every SVG represents an object and has its own wxWindow on the main panel. Also the drawing takes place on its own tiny wxWindow. Are you saying that every single small square h...
by doublemax
Fri Mar 01, 2024 12:05 am
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

If you don't reveal any details about how your drawing code looks like or what it does, we won't be able to help narrowing down what the issue is. If you're interested in a solution, you might have to try to create a minimal compilable sample that shows the problem.
by doublemax
Thu Feb 29, 2024 5:34 pm
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

rocrail wrote: Thu Feb 29, 2024 4:16 pm Using FromDIP and scaling > 100% under Windows is a show stopper.
Just out of curiosity: Could you give a few examples of how and where you used FromDIP()?

And is the same code path taken on each platform, or do you use conditional compilation and use different code?
by doublemax
Thu Feb 29, 2024 2:47 pm
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

The results are rather disappointing, especially this line: Benchmark Win10 GDI+ Win10 D2D Win11 GDI+ Win11 D2D default memory DC: 1000 ARGB bitmaps 39us/bitmap 662us/bitmap 45us/bitmap 803us/bitmap as this would probably come into play when using a wxBufferedPaintDC However there is one flaw int th...
by doublemax
Thu Feb 29, 2024 11:05 am
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

If you're using the default wxGraphicsContext in your code, try the Direct2D renderer under Windows.

Code: Select all

wxPaintDC dc(this);
wxGraphicsContext *gc =  wxGraphicsRenderer::GetDirect2DRenderer()->CreateContext(dc);
by doublemax
Tue Feb 27, 2024 10:06 pm
Forum: Compiler / Linking / IDE Related
Topic: codeblocks/wxsmith setup difficulties...
Replies: 17
Views: 581

Re: codeblocks/wxsmith setup difficulties...

Why do we never see similar reports for CodeLite? Either nobody uses it, or they have a proper support forum themselves, or users don't have any problems with it ;)
by doublemax
Tue Feb 27, 2024 10:04 pm
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

if so, why is this problem only with Windows? AFAIK the three major platforms all use different methods to handle HiDPI on OS level. I know that in Windows your app "sees" the true physical resolution (if it's marked DPI-aware), while in OSX it doesn't. You see a lower logical DPI and the...
by doublemax
Tue Feb 27, 2024 5:00 pm
Forum: Platform Related Issues
Topic: Windows Scaling 300%
Replies: 53
Views: 1621

Re: Windows Scaling 300%

Does this happen specifically at 300%, or any other value > 100%, too?

As your app looks so small, i assume it's marked as "dpi-aware".

Do you set explicit font sizes in pixels anywhere? These will be obeyed and do not scale up automatically.
by doublemax
Tue Feb 27, 2024 6:20 am
Forum: C++ Development
Topic: wxEVT_CONTEXT_MENU on a wxMediaCtrl window
Replies: 4
Views: 2071

Re: wxEVT_CONTEXT_MENU on a wxMediaCtrl window

Try wxEVT_RIGHT_UP
by doublemax
Sun Feb 25, 2024 5:32 pm
Forum: C++ Development
Topic: Get system's text scale factor on Windows 11
Replies: 4
Views: 263

Re: Get system's text scale factor on Windows 11

The font size is now fixed to 14 pt and the code will print "Font Size = 14pt" regardless of the system's text scaling factor. This is correct as "pt" is a physical unit (1/72 inch). If you request a font with that size, that's what you get. The text scaling only affects default...