Search found 2925 matches

by PB
Mon Apr 12, 2021 5:54 am
Forum: C++ Development
Topic: Stationary background with wxScrolled
Replies: 5
Views: 95

Re: Stationary background with wxScrolled

AmadeusK525 wrote:
Sun Apr 11, 2021 11:38 pm
Turns out calling EnableScrolling(false, false) got rid of the issue. What problems were you having with it?
As I wrote above, updating position of controls.
by PB
Sun Apr 11, 2021 10:33 am
Forum: C++ Development
Topic: Stationary background with wxScrolled
Replies: 5
Views: 95

Re: Stationary background with wxScrolled

When looking into the topic, on Windows I encountered something I think may be a bug (Windows 10, wxWidgets master)? The code draws a logo in the top left corner, which is not scrolled with the controls. When I do not call EnableScrolling(false, false), there are drawing artifacts. This is expected ...
by PB
Sun Apr 11, 2021 9:10 am
Forum: C++ Development
Topic: Stationary background with wxScrolled
Replies: 5
Views: 95

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: 421

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: 421

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: 98

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: 421

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: 421

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: 421

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: 421

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: 51

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: 199

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: 199

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: 199

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: 135

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 ...