Search found 19089 matches

by doublemax
Fri Mar 15, 2024 11:30 pm
Forum: Compiler / Linking / IDE Related
Topic: Visual C++ IDE build error messages: 'static_cast': cannot convert from 'const _T' to 'wchar_t *'
Replies: 9
Views: 349

Re: Visual C++ IDE build error messages: 'static_cast': cannot convert from 'const _T' to 'wchar_t *'

My next best guess is that VC somehow finds old header files that are on your system. E.g. when the compiler doesn't know NMTVITEMCHANGE, that can only be caused by wrong preprocessor symbols, or using pre-Vista header files.

Can you check the default include directories?
vc_directories.png
by doublemax
Fri Mar 15, 2024 8:19 am
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

You could try to just force an aspect ratio instead of an absolute size, and store the coordinates in a normalized way, e.g. float values from 0 to 1. But i'm not 100% sure if this works.
by doublemax
Thu Mar 14, 2024 8:01 pm
Forum: Compiler / Linking / IDE Related
Topic: Visual C++ IDE build error messages: 'static_cast': cannot convert from 'const _T' to 'wchar_t *'
Replies: 9
Views: 349

Re: Visual C++ IDE build error messages: 'static_cast': cannot convert from 'const _T' to 'wchar_t *'

When installing VS2022, did you select "Desktop development C++", or install individual packages? The former one definitely works, i just tested it in a clean VM and a fresh VS2022 Community installation.
by doublemax
Thu Mar 14, 2024 4:54 pm
Forum: C++ Development
Topic: wxGrid object's ref count assertion failed in multi-threading
Replies: 31
Views: 873

Re: wxGrid object's ref count assertion failed in multi-threading

The weird thing is, I don´t use wxFont in threads. I only draw lines. How often do you get the warning? And is the call stack always the same? It is possible that the issue is not directly related to your drawing code. If you can easily comment out the actual drawing (but keep the paint event handl...
by doublemax
Thu Mar 14, 2024 2:16 pm
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

sivaranjani wrote: Thu Mar 14, 2024 2:08 pm Is there anyway to make coordinate same irrespective of resolution changes?
You could set both the maximum and minimum size of the wxGLCanvas to the same size, so it can't change.
by doublemax
Thu Mar 14, 2024 2:04 pm
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

sivaranjani wrote: Thu Mar 14, 2024 1:55 pm if screen was maximized it shows different coordinates.
Well, of course. As the object shown is centered in the viewport and scales to the viewport, coordinates of elements in the object will change if the size of the viewport changes.
by doublemax
Thu Mar 14, 2024 1:36 pm
Forum: C++ Development
Topic: wxGrid object's ref count assertion failed in multi-threading
Replies: 31
Views: 873

Re: wxGrid object's ref count assertion failed in multi-threading

mael15 wrote: Thu Mar 14, 2024 1:14 pm I just get these annoying message boxes when closing the app. sometimes, not consistently. I would love to get rid of those...
First thing to do is to get a call stack at the assert so you know what kind of object it is. They should help to narrow where is happens.
by doublemax
Thu Mar 14, 2024 1:08 pm
Forum: C++ Development
Topic: wxGrid object's ref count assertion failed in multi-threading
Replies: 31
Views: 873

Re: wxGrid object's ref count assertion failed in multi-threading

thank you for clarifying. it is unfortunate that this makes threads so much less useful, or more dangerous. I've never seen that as a real limitation. A custom paint event handler just draws data from a model. You can modify that model from threads if you protect it with a wxMutex/CriticalCondition...
by doublemax
Thu Mar 14, 2024 1:04 pm
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

Is the client area of the wxGLCanvas really identical in both cases?

Can you make a screenshot of both?
by doublemax
Thu Mar 14, 2024 12:41 pm
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

In that case you'll need to show some code. Maybe you're using screen coordinates instead of window coordinates?

Also: What platform are you using?
by doublemax
Thu Mar 14, 2024 11:26 am
Forum: C++ Development
Topic: wxGLCanvas
Replies: 16
Views: 368

Re: wxGLCanvas

I assume you changed not only the resolution, but also the scaling of the display. Please read the comment about physical pixels at the beginning of this page: https://docs.wxwidgets.org/trunk/classw ... anvas.html
by doublemax
Wed Mar 13, 2024 4:54 pm
Forum: C++ Development
Topic: XRCCTRL anomaly?
Replies: 10
Views: 248

Re: XRCCTRL anomaly?

As there can only be one menubar per frame, can't you use wxFrame::GetMenuBar()?
https://docs.wxwidgets.org/trunk/classw ... 7397b4e211
by doublemax
Tue Mar 12, 2024 11:15 pm
Forum: Platform Related Issues
Topic: macOS Metal Issue - App Crashes Immediately
Replies: 12
Views: 299

Re: macOS Metal Issue - App Crashes Immediately

Somehow i suspect the crash is related to the warnings you get without the "--disable-sys-libs", but it's just a feeling. I can only suggest to ask again on the wx-users group, maybe one of the core devs has an idea. https://groups.google.com/g/wx-users
by doublemax
Mon Mar 11, 2024 7:24 pm
Forum: Platform Related Issues
Topic: macOS Metal Issue - App Crashes Immediately
Replies: 12
Views: 299

Re: macOS Metal Issue - App Crashes Immediately

WaddleDee72 wrote: Mon Mar 11, 2024 5:54 pm * thread #2, queue = 'CA::CG::Queue', stop reason = EXC_BAD_ACCESS (code=1, address=0x700003f8e822)
It's a little strange that the call stack contains nothing in your or wxWidgets code. Is there a call stack for any other threads?
by doublemax
Mon Mar 11, 2024 7:22 pm
Forum: C++ Development
Topic: Making win10 Magnifier with wxWidgets: is it feasible?
Replies: 5
Views: 210

Re: Making win10 Magnifier with wxWidgets: is it feasible?

What about the mouse event management? could it be done? Probably. But how very much depends on how the Magnifier API works - which i have no idea about. Assuming that the api handles displaying the zoomed content, it will probably make it click-through, too. In which case you don't have to do anyt...