这篇教程C++ wxGetOsVersion函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wxGetOsVersion函数的典型用法代码示例。如果您正苦于以下问题:C++ wxGetOsVersion函数的具体用法?C++ wxGetOsVersion怎么用?C++ wxGetOsVersion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wxGetOsVersion函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ifWXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const{ WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle); // translate the alignment flags to the Windows ones // // note that both wxALIGN_LEFT and SS_LEFT are equal to 0 so we shouldn't // test for them using & operator if ( style & wxALIGN_CENTRE ) msStyle |= SS_CENTER; else if ( style & wxALIGN_RIGHT ) msStyle |= SS_RIGHT; else msStyle |= SS_LEFT;#ifdef SS_ENDELLIPSIS // this style is necessary to receive mouse events // Win NT and later have the SS_ENDELLIPSIS style which is useful to us: if (wxGetOsVersion() == wxOS_WINDOWS_NT) { // for now, add the SS_ENDELLIPSIS style if wxST_ELLIPSIZE_END is given; // we may need to remove it later in ::SetLabel() if the given label // has newlines if ( style & wxST_ELLIPSIZE_END ) msStyle |= SS_ENDELLIPSIS; }#endif // SS_ENDELLIPSIS msStyle |= SS_NOTIFY; return msStyle;}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:32,
示例2: wxPanelSToolBar::SToolBar(wxWindow* parent) : wxPanel(parent, -1){ // Init variables min_height = 0; n_rows = 0; draw_border = true; // Enable double buffering to avoid flickering#ifdef __WXMSW__ // In Windows, only enable on Vista or newer int win_vers; wxGetOsVersion(&win_vers); if (win_vers >= 6) SetDoubleBuffered(true);#else SetDoubleBuffered(true);#endif // Set background colour SetBackgroundColour(Drawing::getPanelBGColour()); // Create sizer wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); SetSizer(sizer); // Bind events Bind(wxEVT_SIZE, &SToolBar::onSize, this); Bind(wxEVT_PAINT, &SToolBar::onPaint, this); Bind(wxEVT_KILL_FOCUS, &SToolBar::onFocus, this); Bind(wxEVT_RIGHT_DOWN, &SToolBar::onMouseEvent, this); Bind(wxEVT_LEFT_DOWN, &SToolBar::onMouseEvent, this); Bind(wxEVT_MENU, &SToolBar::onContextMenu, this); Bind(wxEVT_ERASE_BACKGROUND, &SToolBar::onEraseBackground, this);}
开发者ID:DemolisherOfSouls,项目名称:SLADE,代码行数:34,
示例3: cb_get_os windows_version_t cb_get_os() { if(!platform::windows) { return winver_NotWindows; } else { int famWin95 = wxOS_WINDOWS_9X; int famWinNT = wxOS_WINDOWS_NT; int Major = 0; int family = wxGetOsVersion(&Major, NULL); if(family == famWin95) return winver_Windows9598ME; if(family == famWinNT) { if(Major == 5) return winver_WindowsXP; if(Major == 6) // just guessing here, not sure if this is right return winver_Vista; return winver_WindowsNT2000; } return winver_UnknownWindows; } };
开发者ID:469306621,项目名称:Languages,代码行数:32,
示例4: wxCheckOsVersionbool wxCheckOsVersion(int majorVsn, int minorVsn){ int majorCur, minorCur; wxGetOsVersion(&majorCur, &minorCur); return majorCur > majorVsn || (majorCur == majorVsn && minorCur >= minorVsn);}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:7,
示例5: wxGetOsVersionwxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const{ // We suppose that toolkit version is the same as OS version under Mac wxGetOsVersion(verMaj, verMin); return wxPORT_OSX;}
开发者ID:Kaoswerk,项目名称:newton-dynamics,代码行数:7,
示例6: wxFAIL_MSGvoid wxPlatformInfo::InitForCurrentPlatform(){ m_initializedForCurrentPlatform = true; // autodetect all informations const wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; if ( !traits ) { wxFAIL_MSG( wxT("failed to initialize wxPlatformInfo") ); m_port = wxPORT_UNKNOWN; m_usingUniversal = false; m_tkVersionMajor = m_tkVersionMinor = 0; } else { m_port = traits->GetToolkitVersion(&m_tkVersionMajor, &m_tkVersionMinor); m_usingUniversal = traits->IsUsingUniversalWidgets(); m_desktopEnv = traits->GetDesktopEnvironment(); } m_os = wxGetOsVersion(&m_osVersionMajor, &m_osVersionMinor); m_osDesc = wxGetOsDescription(); m_endian = wxIsPlatformLittleEndian() ? wxENDIAN_LITTLE : wxENDIAN_BIG; m_arch = wxIsPlatform64Bit() ? wxARCH_64 : wxARCH_32;#ifdef __LINUX__ m_ldi = wxGetLinuxDistributionInfo();#endif // else: leave m_ldi empty}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:32,
示例7: GetOSShortNamestatic const char * GetOSShortName(){ int osver_maj, osver_min; wxOperatingSystemId osid = wxGetOsVersion(&osver_maj, &osver_min); if (osid & wxOS_WINDOWS_NT) { if (osver_maj == 5 && osver_min == 0) return "win2k"; else if (osver_maj == 5 && osver_min == 1) return "winxp"; else if (osver_maj == 5 && osver_min == 2) return "win2k3"; // this is also xp64 else if (osver_maj == 6 && osver_min == 0) return "win60"; // vista and server 2008 else if (osver_maj == 6 && osver_min == 1) return "win61"; // 7 and server 2008r2 else if (osver_maj == 6 && osver_min == 2) return "win62"; // 8 else return "windows"; // future proofing? I doubt we run on nt4 } // CF returns 0x10 for some reason, which wx has recently started // turning into 10 else if (osid & wxOS_MAC_OSX_DARWIN && (osver_maj == 0x10 || osver_maj == 10)) { // ugliest hack in the world? nah. static char osxstring[] = "osx00"; char minor = osver_min >> 4; char patch = osver_min & 0x0F; osxstring[3] = minor + ((minor<=9) ? '0' : ('a'-1)); osxstring[4] = patch + ((patch<=9) ? '0' : ('a'-1)); return osxstring; } else if (osid & wxOS_UNIX_LINUX)
开发者ID:Gpower2,项目名称:Aegisub,代码行数:35,
示例8: wxShutdown// Shutdown or reboot the PCbool wxShutdown(wxShutdownFlags WXUNUSED_IN_WINCE(wFlags)){#ifdef __WXWINCE__ // TODO-CE return false;#elif defined(__WIN32__) bool bOK = true; if ( wxGetOsVersion(NULL, NULL) == wxOS_WINDOWS_NT ) // if is NT or 2K { // Get a token for this process. HANDLE hToken; bOK = ::OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken) != 0; if ( bOK ) { TOKEN_PRIVILEGES tkp; // Get the LUID for the shutdown privilege. ::LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid); tkp.PrivilegeCount = 1; // one privilege to set tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; // Get the shutdown privilege for this process. ::AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); // Cannot test the return value of AdjustTokenPrivileges. bOK = ::GetLastError() == ERROR_SUCCESS; } } if ( bOK ) { UINT flags = EWX_SHUTDOWN | EWX_FORCE; switch ( wFlags ) { case wxSHUTDOWN_POWEROFF: flags |= EWX_POWEROFF; break; case wxSHUTDOWN_REBOOT: flags |= EWX_REBOOT; break; default: wxFAIL_MSG( _T("unknown wxShutdown() flag") ); return false; } bOK = ::ExitWindowsEx(flags, 0) != 0; } return bOK;#endif // Win32/16}
开发者ID:252525fb,项目名称:rpcs3,代码行数:60,
示例9: wxUsingUnicowsDllbool WXDLLIMPEXP_BASE wxUsingUnicowsDll(){#if wxUSE_UNICODE_MSLU return (wxGetOsVersion() == wxWIN95);#else return false;#endif}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:8,
示例10: wxGetOsVersionwxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const{ // on Windows, the toolkit version is the same of the OS version // as Windows integrates the OS kernel with the GUI toolkit. wxGetOsVersion(majVer, minVer); return wxPORT_MSW;}
开发者ID:vdm113,项目名称:wxWidgets-ICC-patch,代码行数:8,
示例11: wxGetWinVersionwxWinVersion wxGetWinVersion(){ int verMaj, verMin; switch ( wxGetOsVersion(&verMaj, &verMin) ) { case wxOS_WINDOWS_9X: if ( verMaj == 4 ) { switch ( verMin ) { case 0: return wxWinVersion_95; case 10: return wxWinVersion_98; case 90: return wxWinVersion_ME; } } break; case wxOS_WINDOWS_NT: switch ( verMaj ) { case 3: return wxWinVersion_NT3; case 4: return wxWinVersion_NT4; case 5: switch ( verMin ) { case 0: return wxWinVersion_2000; case 1: return wxWinVersion_XP; case 2: return wxWinVersion_2003; } break; case 6: return wxWinVersion_NT6; } break; default: // Do nothing just to silence GCC warning break; } return wxWinVersion_Unknown;}
开发者ID:252525fb,项目名称:rpcs3,代码行数:58,
示例12: wxGetWinVersionwxWinVersion wxGetWinVersion(){ int verMaj, verMin; switch ( wxGetOsVersion(&verMaj, &verMin) ) { case wxWIN95: if ( verMaj == 4 ) { switch ( verMin ) { case 0: return wxWinVersion_95; case 10: return wxWinVersion_98; case 90: return wxWinVersion_ME; } } break; case wxWINDOWS_NT: switch ( verMaj ) { case 3: return wxWinVersion_NT3; case 4: return wxWinVersion_NT4; case 5: switch ( verMin ) { case 0: return wxWinVersion_2000; case 1: return wxWinVersion_XP; case 2: return wxWinVersion_2003; } break; case 6: return wxWinVersion_NT6; } break; } return wxWinVersion_Unknown;}
开发者ID:project-renard-survey,项目名称:chandler,代码行数:55,
示例13: wxGetOsVersionbool wtfRenamer::HasHardlinkSupport(){#ifdef __WXMSW__ int major, minor; wxOperatingSystemId sys_id = wxGetOsVersion(&major, &minor); if (sys_id != wxOS_WINDOWS_NT) { return false; } if (wtfRenamer::m_hasHLS) {# ifdef _UNICODE return wtfRenamer::m_HLShasW || wtfRenamer::m_HLShasA;# else return wtfRenamer::m_HLShasA;# endif } wtfRenamer::m_hasHLS = true; wtfRenamer::m_lib = WXDEBUG_NEW wxDynamicLibrary(_T("kernel32")); if (!wtfRenamer::m_lib->IsLoaded()) { delete(wtfRenamer::m_lib); wtfRenamer::m_lib = NULL; return false; } wtfRenamer::m_HLShasW = wtfRenamer::m_lib->HasSymbol(_T("CreateHardLinkW")); wtfRenamer::m_HLShasA = wtfRenamer::m_lib->HasSymbol(_T("CreateHardLinkA"));# ifdef __WXDEBUG__ if (wtfRenamer::m_HLShasW) { wxLogDebug(wxT("Found CreateHardLinkW")); } if (wtfRenamer::m_HLShasA) { wxLogDebug(wxT("Found CreateHardLinkA")); }# endif if# ifdef _UNICODE (!wtfRenamer::m_HLShasW && !wtfRenamer::m_HLShasA)# else (!wtfRenamer::m_HLShasA)# endif { delete(wtfRenamer::m_lib); wtfRenamer::m_lib = NULL; return false; }
开发者ID:codegooglecom,项目名称:wtfu,代码行数:54,
示例14: IsBalloonsSupportedbool wxTaskBarIconEx::IsBalloonsSupported(){#ifdef __WXMSW__ wxInt32 iMajor = 0, iMinor = 0; if ( wxWINDOWS_NT == wxGetOsVersion( &iMajor, &iMinor ) ) { if ( (5 >= iMajor) && (0 <= iMinor) ) return true; }#endif return false;}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:12,
示例15: wxDynamicCastCToolBar* CToolBar::Load(CMainFrame* pMainFrame){ { wxString str = COptions::Get()->GetOption(OPTION_THEME_ICONSIZE); wxSize iconSize = CThemeProvider::GetIconSize(str); wxToolBarXmlHandlerEx::SetIconSize(iconSize); } CToolBar* toolbar = wxDynamicCast(wxXmlResource::Get()->LoadToolBar(pMainFrame, _T("ID_TOOLBAR")), CToolBar); if (!toolbar) return 0; toolbar->m_pMainFrame = pMainFrame; CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_REMOTE_IDLE, true, true); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_SERVER, true, true); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_SYNC_BROWSE, true, true); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_COMPARISON, true, true); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_APPLYFILTER, true, false); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_QUEUEPROCESSING, false, false); CContextManager::Get()->RegisterHandler(toolbar, STATECHANGE_CHANGEDCONTEXT, false, false); toolbar->RegisterOption(OPTION_SHOW_MESSAGELOG); toolbar->RegisterOption(OPTION_SHOW_QUEUE); toolbar->RegisterOption(OPTION_SHOW_TREE_LOCAL); toolbar->RegisterOption(OPTION_SHOW_TREE_REMOTE); toolbar->RegisterOption(OPTION_MESSAGELOG_POSITION);#ifdef __WXMSW__ int majorVersion, minorVersion; wxGetOsVersion(& majorVersion, & minorVersion); if (majorVersion < 6) toolbar->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));#endif toolbar->ToggleTool(XRCID("ID_TOOLBAR_FILTER"), CFilterManager::HasActiveFilters()); toolbar->ToggleTool(XRCID("ID_TOOLBAR_LOGVIEW"), COptions::Get()->GetOptionVal(OPTION_SHOW_MESSAGELOG) != 0); toolbar->ToggleTool(XRCID("ID_TOOLBAR_QUEUEVIEW"), COptions::Get()->GetOptionVal(OPTION_SHOW_QUEUE) != 0); toolbar->ToggleTool(XRCID("ID_TOOLBAR_LOCALTREEVIEW"), COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_LOCAL) != 0); toolbar->ToggleTool(XRCID("ID_TOOLBAR_REMOTETREEVIEW"), COptions::Get()->GetOptionVal(OPTION_SHOW_TREE_REMOTE) != 0); if (COptions::Get()->GetOptionVal(OPTION_MESSAGELOG_POSITION) == 2) toolbar->HideTool(XRCID("ID_TOOLBAR_LOGVIEW"));#ifdef __WXMAC__ // Hide then re-show fixes some odd sizing toolbar->Hide(); if (COptions::Get()->GetOptionVal(OPTION_TOOLBAR_HIDDEN) == 0) toolbar->Show();#endif return toolbar;}
开发者ID:juaristi,项目名称:filezilla,代码行数:53,
示例16: wxGetOsVersionbool GeneralWxUtils::isVista(){ static bool r = (GetOsId() & wxOS_WINDOWS ? true : false); if (r) { int majorVsn = 0; int minorVsn = 0; wxGetOsVersion(&majorVsn, &minorVsn); r = r && (majorVsn == 6) && (minorVsn == 0); // This includes Windows Server 2008 and Vista } return r;}
开发者ID:jontheepi,项目名称:geoda,代码行数:12,
示例17: wxGetOsVersionwxPortId wxGUIAppTraits::GetToolkitVersion(int *majVer, int *minVer) const{ // on Windows, the toolkit version is the same of the OS version // as Windows integrates the OS kernel with the GUI toolkit. wxGetOsVersion(majVer, minVer);#if defined(__WXHANDHELD__) || defined(__WXWINCE__) return wxPORT_WINCE;#else return wxPORT_MSW;#endif}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:12,
示例18: WXUNUSEDvoid wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) ){ wxPaintDC dc(this); dc.Clear() ; int major,minor; wxGetOsVersion( &major, &minor ); int w, h ; GetSize( &w , &h ) ; if ( MacIsReallyHilited() ) { wxPen white( *wxWHITE , 1 , wxSOLID ) ; if (major >= 10 ) { //Finder statusbar border color: (Project builder similar is 9B9B9B) if ( MacGetTopLevelWindow()->MacGetMetalAppearance() ) dc.SetPen(wxPen(wxColour(0x40,40,40) ,1,wxSOLID)) ; else dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID)); } else { wxPen black( *wxBLACK , 1 , wxSOLID ) ; dc.SetPen(black); } dc.DrawLine(0, 0 , w , 0); dc.SetPen(white); dc.DrawLine(0, 1 , w , 1); } else { if (major >= 10) //Finder statusbar border color: (Project builder similar is 9B9B9B) dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID)); else dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID)); dc.DrawLine(0, 0 , w , 0); } int i; if ( GetFont().Ok() ) dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); for ( i = 0; i < m_nFields; i ++ ) DrawField(dc, i);}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:52,
示例19: WXUNUSEDvoid wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event)){ wxPaintDC dc(this); dc.Clear(); int major, minor; wxGetOsVersion( &major, &minor ); int w, h; GetSize( &w, &h ); if ( MacIsReallyHilited() ) { wxPen white( *wxWHITE , 1 , wxSOLID ); if (major >= 10) { // Finder statusbar border color: (Project Builder similar is 9B9B9B) if ( MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL ) dc.SetPen(wxPen(wxColour(0x40, 0x40, 0x40), 1, wxSOLID)); else dc.SetPen(wxPen(wxColour(0xB1, 0xB1, 0xB1), 1, wxSOLID)); } else { wxPen black( *wxBLACK , 1 , wxSOLID ); dc.SetPen(black); } dc.DrawLine(0, 0, w, 0); dc.SetPen(white); dc.DrawLine(0, 1, w, 1); } else { if (major >= 10) // Finder statusbar border color: (Project Builder similar is 9B9B9B) dc.SetPen(wxPen(wxColour(0xB1, 0xB1, 0xB1), 1, wxSOLID)); else dc.SetPen(wxPen(wxColour(0x80, 0x80, 0x80), 1, wxSOLID)); dc.DrawLine(0, 0, w, 0); } if ( GetFont().IsOk() ) dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); // compute char height only once for all panes: int textHeight = dc.GetCharHeight(); for ( size_t i = 0; i < m_panes.GetCount(); i ++ ) DrawField(dc, i, textHeight);}
开发者ID:jonntd,项目名称:dynamica,代码行数:52,
示例20: wxGetOsVersionvoid EditorSettingsMiscPanel::OnEnableThemeUI(wxUpdateUIEvent& event){#ifdef __WXMSW__ int major, minor; wxGetOsVersion(&major, &minor); if(wxUxThemeEngine::GetIfActive() && major >= 6 /* Win 7 and up */) { event.Enable(true); } else { event.Enable(false); }#else event.Enable(false);#endif}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:15,
示例21: wxGetOsVersionsg_treediff_cache::sg_treediff_cache(SG_context * pCtx, const char * psz_wc_root){ m_pPreviousCommand = NULL; m_pPreviousResult = NULL; m_sTopFolder = psz_wc_root; m_timeLastRequest = 0; m_pwc_tx = NULL; int major = 0, minor = 0; wxGetOsVersion(&major, &minor); SG_ERR_CHECK( SG_log__report_verbose(pCtx, "OS version is: %d.%d", major, minor) ); m_bIsWin7 = major > 6 || (major == 6 && minor >= 1); fail: return;}
开发者ID:refaqtor,项目名称:sourcegear_veracity_clone,代码行数:16,
示例22: wxGetOsVersionvoid wxStaticText::SetLabel(const wxString& label){#ifdef SS_ENDELLIPSIS long styleReal = ::GetWindowLong(GetHwnd(), GWL_STYLE); if ( HasFlag(wxST_ELLIPSIZE_END) && wxGetOsVersion() == wxOS_WINDOWS_NT ) { // adding SS_ENDELLIPSIS or SS_ENDELLIPSIS "disables" the correct // newline handling in static texts: the newlines in the labels are // shown as square. Thus we don't use it even on newer OS when // the static label contains a newline. if ( label.Contains(wxT('/n')) ) styleReal &= ~SS_ENDELLIPSIS; else styleReal |= SS_ENDELLIPSIS; ::SetWindowLong(GetHwnd(), GWL_STYLE, styleReal); } else // style not supported natively { styleReal &= ~SS_ENDELLIPSIS; ::SetWindowLong(GetHwnd(), GWL_STYLE, styleReal); }#endif // SS_ENDELLIPSIS // save the label in m_labelOrig with both the markup (if any) and // the mnemonics characters (if any) m_labelOrig = label;#ifdef SS_ENDELLIPSIS if ( styleReal & SS_ENDELLIPSIS ) DoSetLabel(GetLabel()); else#endif // SS_ENDELLIPSIS DoSetLabel(GetEllipsizedLabel()); // adjust the size of the window to fit to the label unless autoresizing is // disabled if ( !HasFlag(wxST_NO_AUTORESIZE) && !IsEllipsized() ) // if ellipsize is ON, then we don't want to get resized! { InvalidateBestSize(); DoSetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT); }}
开发者ID:Annovae,项目名称:Dolphin-Core,代码行数:46,
示例23: WXUNUSEDvoid MyFrame::OnCmdPromt (wxCommandEvent& WXUNUSED(event)) {#ifdef __WXMSW__ int major = 0, minor = 0; int result = wxGetOsVersion(&major, &minor); if (result==wxWINDOWS_NT) wxExecute("cmd.exe"); else if(result==wxWIN95) wxExecute("command.com");#else if( strTerminal.Len() ) wxExecute( strTerminal );#endif return;}
开发者ID:bihai,项目名称:fbide,代码行数:17,
示例24: mainint main() { int major, minor; wxOperatingSystemId os = wxGetOsVersion(&major, &minor); if (os == wxOS_WINDOWS_NT) { DirName = wxT("C://Users//Roberto//sample_php_project"); } else { DirName = wxT("/home/roberto/workspace/sample_php_project"); } ProfileFindInFilesExactMode(); ProfileFindInFilesCodeMode(); // calling cleanup here so that we can run this binary through a memory leak detector // ICU will cache many things and that will cause the detector to output "possible leaks" u_cleanup(); return 0;}
开发者ID:adjustive,项目名称:triumph4php,代码行数:17,
示例25: wxPutsvoid InteractiveOutputTestCase::TestOsInfo(){#ifdef TEST_INFO_FUNCTIONS wxPuts(wxT("*** Testing OS info functions ***/n")); int major, minor; wxGetOsVersion(&major, &minor); wxPrintf(wxT("Running under: %s, version %d.%d/n"), wxGetOsDescription().c_str(), major, minor); wxPrintf(wxT("%ld free bytes of memory left./n"), wxGetFreeMemory().ToLong()); wxPrintf(wxT("Host name is %s (%s)./n"), wxGetHostName().c_str(), wxGetFullHostName().c_str()); wxPuts(wxEmptyString);#endif // TEST_INFO_FUNCTIONS}
开发者ID:euler0,项目名称:Helium,代码行数:18,
示例26: GetRealOsVersionbool GetRealOsVersion(int& major, int& minor){#ifndef __WXMSW__ return wxGetOsVersion(&major, &minor) != wxOS_UNKNOWN;#else major = 4; minor = 0; while (IsAtLeast(++major, minor)) { } --major; while (IsAtLeast(major, ++minor)) { } --minor; return true;#endif}
开发者ID:Typz,项目名称:FileZilla,代码行数:19,
示例27: Authvoid ButtonTestCase::Auth(){ //Some functions only work on specific operating system versions, for //this we need a runtime check int major = 0; if(wxGetOsVersion(&major) != wxOS_WINDOWS_NT || major < 6) return; //We are running Windows Vista or newer CPPUNIT_ASSERT(!m_button->GetAuthNeeded()); m_button->SetAuthNeeded(); CPPUNIT_ASSERT(m_button->GetAuthNeeded()); //We test both states m_button->SetAuthNeeded(false); CPPUNIT_ASSERT(!m_button->GetAuthNeeded());}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:21,
示例28: wxGetOsVersionbool wxTextMeasure::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths, double scaleX){ if ( !m_hdc ) return wxTextMeasureBase::DoGetPartialTextExtents(text, widths, scaleX); static int maxLenText = -1; static int maxWidth = -1; if (maxLenText == -1) { // Win9x and WinNT+ have different limits int version = wxGetOsVersion(); maxLenText = version == wxOS_WINDOWS_NT ? 65535 : 8192; maxWidth = version == wxOS_WINDOWS_NT ? INT_MAX : 32767; } int len = text.length(); if ( len > maxLenText ) len = maxLenText; int fit = 0; SIZE sz = {0,0}; if ( !::GetTextExtentExPoint(m_hdc, text.t_str(), // string to check len, maxWidth, &fit, // [out] count of chars // that will fit &widths[0], // array to fill &sz) ) { wxLogLastError(wxT("GetTextExtentExPoint")); return false; } return true;}
开发者ID:0ryuO,项目名称:dolphin-avsync,代码行数:40,
注:本文中的wxGetOsVersion函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wxGetStockLabel函数代码示例 C++ wxGetMousePosition函数代码示例 |