Search found 147 matches

by lvdlinden
Wed Oct 07, 2009 11:23 am
Forum: C++ Development
Topic: wxGTK - tray icon transparency on KDE4
Replies: 3
Views: 816

I guess you have to try to find out. You can add your findings to the issue in trac (I fixed the link), so the issue can either be closed, or one the wxWidgets developers can pick it up again.
by lvdlinden
Wed Oct 07, 2009 9:39 am
Forum: C++ Development
Topic: wxGTK - tray icon transparency on KDE4
Replies: 3
Views: 816

I have tried this on KDE4 (Kubuntu/wxWidgets 2.8.9) as well and the background turns out to be white on my machine. It seems to be a known defect in wxWidgets. There is an issue for it at http://trac.wxwidgets.org/ticket/4810 . It is stated there that it could be fixed in wxWidgets 2.9.0. EDIT: fixe...
by lvdlinden
Tue Oct 06, 2009 7:57 am
Forum: C++ Development
Topic: wxXML question.
Replies: 26
Views: 3432

Although the manual specifically states how to manage the objects passed in and out, the pointer juggling is indeed unnecessarily hard. The library writes could have made more of an effort to take memory management out of the hands of the library user. You could consider a different library that is ...
by lvdlinden
Tue Jun 02, 2009 9:50 pm
Forum: C++ Development
Topic: How to register a custom file extension
Replies: 1
Views: 517

I have no experience on this, but I did find wxRichTextBufferAddHandler in the wxWidgets docs. I guess you can register the filehandler with the richttextcontrol as below: wxRichTextFileHandler* rtfHandler = new ... // create instance of file handler wxRichTextCtrl* richTextCtrl = new ... // create ...
by lvdlinden
Mon Apr 13, 2009 9:44 am
Forum: C++ Development
Topic: Launch threads without deriving from wxThread?
Replies: 2
Views: 818

For an alternative to wxThread, you could look into Boost Tread. It allows you to create a thread without having to derive a class.
by lvdlinden
Mon Apr 13, 2009 9:36 am
Forum: C++ Development
Topic: Need help - How to ... ? Threading Logic and GUI
Replies: 41
Views: 5556

Do you really need to create two threads in this case? You could handle the GUI in the main thread and have a separate thread for communication through the serial port.
by lvdlinden
Mon Feb 23, 2009 8:05 pm
Forum: C++ Development
Topic: gtk-critical issue! Help!
Replies: 1
Views: 636

The code seems correct. It seems like one or more of the strings are not correctly encoded as UTF-8, but this should be taken care of by wxWidgets (see http://www.compdigitec.com/labs/2008/08/30/the-gtk-critical-gtk_text_buffer_emit_insert-assertion-warning-in-php-gtk2/ for an explanation of the err...
by lvdlinden
Fri Feb 20, 2009 10:19 pm
Forum: C++ Development
Topic: wxEvent, m_callbackUserData and userData
Replies: 1
Views: 759

If you use wxCommandEvent::SetClientObject instead of wxCommandEvent::SetClientData, the object should not be deleted by the wxWidget library. You will have to subclass wxClientData as a handle to your data, e.g. struct MyClientData : public wxClientData { MyClientData( MyData* data ) : data(data) {...
by lvdlinden
Mon Dec 15, 2008 11:02 pm
Forum: C++ Development
Topic: wxEventPost problem
Replies: 3
Views: 775

As Auria stated, you haven't shown how you connect the event type wxEVT_THREAD to the handler function (wxVUMeterWnd::OnThreadEvent). A handler function needs to be registered for the event handler to handle the event, otherwise the event is simply ignored or propagated to it's parent window (in cas...
by lvdlinden
Mon Dec 15, 2008 9:56 pm
Forum: C++ Development
Topic: Draw using wxMemoryDC.. how do I avoid resource leak
Replies: 2
Views: 919

You could try oMemDC.SelectObject( wxNullBitmap ) at the end of DrawMemDCStretched. The documentation on SelectObject mentions this is needed to destroy the object safely, but I'm not sure if this would cause wxWidgets to fail to delete the image and leak memory. Other than that, I don't see a sourc...
by lvdlinden
Sat Nov 15, 2008 10:23 pm
Forum: C++ Development
Topic: simple problem with basic event
Replies: 3
Views: 1064

The compiler is complaining about the missing implementation of wxEVT2_THREAD, which is implemented by the DEFINE_EVENT_TYPE macro in watek.cpp. So you have probably not included watek.cpp in your compilation. I haven't worked with Code::Blocks, but you probably have to add the file to your project ...
by lvdlinden
Fri May 30, 2008 10:43 am
Forum: C++ Development
Topic: Look and Feel Windows
Replies: 1
Views: 597

You could look into the wxUniversal, but it only seems to contain win32 and gtk themes.
by lvdlinden
Fri May 30, 2008 10:35 am
Forum: C++ Development
Topic: Detecting mouseover drawn items...
Replies: 1
Views: 585

You could first check if the coordinates are within the bouding box of the shape for complex shapes only if it matches do a more expensive hit test. Perhaps you could sort the shapes along the x and y axis, so you can stop looking at the rest of the list if a shape is too far off. But keeping a sepa...
by lvdlinden
Mon Apr 21, 2008 5:51 pm
Forum: C++ Development
Topic: wxMessagebeBox call in thread
Replies: 4
Views: 1227

So, what else should I do?
Don't call wxMessageBox from any other thread than the main wxWidgets thread.

You can send a event to the main thread (e.g. the current frame or dialog) with wxPostEvent or wxEvtHandler::AddPendingEvent and handle it from the wxWidgets thread.
by lvdlinden
Fri Apr 11, 2008 8:30 pm
Forum: C++ Development
Topic: I cannot initialize static member data
Replies: 8
Views: 1739

Yes you may reinitialize static data, unless it is const. A good place would be wxApp::OnInit. You don't have to initialize with wxNullBitmap, the default constructor should be fine: wxBitmap MyButton::m_onClickDefaultBitmap; ... You can also create a singleton to manage your images and have it load...