Search found 327 matches

by New Pagodi
Tue Mar 24, 2020 3:17 am
Forum: C++ Development
Topic: Difficulty with Bind and Events
Replies: 2
Views: 64

Re: Difficulty with Bind and Events

You usually call Bind on the object generating the event you want to handle. Since the frame is the object generating the size event, you should call

Code: Select all

FrmMain->Bind(wxEVT_SIZE, &MyProgram::OnSize, this);
by New Pagodi
Thu Feb 20, 2020 8:58 pm
Forum: Compiler / Linking / IDE Related
Topic: Adding my own C++ headers from other project
Replies: 3
Views: 151

Re: Adding my own C++ headers from other project

I'm not sure what your asking, but here's an very simple example of how you can use the same code file in 2 projects with codeblocks. I created a console application and a wxWidgets application in the same folder. Then I used the new file wizard to create a c++ header and a c++ file named class.h an...
by New Pagodi
Wed Feb 12, 2020 6:14 am
Forum: C++ Development
Topic: Intercept wxLogError calls
Replies: 7
Views: 200

Re: Intercept wxLogError calls

It sounds like you should be using libtiff directly instead of wxWidgets wrapper for it.
by New Pagodi
Sat Feb 01, 2020 7:07 pm
Forum: General Development
Topic: Inquire, to make my library support MacOS
Replies: 4
Views: 247

Re: Inquire, to make my library support MacOS

The development tools supplied by apple use the clang compiler. It is capable of compiling c,c++, objective c, and maybe others as well. You only need to use objective c if you want to work directly with the system libraries. As far as gui programming does, on macOS, wxWidgets is basically a c++ wra...
by New Pagodi
Thu Jan 30, 2020 7:39 pm
Forum: C++ Development
Topic: calculate screen pos -> pos on rotated wxBitmap
Replies: 2
Views: 96

Re: calculate screen pos -> pos on rotated wxBitmap

To rotate an image by angle α about a point P(x0,y0), you translate by (-x0,-y0) perform the rotation translate back by (x0,y0) So if you have an image that has already been rotated about a point and you want to get the original point, you just undo those operations: translate by (-x0,-y0) [this und...
by New Pagodi
Sun Jan 26, 2020 7:58 pm
Forum: Compiler / Linking / IDE Related
Topic: fatal error: wx/setup.h: No such file or directory
Replies: 5
Views: 267

Re: fatal error: wx/setup.h: No such file or directory

You need to match the wizard's options to the settings you specified when building the library. Since you said you used the build command mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 BUILD=release UNICODE=1 make sure "Use wxWidgets dll" and "Enable Unicode" are checked and the option about a ...
by New Pagodi
Sun Jan 26, 2020 7:03 pm
Forum: Compiler / Linking / IDE Related
Topic: fatal error: wx/setup.h: No such file or directory
Replies: 5
Views: 267

Re: fatal error: wx/setup.h: No such file or directory

If you're using codeblocks, just use the wizard to create a new wxwidgets project. The wizard will configure all of the include/lib folders for you. You don't need to make any changes to your system's environment variables to use it.
by New Pagodi
Mon Jan 20, 2020 12:09 am
Forum: C++ Development
Topic: WarpPointer question
Replies: 8
Views: 337

Re: WarpPointer question

I agree that it is not good practice to move the mouse pointer programmatically... However, I want the behavior of using the wheel to zoom (in/out) with the position of the cursor determining which part of the image/diagram should be shown in the center of the window. So if I want the see the upper...
by New Pagodi
Wed Jan 15, 2020 10:57 pm
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 245

Re: How to use wxDCOverlay?

If you want to draw with transparency with wxGraphicsContext while caching the result in a bitmap, I would try adding a function like this: void CAnalysisPanel::BuildPlot(int width, int height) { wxImage img(width,height); // Create an alpha channel and set all pixels transparent. img.InitAlpha(); m...
by New Pagodi
Wed Jan 15, 2020 11:06 am
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 245

Re: How to use wxDCOverlay?

New Pagodi: yes, this seems the classical approach and I probably stay with it, it also allows me to cache separate bitmap for more plots and then just compose them when needed. Although the usage seems much more complicated, e.g. how to plot the lines into the transparent wxMemoryDC so I can compo...
by New Pagodi
Tue Jan 14, 2020 2:21 pm
Forum: C++ Development
Topic: How to use wxDCOverlay?
Replies: 7
Views: 245

Re: How to use wxDCOverlay?

I think a better approach would be to cache the plots into a bitmap. The paint handler would first draw the bitmap and then draw any extra lines over the bitmap. To generate the cached bitmap of the plot, you can use wxMemoryDC.
by New Pagodi
Sun Jan 05, 2020 6:47 pm
Forum: C++ Development
Topic: Larger then 69 wxTextCtrl font size?
Replies: 3
Views: 146

Re: Larger then 69 wxTextCtrl font size?

I believe the problem is due to this issue. According to the ticket, the workaround is to call SetPointSize after creating the font.
by New Pagodi
Sat Jan 04, 2020 4:45 pm
Forum: Compiler / Linking / IDE Related
Topic: Using wxWidgets with Visual Studio Build Tools (2019)
Replies: 2
Views: 178

Re: Using wxWidgets with Visual Studio Build Tools (2019)

My gut feeling is that in order to debug a program that has used the Visual Studio Build Tools compiler (cl.exe), one requires the Visual Studio Debugger, and that no matter how hard I try, gdb won't understand the debugging symbols,etc produced. However as the VS debugger is only available in Visu...
by New Pagodi
Sat Dec 28, 2019 5:45 pm
Forum: C++ Development
Topic: wxStyledTextCtrl search vs Scintilla
Replies: 2
Views: 148

Re: wxStyledTextCtrl search vs Scintilla

If you call

Code: Select all

SetSearchFlags(wxSTC_FIND_MATCHCASE)
subsequent search operations will be case sensitive.
by New Pagodi
Wed Nov 27, 2019 12:47 am
Forum: General Development
Topic: draw rectangle over video
Replies: 4
Views: 329

Re: draw rectangle over video

I agree with doublemax. I think libvlc is your best (and maybe only) possibility.