Changeset 38
- Timestamp:
- 10/11/2007 2:20:20 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
Eraser.vcproj (modified) (4 diffs)
-
KeyComboDlg.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Eraser.vcproj
r37 r38 54 54 Optimization="0" 55 55 AdditionalIncludeDirectories="./" 56 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE ;_WIN32_IE=0x600;_WIN32_WINNT=0x600"56 PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE" 57 57 MinimalRebuild="true" 58 58 ExceptionHandling="2" … … 148 148 Optimization="0" 149 149 AdditionalIncludeDirectories="./" 150 PreprocessorDefinitions="_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE ;_WIN32_IE=0x600;_WIN32_WINNT=0x600"150 PreprocessorDefinitions="_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE" 151 151 MinimalRebuild="true" 152 152 ExceptionHandling="2" … … 243 243 Optimization="2" 244 244 AdditionalIncludeDirectories="./" 245 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE ;_WIN32_IE=0x600;_WIN32_WINNT=0x600"245 PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE" 246 246 StringPooling="true" 247 247 ExceptionHandling="2" … … 340 340 Optimization="2" 341 341 AdditionalIncludeDirectories="./" 342 PreprocessorDefinitions="NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE ;_WIN32_IE=0x600;_WIN32_WINNT=0x600"342 PreprocessorDefinitions="NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE" 343 343 StringPooling="true" 344 344 ExceptionHandling="2" -
trunk/KeyComboDlg.cpp
r37 r38 26 26 #include "KeyComboDlg.h" 27 27 #include <shared/key.h> 28 #include <commctrl.h> 28 29 29 30 30 const LPCTSTR szAccelerKey = "Acceler"; … … 92 92 // function and call CRichEditCtrl().SetEventMask() 93 93 // with the ENM_CHANGE flag ORed into the mask. 94 95 // TODO: Add your control notification handler code here 96 //char cLine[10]; 94 97 char ch[10]; 95 98 m_eKey.GetLine(0,ch,1); 96 99 CString strLine(ch); 97 static bool busy = false; 98 if (busy) 99 return; 100 busy = true; 101 102 if (!strLine.Trim().IsEmpty()) 100 if (!strLine.IsEmpty()) 103 101 { 104 102 CString strTmp(m_strRegKey.MakeUpper()); 105 103 strLine.MakeUpper(); 106 if (strTmp.Find(strLine[0]) == -1) { 107 //Invalid selection, clear the entry 108 m_eKey.SetWindowText("m"); 109 110 //TODO: This works only with XP/Vista. What about others? 111 EDITBALLOONTIP ebtt; 112 ZeroMemory(&ebtt, sizeof(ebtt)); 113 ebtt.cbStruct = sizeof(ebtt); 114 ebtt.pszTitle = L"Invalid shortcut"; 115 ebtt.ttiIcon = TTI_ERROR; 116 117 strTmp = "The shortcut value must be one of the characters " + strTmp; 118 ebtt.pszText = new wchar_t[strTmp.GetLength() + 1]; 119 mbstowcs((wchar_t*)ebtt.pszText, strTmp.GetBuffer(), strTmp.GetLength() + 1); 120 121 m_eKey.SendMessage(EM_SHOWBALLOONTIP, 0, (LPARAM)&ebtt); 122 delete[] ebtt.pszText; 104 if (strTmp.Find(strLine[0]) ==-1 ) { 105 m_eKey.Undo(); 106 m_eKey.SetWindowText(""); 123 107 } 124 108 } 125 busy = false; 109 126 110 }
Note: See TracChangeset
for help on using the changeset viewer.
