Search found 2923 matches

by PB
Sun Apr 11, 2021 9:10 am
Forum: C++ Development
Topic: Stationary background with wxScrolled
Replies: 2
Views: 27

Re: Stationary background with wxScrolled

Is m_patchNotesWindow a wxScrolled? I thought that when drawing with wxScrolled, you should follow this: You have the option of handling the OnPaint handler or overriding the wxScrolled::OnDraw() function, which is passed a pre-scrolled device context (prepared by wxScrolled::DoPrepareDC()). If you ...
by PB
Sat Apr 10, 2021 6:10 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

The error looks like the one when wxLogError() was prefixed with "::". The build command line looks odd to me (is all the stuff included really needed) but I don't really see how build options could affect this. Assuming you are actually using the trunk version but if you were not, you would get mor...
by PB
Sat Apr 10, 2021 4:52 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

I do not see anything wrong with that line. What error do you get?

As I wrote, the trunk compiled for me both with MSVC and GCC out of the box. Is your wxWidgets installation alright? I did not understand the purpose of you attaching wxLog header in one of your previous posts, did you modify it?
by PB
Sat Apr 10, 2021 2:54 pm
Forum: C++ Development
Topic: Capture mouse events from childwindows
Replies: 5
Views: 89

Re: Capture mouse events from childwindows

I can't say I understand what are you trying to do but FWIW, binding events from all child windows is pretty easy.

For example, see BindEnterAndLeaveWindow() method here: viewtopic.php?f=1&t=44771#p185127
by PB
Sat Apr 10, 2021 2:52 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

For the third time: Do not use the obsolete 0.1.2 version, use the trunk version of wxMatPlot from SourceForge I linked before. No changes are needed there. As for those wxLogError()s, I obviously meant to remove the "::" in front of "wxLogError" in mathplot.cpp but once again, this is a moot point,...
by PB
Fri Apr 09, 2021 8:20 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

I meant changing the variable type from int to wxBitmapType for type in the definition and declaration of mpWindow::SaveScreenshot(). MP1 sample also needs the same for fileType in MyFrame::OnSaveScreenshot(). Also one needs to remove "::" prefixing wxLogError() calls, in wxWidgets 3.0+ wxLog*() are...
by PB
Fri Apr 09, 2021 6:57 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

Please take a look at the edit in my previous post describing how I made v0.1.2 from SourceForge build with wxWidgets 3.1.5 in about two minutes. Those errors you get are for the issues I fixed. Actually, don't. I have just tried building the trunk version from SourceForge and it builds out of the b...
by PB
Fri Apr 09, 2021 6:30 pm
Forum: C++ Development
Topic: Using Matplotlib with wxWidgets C++
Replies: 20
Views: 403

Re: Using Matplotlib with wxWidgets C++

(I know nothing about wxMathPlot) What exactly is the issue with wxMathPlot and recent wxWidgets versions? I have just tried to find the version on GitHub with most recent commit, ended with this: https://github.com/mkarmona/wxMathPlot I could build the library as well as build and run samples just ...
by PB
Fri Apr 09, 2021 3:48 pm
Forum: C++ Development
Topic: How do I know which event type to use?
Replies: 2
Views: 45

Re: How do I know which event type to use?

You know you are interested in an event generated by a wxTextCtrl, so you go to its docs: https://docs.wxwidgets.org/trunk/classwx_text_ctrl.html There is a section named "Events emitted by this class" and looking at the four events listed, it is pretty clear that wxEVT_TEXT is the one. If you searc...
by PB
Thu Apr 08, 2021 10:18 am
Forum: Platform Related Issues
Topic: Load resources such as images and icons in my .dll project
Replies: 10
Views: 183

Re: Load resources such as images and icons in my .dll project

One more thing is there any link or wiki source to adding resources to visual studio project when making a .dll I do not think that the procedure is different from doing that for an executable: Do you have a reason to believe otherwise? Moreover, adding the resources is not an issue here, is it? Yo...
by PB
Thu Apr 08, 2021 6:18 am
Forum: Platform Related Issues
Topic: Load resources such as images and icons in my .dll project
Replies: 10
Views: 183

Re: Load resources such as images and icons in my .dll project

If it is what I suspect (i.e., wrong HINSTANCE used), the only workarounds when using Windows resources are those two I mentioned before. Of course, one still use Win32 API directly, using the DLL's HINSTANCE. I would ask in the wx-users what is the optimal solution, as it seems this scenario should...
by PB
Wed Apr 07, 2021 12:50 pm
Forum: Platform Related Issues
Topic: Load resources such as images and icons in my .dll project
Replies: 10
Views: 183

Re: Load resources such as images and icons in my .dll project

1. Are the resources in the DLL? You should be able to include them in the same way you do for an executable. 2. Assuming they are there, AFAICT, loading an icon from uses wxGetInstance(): https://github.com/wxWidgets/wxWidgets/blob/master/src/msw/gdiimage.cpp#L534 Perhaps the instance returned by w...
by PB
Mon Apr 05, 2021 8:14 am
Forum: Compiler / Linking / IDE Related
Topic: Setup.h is not found (VS2019)
Replies: 1
Views: 118

Re: Setup.h is not found (VS2019)

Assuming you are trying to build your application and now wxWidgets itself? Is the file there, in other words did you build wxWidgets successfully in 64-bit static debug configuration? How did you set up your project? There are at least three ways to do that with MSVS but basically: did you set the ...
by PB
Fri Apr 02, 2021 2:07 pm
Forum: C++ Development
Topic: wxListview header obscures first row when using wxNotebook
Replies: 12
Views: 452

Re: wxListview header obscures first row when using wxNotebook

I know nothing about Linux but I cannot reproduce the issue even when setting the listview size to (1024,900) on Ubuntu 20.04 under VirtualBox with wxWidgets 3.1.4 built for GTK3 (3.24.20): gtk-notebook-listview.png even when I also get those gtk_box_gadget_distribute asserts. Are you building for G...
by PB
Wed Mar 31, 2021 3:28 pm
Forum: C++ Development
Topic: Some questions about wxStopWatch
Replies: 4
Views: 207

Re: Some questions about wxStopWatch

You need to ask the developers in the wx-users mailing list.

But they may suggest to use the C++11 chrono instead. wxStopWatch may be one of those classes introduced back when the GUI libraries tried (and often had to) be an all-purpose Swiss army knife.