1:获得本程序的进程ID
wxWidgets一些代码片段(不断更新中)        long gpid; 
wxWidgets一些代码片段(不断更新中)        gpid=::wxGetProcessId(); 
wxWidgets一些代码片段(不断更新中)        wxString tempWxString; 
wxWidgets一些代码片段(不断更新中)        tempWxString.sprintf(wxT("%d"), gpid); 
wxWidgets一些代码片段(不断更新中)        wxMessageBox(tempWxString, _("Welcome to..."));
 
2:定时器
wxWidgets一些代码片段(不断更新中)        ::wxStartTimer(); 
wxWidgets一些代码片段(不断更新中)        long gt; 
wxWidgets一些代码片段(不断更新中)        gt=::wxGetElapsedTime(true); 
wxWidgets一些代码片段(不断更新中)        wxString tempWxString; 
wxWidgets一些代码片段(不断更新中)        tempWxString.sprintf(wxT("is %d second"), gt/1000); 
wxWidgets一些代码片段(不断更新中)        wxMessageBox(tempWxString, _("Welcome to..."));
 
3:一句话COPY文件
wxWidgets一些代码片段(不断更新中)//bool wxCopyFile(const wxString& file1, const wxString& file2, bool overwrite = true) 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)::wxCopyFile("c:\\README.TXT","d:\\1.txt",true);
 
4:获得系统文件夹
wxWidgets一些代码片段(不断更新中)        wxString osDirectory; 
wxWidgets一些代码片段(不断更新中)        osDirectory=::wxGetOSDirectory(); 
wxWidgets一些代码片段(不断更新中)        wxMessageBox(osDirectory, _("Welcome to..."));
 
5:获得系统版本信息
wxWidgets一些代码片段(不断更新中)        wxString OsVersion; 
wxWidgets一些代码片段(不断更新中)        OsVersion=::wxGetOsDescription(); 
wxWidgets一些代码片段(不断更新中)        wxMessageBox(OsVersion, _("axi Test"));
 
6:窗体坐标
wxWidgets一些代码片段(不断更新中)        wxPoint wp; 
wxWidgets一些代码片段(不断更新中)        wp=frame->GetClientAreaOrigin(); 
wxWidgets一些代码片段(不断更新中)        int x1,y1; 
wxWidgets一些代码片段(不断更新中)        x1=wp.x; 
wxWidgets一些代码片段(不断更新中)        y1=wp.y; 
wxWidgets一些代码片段(不断更新中)        wxString tempWxString; 
wxWidgets一些代码片段(不断更新中)        tempWxString.sprintf(wxT("x: %d y: %d"), x1,y1); 
wxWidgets一些代码片段(不断更新中)        wxMessageBox(tempWxString, _("frame xy"));
 
其他的一些文件操作
wxWidgets一些代码片段(不断更新中)::wxRemoveFile 
wxWidgets一些代码片段(不断更新中)bool wxRemoveFile(const wxString& file) 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)Removes file, returning true if successful. 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)::wxRenameFile 
wxWidgets一些代码片段(不断更新中)bool wxRenameFile(const wxString& file1, const wxString& file2, bool overwrite = true
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)Renames file1 to file2, returning true if successful. 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)If overwrite parameter is true (default), the destination file is overwritten if it exists, but if overwrite is false, the functions fails in this case
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)::wxRmdir 
wxWidgets一些代码片段(不断更新中)bool wxRmdir(const wxString& dir, int flags=0) 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)Removes the directory dir, returning true if successful. Does not work under VMS. 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)The flags parameter is reserved for future use. 
wxWidgets一些代码片段(不断更新中) 
wxWidgets一些代码片段(不断更新中)Please notice that there is also a wxRmDir() function which simply wraps the standard POSIX rmdir() function and soreturn an integer error code instead of a boolean value (but otherwise is currently identical to wxRmdir), don't confuse these two functions.