X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90805c24d70f439ebd8f8c443c1b6f0517d8f0e8..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index 365d178840..3fea3de8d7 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -729,7 +729,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags) params.pid = (DWORD)pid; // EnumWindows() has nice semantics: it returns 0 if it found - // something or if an error occured and non zero if it + // something or if an error occurred and non zero if it // enumerated all the window if ( !::EnumWindows(wxEnumFindByPidProc, (LPARAM)¶ms) ) { @@ -738,7 +738,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags) { // tell the app to close // - // NB: this is the harshest way, the app won't have + // NB: this is the harshest way, the app won't have an // opportunity to save any files, for example, but // this is probably what we want here. If not we // can also use SendMesageTimeout(WM_CLOSE) @@ -1045,9 +1045,9 @@ wxMemorySize wxGetFreeMemory() { #if defined(__WIN64__) MEMORYSTATUSEX memStatex; - statex.dwLength = sizeof (statex); - ::GlobalMemoryStatusEx (&statex); - return (wxMemorySize)memStatus.ullAvailPhys; + memStatex.dwLength = sizeof (memStatex); + ::GlobalMemoryStatusEx (&memStatex); + return (wxMemorySize)memStatex.ullAvailPhys; #else /* if defined(__WIN32__) */ MEMORYSTATUS memStatus; memStatus.dwLength = sizeof(MEMORYSTATUS); @@ -1241,6 +1241,62 @@ wxToolkitInfo& wxAppTraits::GetToolkitInfo() return info; } +wxWinVersion 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; +} + // ---------------------------------------------------------------------------- // sleep functions // ---------------------------------------------------------------------------- @@ -1478,7 +1534,7 @@ extern long wxCharsetToCodepage(const wxChar *name) Windows class unregistration). pclassname is a pointer to a caller stored classname, which must initially be - NULL. classname is the desired wndclass classname. If function succesfully + NULL. classname is the desired wndclass classname. If function successfully registers the class, pclassname will be set to classname. */ extern "C" WXDLLIMPEXP_BASE HWND