更新时间:2022-08-13 11:08:21
MFC version | wxWidgets version |
---|---|
BEGIN_MESSAGE_MAP
|
BEGIN_EVENT_TABLE
|
END_MESSAGE_MAP
|
END_EVENT_TABLE
|
DECLARE_DYNAMIC
|
DECLARE_CLASS
|
DECLARE_DYNCREATE
|
DECLARE_DYMAMIC_CLASS
|
IMPLEMENT_DYNAMIC
|
IMPLEMENT_CLASS
|
IMPLEMENT_DYNCREATE
|
IMPLEMENT_DYNAMIC_CLASS
|
IsKindOf (RUNTIME_CLASS (CWindow)) |
IsKindOf (CLASSINFO(wxWindow)) |
Miscellaneous Classes | |
MFC version | wxWidgets version |
---|---|
CWinApp
|
wxApp |
CObject
|
wxObject |
CCmdTarget
|
wxEvtHandler |
CCommandLineInfo
|
wxCmdLineParser |
CMenu
|
wxMenu, wMenuBar, wxMenuItem |
CWaitCursor
|
wxBusyCursor |
CDataExchange
|
wxValidator |
Window Classes | |
MFC version | wxWidgets version |
CFrameWnd
|
wxFrame |
CMDIFrameWnd
|
wxMDIParentFrame |
CMDIChildWnd
|
wxMDIChildFrame |
CSplitterWnd
|
wxSplitterWindow |
CToolBar
|
wxToolBar |
CStatusBar
|
wxStatusBar |
CReBar
|
wxCoolBar, but see contrib/src/fl and wxAUI, wxDockIt |
CPropertyPage
|
wxPanel |
CPropertySheet
|
wxNotebook, wxPropertySheetDialog |
Dialog Classes | |
MFC version | wxWidgets version |
CDialog
|
wxDialog |
CColorDialog
|
wxColourDialog |
CFileDialog
|
wxFileDialog |
CFindReplaceDialog
|
wxFindReplaceDialog |
CFontDialog
|
wxFontDialog |
CPageSetupDialog
|
wxPageSetupDialog |
CPrintDialog
|
wxPrintDialog |
Control Classes | |
MFC version | wxWidgets version |
CAnimateCtrl
|
wxMediaCtrl, wxAnimationCtrl |
CButton
|
wxButton |
CBitmapButton
|
wxBitmapButton |
CComboBox
|
wxComboBox, wxChoice |
CDateTimeCtrl
|
wxDatePickerCtrl |
CEdit
|
wxTextCtrl |
CHotKeyCtrl
|
None, but see Keybinder |
CListBox , CDragListBox
|
wxListBox |
CCheckListBox
|
wxCheckListBox |
CListCtrl
|
wxListCtrl, wxListView |
CMonthCalCtrl
|
wxCalendarCtrl |
CProgressCtrl
|
wxGauge |
CReBarCtrl
|
None, but see contrib/src/fl and wxAUI, wxDockIt |
CRichEditCtrl
|
wxTextCtrl |
CScrollBar
|
wxScrollBar |
CSliderCtrl
|
wxSlider |
CSpinButtonCtrl
|
wxSpinButton, wxSpinCtrl |
CStatic
|
wxStaticText, wxStaticLine, wxStaticBox, wxStaticBitmap |
CStatusBarCtrl
|
wxStatusBar |
CTabCtrl
|
wxTabCtrl |
CToolBarCtrl
|
wxToolBar |
CToolTipCtrl
|
wxToolTip |
CTreeCtrl
|
wxTreeCtrl |
Graphics Classes | |
MFC version | wxWidgets version |
CBitmap
|
wxBitmap, wxImage, wxIcon, wxCursor |
CBrush
|
wxBrush |
CPen
|
wxPen |
CFont
|
wxFont |
CImageList
|
wxImageList, wxIconBundle |
CPalette
|
wxPalette |
CRgn
|
wxRegion |
CClientDC
|
wxClientDC |
CMetaFileDC
|
wxMetaFileDC |
CPaintDC
|
wxPaintDC |
CWindowDC
|
wxWindowDC |
CDC
|
wxDC, wxMemoryDC |
Data Structure Classes | |
MFC version | wxWidgets version |
CArray , CObArray , CPtrArray
|
wxArray |
CStringArray
|
wxArrayString |
CDWordArray , CByteArray , CUIntArray
|
wxArrayInt |
CList , CPtrList , CObList
|
wxList |
CStringList
|
wxArrayString, wxStringList |
CMap
|
wxHashMap |
CString
|
wxString |
CPoint
|
wxPoint |
CRect
|
wxRect |
CSize
|
wxSize |
CTime
|
wxDateTime |
CTimeSpan
|
wxTimeSpan, wxDateSpan |
COleVariant
|
wxVariant |
Internet Classes | |
MFC version | wxWidgets version |
CSocket
|
wxSocket |
CFtpConnection
|
wxFTP |
CHttpConnection
|
wxHTTP |
Document/View Classes | |
MFC version | wxWidgets version |
CDocument
|
wxDocument |
CView
|
wxView |
CDocTemplate , CSingleDocTemplate , CMultiDocTemplate
|
wxDocTemplate |
Drag and Drop Classes | |
MFC version | wxWidgets version |
COleDataSource
|
wxDataObject |
COleDropSource
|
wxDropSource |
COleDropTarget
|
wxDropTarget |
File Classes | |
MFC version | wxWidgets version |
CFile
|
wxFile, wxFFile, wxTextFile |
CMemFile
|
wxMemoryInputStream, wxMemoryOutputStream |
CSocketFile
|
wxSocketInputStream, wxSocketOutputStream |
CRecentFileList
|
wxFileHistory |
Multithreading Classes | |
MFC version | wxWidgets version |
CWinThread
|
wxThread |
CCriticalSection
|
wxCriticalSection |
CMutex
|
wxMutex |
CSemaphore
|
wxSemaphore |
可以使用exe安装,(相当于解压缩源代码,不是安装)也可以使用zip解压缩,两个都是将源代码放到一个目录,没有啥区别。
然后编译,否则不能使用!!!!!!
wxWidgets使用的是vc6.0开发的,需要转换成vistual studio 2010。(IDE会自动转换的,耐心等待)
转换完成之后直接build就行了。
编译完成没有任何错误信息。说明安装成功。
转换完成之后就可以进行编译了。发现编译有4个失败的。不过没有关系大多数成功了。
运行一个demo:
丰富的demo找了几个运行下效果如下:
一个简单的播放器
一个所有组件的demo。比较全。
/* * hworld.cpp * Hello world sample by Robert Roebling */ #include "wx/wx.h" class MyApp: public wxApp { virtual bool OnInit(); }; class MyFrame: public wxFrame { public: MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size); void OnQuit(wxCommandEvent& event); void OnAbout(wxCommandEvent& event); DECLARE_EVENT_TABLE() }; enum { ID_Quit = 1, ID_About, }; BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(ID_Quit, MyFrame::OnQuit) EVT_MENU(ID_About, MyFrame::OnAbout) END_EVENT_TABLE() IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { MyFrame *frame = new MyFrame( "Hello World", wxPoint(50,50), wxSize(450,340) ); frame->Show(TRUE); SetTopWindow(frame); return TRUE; } MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame((wxFrame *)NULL, -1, title, pos, size) { wxMenu *menuFile = new wxMenu; menuFile->Append( ID_About, "&About..." ); menuFile->AppendSeparator(); menuFile->Append( ID_Quit, "E&xit" ); wxMenuBar *menuBar = new wxMenuBar; menuBar->Append( menuFile, "&File" ); SetMenuBar( menuBar ); CreateStatusBar(); SetStatusText( "Welcome to wxWindows!" ); } void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxMessageBox("This is a wxWindows Hello world sample", "About Hello World", wxOK | wxICON_INFORMATION, this); }
http://www.cnzui.com/archives/962
http://blog.csdn.net/chinabinlang/article/details/6904143
http://www.codeproject.com/Articles/11515/Introduction-to-wxWidgets