Search found 442 matches

by jfouche
Wed Feb 16, 2011 12:04 pm
Forum: C++ Development
Topic: showModal, but click on wxDC in main window
Replies: 5
Views: 1046

Use Show instead of ShowModal.
by jfouche
Mon Jan 31, 2011 8:17 am
Forum: C++ Development
Topic: Delegate task to another thread - Help
Replies: 19
Views: 2673

If you post this event from the thread A to the main thread, there will be a copy of the resultset class. If you copy it, the sqlite statement will be available in the new class (eg : in the event). The resultset will be empty in the thread A : you can't use it anymore. wxThreadEvent e(...); e.Setpa...
by jfouche
Sat Jan 29, 2011 12:44 pm
Forum: C++ Development
Topic: Delegate task to another thread - Help
Replies: 19
Views: 2673

I'm interested in this function void wxThreadEvent::SetPayload ( const T & payload ) [inline] Sets custom data payload. The payload argument may be of any type that wxAny can handle (i.e. pretty much anything). Note that T's copy constructor must be thread-safe, i.e. create a copy that doesn't shar...
by jfouche
Sat Jan 29, 2011 9:16 am
Forum: C++ Development
Topic: Delegate task to another thread - Help
Replies: 19
Views: 2673

IIRC, wxThreadEvent is usefull for what you want (it deep copy the string).[/url]
by jfouche
Mon Jan 24, 2011 9:28 am
Forum: C++ Development
Topic: DeleteProperty on wxPropertyGrid (RIGHT CLICKED EVT) problem
Replies: 1
Views: 519

Hi It looks like this bug . May be you're using an old version of wxPropGrid, or the bug is not fully fixed for right_click event. Try to post a custom event to remove the property out of the right click handler (I think the pb comes from the fact the property is used after OnPropertyGridItemRightCl...
by jfouche
Fri Jan 21, 2011 8:41 am
Forum: C++ Development
Topic: Margins on wxHtmlEasyPrinting
Replies: 1
Views: 500

See wxHtmlEasyPrinting::GetPageSetupData and wxPageSetupDialogData::SetMarginXXXXX
by jfouche
Wed Dec 29, 2010 10:23 am
Forum: C++ Development
Topic: Plugin oriented App
Replies: 62
Views: 14334

Hello There are 2 great wx macros : WXEXPORT and WXIMPORT. Have a look to this wiki . This works for Windows, MAC and Linux. But, for a simple function export, I do the following : #ifdef _WIN32 #define EXPORT __declspec(dllexport) #else #define EXPORT #endif extern "C" EXPORT IPlugin* GetPlugin(IMa...
by jfouche
Thu Dec 23, 2010 10:08 am
Forum: C++ Development
Topic: Connect() bug, Isn't activation function
Replies: 4
Views: 817

Hi What does the line Connect(createid, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(MainFrame::CreatePart),NULL,create); mean ? You connect the event BUTTON_CLICKED of the createid control ID on the MainFrame::CreatePart method, without data, on the create control handler. That's wrong becau...
by jfouche
Wed Dec 22, 2010 1:53 pm
Forum: C++ Development
Topic: Drag&Drop : display small box during drag
Replies: 3
Views: 766

wxDropSource::SetCursor may be your friend. I'll give a try and give you feedback
by jfouche
Sun Dec 19, 2010 9:22 pm
Forum: C++ Development
Topic: pure virtual method called
Replies: 6
Views: 1334

It may comes from the fact that both wxSocketClient and wxEvtHandler inherit from wxObject (see diamond inheritance ). I allways try to avoid this. The solution I use when I face this is to create a abstract class that contains one of the parent class. For example : class IListener { wxEvtHandler m_...
by jfouche
Sun Dec 19, 2010 10:54 am
Forum: C++ Development
Topic: Display wxYES_NO in English regardless of OS language
Replies: 5
Views: 997

Hi, This is probably due to the fact you don't have this locale installed on Windows. As wxWidgets is based on the Win32 API, it will show you the message box according to the locale which has been set. By default, this is the OS locale, but it can be overridden by the SetThreadLocale function (this...
by jfouche
Thu Dec 16, 2010 10:27 am
Forum: C++ Development
Topic: Display wxYES_NO in English regardless of OS language
Replies: 5
Views: 997

You'll have to create your own message box function. Or you can force the local to english (have a look to wxLocale) : class MyApp : public wxApp { wxLocale m_locale; ... }; bool MyApp::OnInit() { m_locale.Init(wxLANGUAGE_ENGLISH_US, wxLOCALE_CONV_ENCODING); #ifdef __LINUX__ { wxLogNull noLog; m_loc...
by jfouche
Thu Dec 16, 2010 8:24 am
Forum: C++ Development
Topic: wxPropertyGrid and SetPropertyHelpString
Replies: 6
Views: 908

Remove the toolbar...
If you have only one page, you won't have any problems. I personnaly use :

Code: Select all

m_pgmParams = new wxPropertyGridManager(m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPGMAN_DEFAULT_STYLE|wxPG_BOLD_MODIFIED|wxPG_DESCRIPTION|wxPG_TOOLTIPS|wxTAB_TRAVERSAL);
by jfouche
Wed Dec 15, 2010 12:04 pm
Forum: C++ Development
Topic: wxPropertyGrid and SetPropertyHelpString
Replies: 6
Views: 908

There is no way to do it directly in wxPropertyGrid. But you can do it by hand, handling the wxEVT_PG_CHANGED event, to show the help string in your custom control : Window::Window(...) { ... // Create your custom help control m_myCustomHelpControl = new ...(this, ...); propGrid->Connect(wxEVT_PG_CH...
by jfouche
Tue Dec 14, 2010 8:23 am
Forum: The Code Dump
Topic: wxIpCtrl
Replies: 0
Views: 3006

wxIpCtrl

Here is a class that allow to edit an IP V4 adress : wxipctrl.h #ifndef WXIPCTRL_H_INCLUDED #define WXIPCTRL_H_INCLUDED #include <wx/wx.h> DECLARE_EVENT_TYPE(wxEVT_IPCTRL_CHANGED, wxID_ANY); // wxIpCtrl styles #define wxIPCTRL_D_CLASS 1 #define wxIPCTRL_ALL_CLASSES 2 #define wxIPCTRL_SUBNET_MASK wxI...