Search found 83 matches

by [email protected]
Wed Apr 14, 2021 7:37 am
Forum: The Code Dump
Topic: Simple wxSwitchCtrl class
Replies: 9
Views: 298

Re: Simple wxSwitchCtrl class

Can you add the code as attachment to the post? That would make it easier for people to download, and you would see how often it gets downloaded.
by [email protected]
Tue Apr 13, 2021 2:36 pm
Forum: C++ Development
Topic: wxSimplebook not showing loaded via XRC.
Replies: 6
Views: 96

Re: wxSimplebook not showing loaded via XRC.

There are not many things that can go wrong here, but i've never used XRC.

Try this: Set an explicit size and a distinctive background color (e.g. red) to the wxSimplebook
If it's not visible, check its coordinates and parent. Maybe it's outside the window area or covered by something else
by [email protected]
Tue Apr 13, 2021 1:27 pm
Forum: C++ Development
Topic: wxSimplebook not showing loaded via XRC.
Replies: 6
Views: 96

Re: wxSimplebook not showing loaded via XRC.

Code: Select all

<size>-1,145</size>
What happens if you set an explicit width here instead of -1?
by [email protected]
Tue Apr 13, 2021 12:11 pm
Forum: C++ Development
Topic: wxSimplebook not showing loaded via XRC.
Replies: 6
Views: 96

Re: wxSimplebook not showing loaded via XRC.

Does the panel look correctly when you don't use the wxSimplebook?

Code: Select all

m_myBook->AddPage(new wxPanel(m_myBook), "My Panel");
m_myBook->ChangeSelection(0);
Is this real code? Where is the part that loads the XRC and creates the controls?
by [email protected]
Tue Apr 13, 2021 6:57 am
Forum: Compiler / Linking / IDE Related
Topic: MSW: 3.1.2 + CMake3.19 install link errors (VS2015) (Edited: actually FindwxWidgets.cmake mostly)
Replies: 14
Views: 229

Re: MSW: 3.1.2 + CMake3.19 install link errors (VS2015)

I don't use Cmake, but i think it's very strange that it would rely on that registry entry. Because that would only exist, if you installed wxWidgets through the Windows installer (which i don't think many people do).

Isn't there an environment variable that CMake uses to find wxWidgets?
by [email protected]
Wed Mar 10, 2021 3:39 pm
Forum: C++ Development
Topic: wxDecodeChar returns invalid string iterator and crashes program
Replies: 11
Views: 486

Re: wxDecodeChar returns invalid string iterator and crashes program

Another test which should be quick to do:

Pass a literal string instead of character.age and check if it still crashes:

Code: Select all

buffer.InsertTextWithUndo(buffer.GetText().size(), "49", nullptr);
Alternatively with a wide string:

Code: Select all

buffer.InsertTextWithUndo(buffer.GetText().size(), wxT("49"), nullptr);
by [email protected]
Wed Mar 10, 2021 2:13 pm
Forum: C++ Development
Topic: wxDecodeChar returns invalid string iterator and crashes program
Replies: 11
Views: 486

Re: wxDecodeChar returns invalid string iterator and crashes program

Very strange. I have no idea what could go wrong if the index is 0 and the length is > 0.

Just out of curiosity. Could you rebuild the wxWidgets libs with wxUSE_STD_STRING=0 (default is 1) and check if it still crashes?
by [email protected]
Tue Mar 09, 2021 3:39 pm
Forum: C++ Development
Topic: Are events really queued?
Replies: 10
Views: 413

Re: Are events really queued?

Very strange. I can only suggest a totally different approach: Instead of sending events, add the updates to a wxMessageQueue. In a timer event pop the events from the queue and update your controls.
https://docs.wxwidgets.org/trunk/classw ... _01_4.html
by [email protected]
Tue Mar 09, 2021 3:20 pm
Forum: C++ Development
Topic: Are events really queued?
Replies: 10
Views: 413

Re: Are events really queued?

Are those event calls to frequent? No. 2 per second shouldn't be a problem. Can you add equivalent log output to the code where you send the event? 00000014 2.26007628 [15240] OnThreadUpdate 0 5 00000015 2.26015759 [15240] OnThreadUpdate done 00000016 2.71674156 [15240] OnThreadUpdate 2 6 00000017 ...
by [email protected]
Tue Mar 09, 2021 1:26 pm
Forum: C++ Development
Topic: Are events really queued?
Replies: 10
Views: 413

Re: Are events really queued?

Leo.1906 wrote:
Tue Mar 09, 2021 1:20 pm
I can't get any output from wxLogDebug.
I am using Visual Studio and the outpur does not apper in either VS or DebugView ...
That probably means that you're running a release build and not a debug.
by [email protected]
Tue Mar 09, 2021 12:58 pm
Forum: C++ Development
Topic: Are events really queued?
Replies: 10
Views: 413

Re: Are events really queued?

When I have multiple threads doing the exact same thing they reach their 1% steps at more or less the same time. This leads to events getting omitted because the OnThreadUpdate funcion hasn't finished ..? At least that's what I think. That shouldn't happen. Multithreaded problem are often hard to p...
by [email protected]
Tue Mar 09, 2021 9:20 am
Forum: Compiler / Linking / IDE Related
Topic: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001
Replies: 23
Views: 991

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

You definitely don't have to change anything in the solution file for wxWidgets. If you did make any changes, revert them, or just start from scratch.

Did you get the linker errors when building wxWidgets or when building your own project?
by [email protected]
Mon Mar 08, 2021 9:27 am
Forum: C++ Development
Topic: assert "cr" failed in wxPaintDCImpl(): using wxPaintDC without being in a native paint event
Replies: 7
Views: 356

Re: assert "cr" failed in wxPaintDCImpl(): using wxPaintDC without being in a native paint event

As the assert message says, you can only create a wxPaintDC in a paint event handler. Just call Refresh() if you want to update a window.