Monthly Archives: August 2007

sort wxGrid by clicking column header

Here is a simple code snippet for sorting wxGrid on column header click event. I assume all values are string in order to demonstrate the concept for short. Enjoy it(www.fruitfruit.com).BEGIN_EVENT_TABLE(InvoicePage, wxPanel)EVT_GRID_LABEL_LEFT_CLICK(InvoicePage::OnGridEvent)END_EVENT_TABLE()void InvoicePage::OnGridEvent( wxGridEvent& event ){ typedef std::list<wxString> StringList; typedef boost::shared_ptr<StringList> … Continue reading

Posted in GUI | 13 Comments

paint column header of wxGrid

When I want to draw sort indicator on column header of wxGrid, only wxPython example is found via google, but the sample is not the style I want. So the following code snippet is created. I also need to call … Continue reading

Posted in GUI | Leave a comment

War on naming convention

There are several widely used naming conventions and each has a lot of fans.naming convention:lower camel Java, Apache XercesCHungarian MFC, Microsoft Platform SDKunderscore boost, ACE, STL I personally favor to boost style, which only use lower case for class and … Continue reading

Posted in Software Engineering | Leave a comment

sddriver.exe

sddriver.exe seems to be a worm, it initialed a lot of connections (can be seen in TCPView.exe) and affected normal use of web browser. It is found in the following registry entries, but the file is not found in disk.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunCall … Continue reading

Posted in Virus/Worm | Leave a comment

multiple inheritance cause problem in wxWidgets event handling

I have a class derived from wxPanel and also implementing a custom interface. At first I wrote it in the following way:class CopyPage :public IPage, public wxPanel{… DECLARE_EVENT_TABLE()}; BEGIN_EVENT_TABLE(CopyPage, wxPanel)EVT_BUTTON(wxID_ANY, CopyPage::OnButton)END_EVENT_TABLE() There are several buttons in CopyPage. A strange behavior … Continue reading

Posted in GUI | Leave a comment