diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index b13a3be7a..4f4a7e12e 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -63,6 +63,8 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p _isScintillaKeyModified(false), _isPluginCmdScModified(false), _isRTL(false), \ _linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false) { + _winVersion = getWindowsVersion(); + TiXmlDocument *nativeLangDocRoot = (NppParameters::getInstance())->getNativeLang(); if (nativeLangDocRoot) { @@ -158,8 +160,6 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi { Window::init(hInst, parent); - _winVersion = getWindowsVersion(); - WNDCLASS nppClass; nppClass.style = CS_BYTEALIGNWINDOW | CS_DBLCLKS;//CS_HREDRAW | CS_VREDRAW; diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 7bae2430f..e781b2bae 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -345,6 +345,7 @@ public: loadSession(lastSession); }; bool loadSession(Session & session); + winVer getWinVersion() const {return _winVersion;}; private: static const char _className[32]; diff --git a/PowerEditor/src/winmain.cpp b/PowerEditor/src/winmain.cpp index 47838619c..a22dc5486 100644 --- a/PowerEditor/src/winmain.cpp +++ b/PowerEditor/src/winmain.cpp @@ -278,8 +278,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh bool isUpExist = nppGui._doesExistUpdater = (::PathFileExists(updaterFullPath.c_str()) == TRUE); bool doUpdate = !nppGui._neverUpdate; + bool winSupported = notepad_plus_plus.getWinVersion() >= WV_W2K; + if (!winSupported) + nppGui._doesExistUpdater = false; - if (TheFirstOne && isUpExist && doUpdate) + if (TheFirstOne && isUpExist && doUpdate && winSupported) { Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str()); updater.run();