Changeset 835 for trunk/KeyComboDlg.cpp
- Timestamp:
- 1/2/2009 5:35:27 AM (4 years ago)
- File:
-
- 1 edited
-
trunk/KeyComboDlg.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/KeyComboDlg.cpp
r42 r835 72 72 void CKeyComboDlg::OnBnClickedOk() 73 73 { 74 char ch[10]; 75 m_eKey.GetLine(0,ch,1); 76 m_strValue = ch; 74 char ch[8]; 75 memset(ch, 0, sizeof(ch)); 76 if (m_eKey.GetLine(0, ch, sizeof(ch))) 77 { 78 m_strValue = ch[0]; 79 m_strValue.MakeUpper(); 80 } 81 77 82 OnOK(); 78 83 } … … 82 87 CDialog::OnActivate(nState, pWndOther, bMinimized); 83 88 m_eKey.SetFocus(); 84 // TODO: Add your message handler code here85 89 } 86 90 … … 92 96 // function and call CRichEditCtrl().SetEventMask() 93 97 // with the ENM_CHANGE flag ORed into the mask. 94 char ch[10]; 95 m_eKey.GetLine(0,ch,1); 96 CString strLine(ch); 98 99 //Recursion guard 97 100 static bool busy = false; 98 101 if (busy) … … 100 103 busy = true; 101 104 105 char ch[8]; 106 memset(ch, 0, sizeof(ch)); 107 if (!m_eKey.GetLine(0, ch, sizeof(ch))) 108 return; 109 110 CString strLine(ch); 111 strLine.MakeUpper(); 102 112 if (!strLine.Trim().IsEmpty()) 103 113 { 104 114 CString strTmp(m_strRegKey.MakeUpper()); 105 strLine.MakeUpper();106 115 if (strTmp.Find(strLine[0]) == -1) { 107 116 //Invalid selection, clear the entry 108 m_eKey. SetWindowText("m");117 m_eKey.Undo(); 109 118 110 119 //TODO: This works only with XP/Vista. What about others?
Note: See TracChangeset
for help on using the changeset viewer.
