diff --git a/editor/Editor.cpp b/editor/Editor.cpp index 6b857b2..b5318e5 100644 --- a/editor/Editor.cpp +++ b/editor/Editor.cpp @@ -100,44 +100,6 @@ int CEditor::GetMenuItemPosition(HANDLE hMenu, TCHAR* text) return result; } -int CEditor::GetMenuItemPosition(HANDLE hMenu, TCHAR* text) -{ - int count = GetMenuItemCount(m_mainMenu); - int result = count -1; - - MENUITEMINFO mii; - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_STRING; - mii.fType = MFT_STRING; - - size_t len; - if (FAILED(StringCchLength(text, 100, &len))) - return result; - - size_t bufferSize = len + 1 + 1; // one character more + one for \0 - mii.dwTypeData = new TCHAR[bufferSize]; - - for (int i = 0; i < count; i++) { - mii.cch = bufferSize; - - BOOL res = GetMenuItemInfo( - m_mainMenu, - (UINT)i, - TRUE, - &mii - ); - - if (StrCmp(mii.dwTypeData, text) == 0) { - result = i; - break; - } - } - - delete mii.dwTypeData; - - return result; -} - // 1.) NPP uses IDs for menu items but does not offer API // to get new IDs for our dynamic menu items. Due to solve // this problem switch menu message handling from WM_COMMAND to WM_MENUCOMMAND diff --git a/editor/Editor.h b/editor/Editor.h index 8f4c194..4af0832 100644 Binary files a/editor/Editor.h and b/editor/Editor.h differ diff --git a/jN.vcxproj b/jN.vcxproj index 154ba25..4d13ada 100644 --- a/jN.vcxproj +++ b/jN.vcxproj @@ -27,6 +27,7 @@ 0 0 10.0 + v143 @@ -38,18 +39,6 @@ Unicode true - - v142 - - - v143 - - - v142 - - - v142 - diff --git a/tests/tests.vcxproj b/tests/tests.vcxproj index 60be12c..9f7fdf7 100644 --- a/tests/tests.vcxproj +++ b/tests/tests.vcxproj @@ -41,12 +41,8 @@ - - - - NotUsing @@ -56,12 +52,15 @@ MultiThreadedDebugDLL MultiThreadedDLL Level3 + true true Console $(MSBuildProjectDirectory)\..\$(Configuration)\*.obj;shlwapi.lib;%(AdditionalDependencies) $(MSBuildProjectDirectory)\..\x64\$(Configuration)\*.obj;shlwapi.lib;%(AdditionalDependencies) + UseLinkTimeCodeGeneration + UseLinkTimeCodeGeneration