Search found 1276 matches

by PB
Wed Sep 20, 2017 4:36 pm
Forum: C++ Development
Topic: wxDynamicLibrary Load used to work
Replies: 18
Views: 232

Re: wxDynamicLibrary Load used to work

I would still suggest to take the issue to the library vendor, starting with the library documentation though.
by PB
Wed Sep 20, 2017 5:26 am
Forum: C++ Development
Topic: Unexpected change of value of data transfer variable [SOLVED]
Replies: 24
Views: 314

Re: Unexpected change of value of data transfer variable [SOLVED]

You could try to reshuffle the code a bit. E.g., in the code you posted before, you pasted the string as "wxString", you could try changing it to "const wxString &". You can also try turning the optimization off only for that source file but I would rather try a new compiler,...
by PB
Tue Sep 19, 2017 8:04 pm
Forum: C++ Development
Topic: Unexpected change of value of data transfer variable [SOLVED]
Replies: 24
Views: 314

Re: Unexpected change of value of data transfer variable [SOLVED]

While compiler bugs do exist, it is still much more likely that the issue is in the user code. But if you believe that compiler optimizations are to blame, did you try to turn them off (/Od) or change them (e.g. /O1 vs /O2) in the project settings (C++/Optmization) to see if it changes anything?
by PB
Tue Sep 19, 2017 8:20 am
Forum: C++ Development
Topic: SpinCtrl->GetValue() makes the program crash
Replies: 5
Views: 64

Re: SpinCtrl->GetValue() makes the program crash

Hm, ok I can provide more information... maybe that helps: If I use the same code... SpinCtrl[3]->GetValue(); ...at the end of my dialog constructor (after the loops for creating all the elements) it works flawlessly. The program only crashes if I use the same code in the BitmapButton handler. So t...
by PB
Tue Sep 19, 2017 5:33 am
Forum: C++ Development
Topic: SpinCtrl->GetValue() makes the program crash
Replies: 5
Views: 64

Re: SpinCtrl->GetValue() makes the program crash

When a code crashes, you are expected to post a crash message as well as a stack backtrace. When the code crashes accessing a pointer, it is a good chance that the pointer in question is invalid. Or in your case, the index you are using to access the control in the SpinCtrl array is wrong... Sorry, ...
by PB
Mon Sep 18, 2017 3:30 pm
Forum: C++ Development
Topic: wxDynamicLibrary Load used to work
Replies: 18
Views: 232

Re: wxDynamicLibrary Load used to work

I wrote this code #include <wx/wx.h> #include <wx/dynlib.h> class MyApp : public wxApp { public: virtual bool OnInit() { wxDynamicLibrary dynLib; if ( dynLib.Load("edx5") ) wxLogMessage("DLL loaded successfully."); return false; } }; wxIMPLEMENT_APP(MyApp); and copied all 4 DLLs ...
by PB
Mon Sep 18, 2017 1:04 pm
Forum: C++ Development
Topic: wxDynamicLibrary Load used to work
Replies: 18
Views: 232

Re: wxDynamicLibrary Load used to work

What does the "$err,hr" tell immediatelly after the ::LoadLibrary() call in the wxDynamicLibrary code? I am not sure what you mean by that or how could check it? the crash occurs during LoadLibrary, so I cannot check something after it. $err is an MSVS pseudovariable: https://msdn.microso...
by PB
Mon Sep 18, 2017 12:12 pm
Forum: C++ Development
Topic: wxDynamicLibrary Load used to work
Replies: 18
Views: 232

Re: wxDynamicLibrary Load used to work

Hard to say without more information. What does the "$err,hr" tell immediatelly after the ::LoadLibrary() call in the wxDynamicLibrary code?

When a DLL fails to load, it is most often because it (or the libraries it depends on) cannot be found.
by PB
Fri Sep 15, 2017 4:26 pm
Forum: C++ Development
Topic: Unexpected change of value of data transfer variable [SOLVED]
Replies: 24
Views: 314

Re: Unexpected change of value of data transfer variable [SOLVED]

raananb wrote:I investigated further, and found an even stranger phenomenon:


Such things often happen when there's a memory corruption somewhere which means one ventured deep into the dreaded "undefined behaviour" territory...
by PB
Thu Sep 14, 2017 5:53 pm
Forum: C++ Development
Topic: Crash in wxZipInputStream [SOLVED]
Replies: 10
Views: 182

Re: Crash in wxZipInputStream [SOLVED]

Just for the future reference, the issue is fixed (in the master branch only so far): https://github.com/wxWidgets/wxWidgets/commit/e48676cf4a885b3cb7422d53e2aac391685e38ae
by PB
Thu Sep 14, 2017 11:09 am
Forum: C++ Development
Topic: SetBackground UnRef causing exception
Replies: 25
Views: 429

Re: SetBackground UnRef causing exception

GDI handles can also leak outside obvious painting code, e.g. allocating wxFont, wxBitmap, wxIcon etc. to pass it to a control....
by PB
Wed Sep 13, 2017 1:11 pm
Forum: C++ Development
Topic: Creating wxBitmapButtons dynamically and writing a function for each
Replies: 17
Views: 185

Re: Creating wxBitmapButtons dynamically and writing a function for each

Well I'm looking at it, but have to tell you that I don't know anything about pointers, I don't really know the concept behind these IDs and how they work and I have never used a vector or map. JFYI, therre no pointers involved in the ID mapping. Nevertheless, if you are using pointers (and you mus...
by PB
Wed Sep 13, 2017 12:47 pm
Forum: C++ Development
Topic: Creating wxBitmapButtons dynamically and writing a function for each
Replies: 17
Views: 185

Re: Creating wxBitmapButtons dynamically and writing a function for each

Yes, maybe you're missing something :D The fact, that I'm a beginner and I don't really understand all the context. That's why I'm happy about solutions that remain within the easier boundaries of C++ :oops: I am barely at the lower-intermediate level at C++ myself, but I believe that using basic C...
by PB
Wed Sep 13, 2017 12:19 pm
Forum: C++ Development
Topic: Creating wxBitmapButtons dynamically and writing a function for each
Replies: 17
Views: 185

Re: Creating wxBitmapButtons dynamically and writing a function for each

There is anoyther option: wxBitmapButton *button = new wxBitmapButton(Panel1, wxID_ANY, ... ); BitmapButton[Durchlauf_fortlaufend] = button; ID_BITMAPBUTTON[Durchlauf_fortlaufend] = button->GetId(); wxID_ANY will tell wxWidgets to autogenerate an ID and then with GetId() to retrieve the "real&...
by PB
Fri Sep 08, 2017 12:16 pm
Forum: C++ Development
Topic: Cursor not changing
Replies: 1
Views: 40

Re: Cursor not changing

As you did not post any code, it is hard to guess what you are doing wrong. I assume you use wxWindow::SetCursor() . The only hints I can give you is that after you create a wxCursor , check if it returns true from its IsOk() method. Be aware that at least on Windows, some stock cursors are availabl...

Go to advanced search