Search found 2020 matches

by PB
Wed Aug 14, 2019 8:25 am
Forum: C++ Development
Topic: Bind()/Connect() cause an SIGILL
Replies: 9
Views: 195

Re: Bind()/Connect() cause an SIGILL

Does someone have an idea what I have to change in the line so that I can keep the wxTextEntryDialog? I would not create the dialog in the constructor. I have no idea what you need the dialog for but modal dialogs are not commonly created on the heap and kept, they are usually created on the stack ...
by PB
Tue Aug 13, 2019 8:47 pm
Forum: Compiler / Linking / IDE Related
Topic: wxwidgets codeblocks wx.rc no such file or directory
Replies: 1
Views: 136

Re: wxwidgets codeblocks wx.rc no such file or directory

Did you add in your project's build options the wxWidgets inlude directory (either using a variable such as $(wx)\include or a hard-coded path such as C:\Users\gustx\Desktop\now\wxWidgets-3.1.2\include ) to Search directories / Resource compiler? cbres.png That should fix the wx.rc issue. No idea ab...
by PB
Tue Aug 13, 2019 6:44 pm
Forum: C++ Development
Topic: Bind()/Connect() cause an SIGILL
Replies: 9
Views: 195

Re: Bind()/Connect() cause an SIGILL

to check signature of a hook the tool must have full C++ parser(I highly doubt it has), and if tool is already sure about function, why it generates a type conversion??? at least that code looks strange. Imo. I do not use wxSmith but tools like that have no need for a C++ parser. I believe one just...
by PB
Tue Aug 13, 2019 6:27 pm
Forum: Compiler / Linking / IDE Related
Topic: How to switch between static and dynamic link?
Replies: 5
Views: 130

Re: How to switch between static and dynamic link?

wxWidgets MSVC solutions contain multiple configurations. Configurations named Debug and Release are static; configurations named DLL Debug and DLL Release use DLLs.
by PB
Tue Aug 13, 2019 4:41 pm
Forum: C++ Development
Topic: Bind()/Connect() cause an SIGILL
Replies: 9
Views: 195

Re: Bind()/Connect() cause an SIGILL

Connect()s can be dangerous. But in this case: The code is generated by a tool which should ensure the event handler has the correct signature. The code was said to crash even when using Bind(); Bind() should not allow binding a method with an incorrect signature. The code crashes only sometimes. Bu...
by PB
Tue Aug 13, 2019 3:27 pm
Forum: C++ Development
Topic: Bind()/Connect() cause an SIGILL
Replies: 9
Views: 195

Re: Bind()/Connect() cause an SIGILL

I'm only using the minimum of code. The code you posted could be reduced A LOT. Often, one will find the issue while gradually stripping down the code, when it starts to work once you the remove problematic part. The build is not the problem, it builds without any error. I was referring to whether ...
by PB
Tue Aug 13, 2019 2:02 pm
Forum: C++ Development
Topic: Bind()/Connect() cause an SIGILL
Replies: 9
Views: 195

Re: Bind()/Connect() cause an SIGILL

The code you posted looks OK to me (well, at least from "should not crash" viewpoint). So, assuming there is not something wrong with your build, the cause should be in the event handler. However, creating a modal dialog in the middle the ctor looks odd... What does the backtrace after the crash say...
by PB
Sun Aug 11, 2019 7:18 am
Forum: Compiler / Linking / IDE Related
Topic: Launching exe application (wxApp)causes command line window to also be created
Replies: 3
Views: 132

Re: Launching exe application (wxApp)causes command line window to also be created

Hard to say if you do not tell us how did you build your application.

If I had to guess, I would say you built your application with some flavor of MinGW but did not use the -mwindows to the linker parameters of your project.
by PB
Sat Aug 10, 2019 1:03 pm
Forum: Compiler / Linking / IDE Related
Topic: How to switch between static and dynamic link?
Replies: 5
Views: 130

Re: How to switch between static and dynamic link?

It depends on which configuration you are switching from/to. The basic differences are just two: If you are using the dynamic build, WXUSINGDLL must be defined in your application project in C/C++ / Preprocessor / Preprocessor Definitions. The dynamic libraries are in $(WXWIN)/lib/vc_ dll while the ...
by PB
Thu Aug 08, 2019 9:42 pm
Forum: Compiler / Linking / IDE Related
Topic: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error
Replies: 9
Views: 1961

Re: MinGW-Builds 8.1.0 and WxWidgets 3.1.1 compile error

In addition to scanning %PATH%, you can also use the where command in the console, e.g.

Code: Select all

where gcc.exe
Also, what is this path from your error listing?

Code: Select all

C:/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler/ 
by PB
Thu Aug 08, 2019 9:05 am
Forum: Compiler / Linking / IDE Related
Topic: error rc2135, problem with VC resource file
Replies: 4
Views: 1804

Re: error rc2135, problem with VC resource file

Those "extra bytes" is probably UTF-8 Byte Order Mark (BOM).

Assuming the file does not contain any Unicode or Code Page specific characters; you can just open the resource file in Notepad, from the menu select "Save As" and in the save dialog set "Encoding" to "ANSI".
by PB
Wed Aug 07, 2019 5:12 pm
Forum: C++ Development
Topic: Changing Background Colour of a wxListView Item
Replies: 3
Views: 82

Re: Changing Background Colour of a wxListView Item

The documentation says that this function only works in report view mode (wxLC_REPORT). You create the list control with wxLC_LIST.
by PB
Tue Aug 06, 2019 8:07 am
Forum: Open Discussion
Topic: Should I use a cross-platform GUI-toolkit or rely on the native ones?
Replies: 1
Views: 385

Re: Should I use a cross-platform GUI-toolkit or rely on the native ones?

wxWidgets use native GUI. AFAIK, (at least on MSW) Qt and GTK use their own controls but while Qt tries hard to look native , GTK does not even try. OTOH, a multiplatform toolkit using native GUI on each platform can have its limitations stemming from the limitations of the native platform controls....
by PB
Mon Aug 05, 2019 4:47 pm
Forum: C++ Development
Topic: Set Icon
Replies: 6
Views: 187

Re: Set Icon

BTW, if you actually have an icon with multiple sizes of the image (16x16, 32x32,...), I would as always recommend using SetIcons() instead of SetIcon().
by PB
Fri Aug 02, 2019 8:28 pm
Forum: C++ Development
Topic: WxPaintHandler
Replies: 7
Views: 130

Re: WxPaintHandler

In addition to what doublemax said, you could consider storing all the information and drawing it in the wxPaintEvent handler. Bitmap may not be ideal if the window can be resized.

FWIW, the simple code here draws lines created with the mouse
viewtopic.php?t=44596#p184274