Search found 11570 matches

by doublemax
Tue Jan 16, 2018 8:18 pm
Forum: C++ Development
Topic: Force wxImage::Rotate to produce white background
Replies: 4
Views: 26

Re: Force wxImage::Rotate to produce white background

I don't think the interpolating parameter is relevant here. If the image is rotated, the target image is bigger than the original one, and the empty corners need to be filled with something. By default this is black and the mask color is the only way to change this.
by doublemax
Tue Jan 16, 2018 6:41 pm
Forum: C++ Development
Topic: How to catch a wxHtmlLinkEvent from wxHtmlHelpController?
Replies: 5
Views: 47

Re: How to catch a wxHtmlLinkEvent from wxHtmlHelpController?

I think the help window will only be created on demand, i suspect that "help->GetHelpWindow()" will return NULL at this point.

I think there really is no easy way to do this.
by doublemax
Tue Jan 16, 2018 5:28 pm
Forum: C++ Development
Topic: Force wxImage::Rotate to produce white background
Replies: 4
Views: 26

Re: Force wxImage::Rotate to produce white background

Use SetMaskColor( 255,255,255 ) before rotating and SetMask(false) before saving and you should get the correct result. Tested with this: ::wxInitAllImageHandlers(); const double halfC = M_PI / 180; wxImage img("d:\\_test.jpg", wxBITMAP_TYPE_JPEG ); img.SetMaskColour(255,255,255); wxImage ...
by doublemax
Tue Jan 16, 2018 6:49 am
Forum: C++ Development
Topic: set user data for ribbonbuttonbar event
Replies: 3
Views: 33

Re: set user data for ribbonbuttonbar event

The documentation for userData says: userData Optional data to be associated with the event table entry. wxWidgets will take ownership of this pointer, i.e. it will be destroyed when the event handler is disconnected or at the program termination. This pointer can be retrieved using wxEvent::GetEven...
by doublemax
Thu Jan 11, 2018 4:12 pm
Forum: C++ Development
Topic: while in wxwidgets
Replies: 2
Views: 64

Re: while in wxwidgets

The quick-and-dirty solution is to call ::wxYield() inside the while loop once in a while so that the event loop gets the opportunity to do its job and e.g. redraw controls. A better solution is to move the calculations into a worker thread (-> wxThread). But you're not allowed to make GUI updates f...
by doublemax
Tue Jan 09, 2018 6:29 am
Forum: C++ Development
Topic: wxFileConfig::DeleteGroup() Not Working
Replies: 2
Views: 57

Re: wxFileConfig::DeleteGroup() Not Working

I haven't tried the code, but i guess it should look like this:

Code: Select all

File->SetPath( "/Q/bjt/" );
result = File->DeleteGroup( "Textbook" );


Alternatively, try using an absolute path:

Code: Select all

result = File->DeleteGroup( "/Q/bjt/Textbook" );
by doublemax
Sun Jan 07, 2018 1:49 pm
Forum: Compiler / Linking / IDE Related
Topic: fatal error: wx/setup.h: No such file [SOLVED]
Replies: 6
Views: 30260

Re: fatal error: wx/setup.h: No such file [SOLVED]

Hello Im new in this but for me the solution was to replace the instruction #include "wx/setup.h" by this other #include "wx/msw/setup.h" in the platform.h file because I did install the 3.1.0 version of wxWidgets and the setup.h file need by the gcc compiler (MinGW) was in this...
by doublemax
Sat Jan 06, 2018 10:41 am
Forum: wxCode
Topic: wxPDFView folder/file not exists
Replies: 4
Views: 99

Re: wxPDFView folder/file not exists

Sorry, you're right. The last changes in wxPDFView were made 2 years ago, i guess pdfium changed its directory structure since. Try changing the include command so that it matches the new file location.
by doublemax
Fri Jan 05, 2018 11:35 pm
Forum: wxCode
Topic: wxPDFView folder/file not exists
Replies: 4
Views: 99

Re: wxPDFView folder/file not exists

fpdf_doc.h there is only in ./pdfium/public/ dir.
That's correct, the file will be included from there. Did you set all include paths correctly?
by doublemax
Thu Jan 04, 2018 9:00 am
Forum: Compiler / Linking / IDE Related
Topic: cannot compile wxWidgets in windows with MingW
Replies: 9
Views: 139

Re: cannot compile wxWidgets in windows with MingW

The real reason for the missing characters is still a mystery, but it's related to the MONOLITHIC option: https://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW#To_fix_issues_when_compiling_static_library_with_MONOLITHIC_option Instead of the workaround in the wiki article, i'd suggest to not use...
by doublemax
Wed Jan 03, 2018 3:03 pm
Forum: C++ Development
Topic: How to make an event execute immediately ? [SOLVED]
Replies: 7
Views: 107

Re: How to make an event execute immediately ? [SOLVED]

Showing some code would have been helpful.

Without knowing more about the "bigger picture", try this:

Code: Select all

getList0()->InsertItem(...)
getList0()->Refresh();    // request redraw
::wxYield();                  // trigger processing events
by doublemax
Mon Jan 01, 2018 7:00 pm
Forum: C++ Development
Topic: How to show parent object.
Replies: 4
Views: 91

Re: How to show parent object.

From a code structure point of view i'd say that the code to hide and show the dialog should not be in wxImagePanel. It should be either in the wxFrame destructor, or even one level higher, in the code that creates the wxFrame. It's not totally clear what you're trying to do, but it sounds like you ...
by doublemax
Fri Dec 29, 2017 12:07 am
Forum: C++ Development
Topic: How to get EVT_TEXT_ENTER in wxNotebookPage [SOLVED]
Replies: 3
Views: 185

Re: How to get EVT_TEXT_ENTER in wxNotebookPage [SOLVED]

wxTE_PROCESS_ENTER is not an "extra" style. Add it to the "flags" parameter of the constructor:

Code: Select all

textcontrol = new wxTextCtrl(page, wxID_Page, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
by doublemax
Thu Dec 28, 2017 2:56 pm
Forum: C++ Development
Topic: How to get EVT_TEXT_ENTER in wxNotebookPage [SOLVED]
Replies: 3
Views: 185

Re: How to get EVT_TEXT_ENTER in wxNotebookPage [SOLVED]

You need to add the wxTE_PROCESS_ENTER style flag when creating the wxTextCtrl.
by doublemax
Thu Dec 28, 2017 9:03 am
Forum: wxCode
Topic: wxPdfDocument linking problem [SOLVED]
Replies: 2
Views: 88

Re: wxPdfDocument linking problem [SOLVED]

Code: Select all

wxbase31u.lib
That's one of the libraries you'd get in a non-monolithic build of wxWidgets. If wxPdfDocument doesn't support that (which i don't know), then just remove the individual library files from the linker settings and add the name of your monolithic library file.

Go to advanced search