Search found 39 matches
- Sat Aug 17, 2013 6:01 am
- Forum: C++ Development
- Topic: wxTextCtrl, multiple threads, and cout redirection?
- Replies: 4
- Views: 3723
Re: wxTextCtrl, multiple threads, and cout redirection?
What I ended up doing was writing a simple wrapper class for std::cout. In the generic version the 'write' function calls std::cout. This is what the library uses by default. In the front end, I inherit from the wrapper class, and override the write function to just post an event to the main wxWidge...
- Fri Aug 16, 2013 4:07 am
- Forum: C++ Development
- Topic: wxTextCtrl, multiple threads, and cout redirection?
- Replies: 4
- Views: 3723
Re: wxTextCtrl, multiple threads, and cout redirection?
Printing to a console (or wxTextCtrl) is already very slow, writing to/reading from a file would not be fast enough. While I appreciate the suggestion, I do not think it is a viable solution to my problem. I had an idea, but do not quite know how to implement it (or if its even doable) and it seems ...
- Fri Aug 16, 2013 1:38 am
- Forum: C++ Development
- Topic: wxTextCtrl, multiple threads, and cout redirection?
- Replies: 4
- Views: 3723
wxTextCtrl, multiple threads, and cout redirection?
I have a library which has functions that print to std::cout. The library itself does not utilize wxWidgets only the "front end" that I am writing for it does. I wish to redirect the std::out in the library calls to a wxTextCtrl, however, the library functions are called in a separate wxTh...
- Sat Sep 27, 2008 4:27 am
- Forum: C++ Development
- Topic: Minimal Object for 'Connect()' ?
- Replies: 4
- Views: 1479
- Sat Sep 27, 2008 3:36 am
- Forum: C++ Development
- Topic: Minimal Object for 'Connect()' ?
- Replies: 4
- Views: 1479
I had pretty much figured that was the case, however I am still not used to the wxWidgets way of thinking and it would take a good deal of trial and error on my part to arrive at the proper solution. As much as I dont mind 'getting my hands dirty' and working it out for myself, if anyone could provi...
- Sat Sep 27, 2008 2:37 am
- Forum: C++ Development
- Topic: Minimal Object for 'Connect()' ?
- Replies: 4
- Views: 1479
Minimal Object for 'Connect()' ?
Here is the situation. I am creating a widget "on the fly" and trying to use 'Connect()' to process the standard events. My code is as follows: void OnClickOnMeClick( wxCommandEvent& event ) { printf("YO!\n\r"); } // code snippet that is in question: wxMenuItem* menu_entry = ...
- Fri Sep 26, 2008 7:26 am
- Forum: C++ Development
- Topic: MSW any function called from a DLL crashes hard...
- Replies: 10
- Views: 2735
- Fri Sep 26, 2008 1:38 am
- Forum: C++ Development
- Topic: MSW any function called from a DLL crashes hard...
- Replies: 10
- Views: 2735
- Fri Sep 26, 2008 12:42 am
- Forum: C++ Development
- Topic: MSW any function called from a DLL crashes hard...
- Replies: 10
- Views: 2735
Then you need to pass only the main frame pointer. It is perfectly fine. You don't need an application pointer there... The wxApp pointer can provide the main frame pointer, and its just as easy for me to pass one as the other. What error message did you get when you link dynamically? Mostly undefi...
- Thu Sep 25, 2008 9:59 pm
- Forum: C++ Development
- Topic: MSW any function called from a DLL crashes hard...
- Replies: 10
- Views: 2735
Also you don't need to pass an application object to the DLL. I dont think you quite understand what it is I am doing, or trying to acomplish. Without the wxApp pointer, I cannot manipulate the existing applications GUI through the library. For example the following (the_app is my wxApp pointer): (...
- Thu Sep 25, 2008 1:46 pm
- Forum: C++ Development
- Topic: MSW any function called from a DLL crashes hard...
- Replies: 10
- Views: 2735
MSW any function called from a DLL crashes hard...
My wxWidgets based executable calls an example library I have written. It passes the wxApp pointer (though unused in the example), and calls a function which does nothing but display a "hello world" wxMessageBox. The library is not a stand alone application in dll form, it is a minor exten...
- Mon Sep 22, 2008 10:22 am
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling an example lib that uses wxWidgets?
- Replies: 2
- Views: 990
- Sun Sep 21, 2008 8:41 pm
- Forum: Compiler / Linking / IDE Related
- Topic: Compiling an example lib that uses wxWidgets?
- Replies: 2
- Views: 990
Compiling an example lib that uses wxWidgets?
I have the following basic example code which uses wxWidgets but must be compiled into a dynamic lib. #include "wx/wx.h" #include <wx/textdlg.h> void Test() { wxGetTextFromUser(_("Hi"),_("Hey"),_("Yo")); } Normally I compile libs using a single line command li...
- Tue Sep 09, 2008 7:55 pm
- Forum: C++ Development
- Topic: SetSize() doesnt work. Am I missing something?
- Replies: 6
- Views: 2136
Thank you thats exactly what I needed. I logically thought (like other toolkits I have used, even with sizers...) that a command called SetSize() would actually change the size of the widget, if not what is the goal of the SetSize() function? It would be helpful if the documentation on the SetSize()...
- Tue Sep 09, 2008 5:59 pm
- Forum: C++ Development
- Topic: SetSize() doesnt work. Am I missing something?
- Replies: 6
- Views: 2136
I am using a vertical sizer I have tried SetSize(wxSize(Width_I_Want,-1)) and many other variations like SetSize(wxDefaultCoord,wxDefaultCoord,Width_I_Want,-1), etc... The SetSize command itself works on widgets inside of a wxPanel, where I have complete manual control over everything, but when plac...