Jul 18, 2010

G1S was down !

Now I have 2 choices: buy a new PC, or repair G1S. G1S was down, but ASUS never let me down. I won`t buy their notebook again.

Jul 14, 2010

塗鴨集









新玩具!

Jul 2, 2010

Simple Extension for wxFileDropTarget of wxWidgets


//--------------------------------------------------------------------------
class CWxDnDSink
{
public:
CWxDnDSink();
virtual ~CWxDnDSink() = 0;

virtual Result OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& rFile);
};

//--------------------------------------------------------------------------
class CWxFileDropTarget : public wxFileDropTarget
{
CWxDnDSink* pDnDSink;

public:
CWxFileDropTarget(CWxDnDSink* pSink);
virtual ~CWxFileDropTarget();

virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& rFile);
};


Then every wxWindow can inherit CWxDnDSink, and SetDropTarget with a CWxFileDropTarget object. Quite simple and useful for me since I don`t want to write new drop target every time (like the dnd sample).