Changeset 29
- Timestamp:
- 10/10/2007 10:33:46 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
HotKeyDlg.cpp (modified) (13 diffs)
-
HotKeyDlg.h (modified) (1 diff)
-
HotKeyListCtrl.cpp (modified) (2 diffs)
-
HotKeyListCtrl.h (modified) (1 diff)
-
KeyComboDlg.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/HotKeyDlg.cpp
r26 r29 1 // HotKeyDlg.cpp : implementation file 1 // HotKeyDlg.cpp 2 // $Id$ 2 3 // 4 // Eraser. Secure data removal. For Windows. 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 // 02111-1307, USA. 3 23 4 24 #include "stdafx.h" … … 21 41 "E", 22 42 "M", 23 "U"43 "U" 24 44 }; 25 45 … … 34 54 "Erase", 35 55 "Eraser Secure Move", 36 "Erase Unused Space"56 "Erase Unused Space" 37 57 }; 38 58 … … 55 75 lvc.iSubItem = 1; 56 76 lcHKey.InsertColumn(1, &lvc); 57 77 58 78 lcHKey.SetExtendedStyle(LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES); 59 79 } … … 68 88 CString strPath = _T(""); 69 89 strPath.Format("%s\\%s", ERASER_REGISTRY_BASE, szAccelerKey); 70 90 71 91 if (!no_registry) { 72 92 if (!kReg.Open(HKEY_CURRENT_USER, strPath, FALSE)) … … 106 126 CString strValueName=_T(""); 107 127 CString strValue=_T(""); 108 128 109 129 strPath.Format("%s\\%s", ERASER_REGISTRY_BASE, szAccelerKey); 110 130 InitRegistry(); … … 150 170 void CHotKeyDlg::UpdateHotKeyList(CListCtrl& lcHKey) 151 171 { 152 153 172 lcHKey.SetRedraw(FALSE); 154 173 155 174 LV_ITEM lvi; 156 175 POSITION pos; 157 176 CString strKey = _T(""); 158 177 CString strCommand =_T(""); 159 178 160 179 ZeroMemory(&lvi, sizeof(LV_ITEM)); 161 180 try … … 166 185 { 167 186 m_arKeyValues.GetNextAssoc(pos,strCommand,strKey); 168 187 169 188 lvi.mask = LVIF_TEXT ; 170 189 lvi.iItem = nItem; … … 172 191 lvi.pszText = strCommand.GetBuffer(strCommand.GetLength()); 173 192 lvi.iItem = lcHKey.InsertItem(&lvi); 174 193 175 194 lvi.mask = LVIF_TEXT; 176 195 lvi.iSubItem = 1; … … 224 243 IMPLEMENT_DYNAMIC(CHotKeyDlg, CDialog) 225 244 CHotKeyDlg::CHotKeyDlg(CWnd* pParent /*=NULL*/, int iValCnt) 226 : CDialog(CHotKeyDlg::IDD, pParent),m_arKeyValues(),m_lcHotKeys()245 : CDialog(CHotKeyDlg::IDD, pParent),m_arKeyValues(),m_lcHotKeys() 227 246 { 228 247 } … … 288 307 289 308 // TODO: Add your message handler code here 290 UpdateHotKeyList(m_lcHotKeys);309 UpdateHotKeyList(m_lcHotKeys); 291 310 GetDlgItem(IDCHANGE)->EnableWindow(FALSE); 292 311 } … … 298 317 // TODO: Add your control notification handler code here 299 318 if (m_lcHotKeys.GetFirstSelectedItemPosition() != NULL) 300 GetDlgItem(IDCHANGE)->EnableWindow(TRUE);319 GetDlgItem(IDCHANGE)->EnableWindow(TRUE); 301 320 else 302 321 GetDlgItem(IDCHANGE)->EnableWindow(FALSE); … … 306 325 void CHotKeyDlg::OnBnClickedButtonOk() 307 326 { 308 saveListToRegistry();327 saveListToRegistry(); 309 328 this->OnOK(); 310 329 } -
trunk/HotKeyDlg.h
r3 r29 1 // HotKeyDlg.h 2 // $Id$ 3 // 4 // Eraser. Secure data removal. For Windows. 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 // 02111-1307, USA. 1 23 #pragma once 2 24 -
trunk/HotKeyListCtrl.cpp
r3 r29 1 // HotKeyListCtrl.cpp : implementation file 1 // HotKeyListCtrl.cpp 2 // $Id$ 2 3 // 4 // Eraser. Secure data removal. For Windows. 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 // 02111-1307, USA. 3 23 4 24 #include "stdafx.h" … … 31 51 void CHotKeyListCtrl::OnLvnItemActivate(NMHDR *pNMHDR, LRESULT *pResult) 32 52 { 33 LPNMITEMACTIVATE pNMIA = reinterpret_cast<LPNMITEMACTIVATE>(pNMHDR);34 53 // TODO: Add your control notification handler code here 35 54 *pResult = 0; -
trunk/HotKeyListCtrl.h
r3 r29 1 // HotKeyListCtrl.h 2 // $Id$ 3 // 4 // Eraser. Secure data removal. For Windows. 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 // 02111-1307, USA. 1 23 #pragma once 2 3 4 // CHotKeyListCtrl5 24 6 25 class CHotKeyListCtrl : public CListCtrl -
trunk/KeyComboDlg.cpp
r26 r29 1 // KeyComboDlg.cpp : implementation file 1 // KeyComboDlg.cpp 2 // $Id$ 2 3 // 4 // Eraser. Secure data removal. For Windows. 5 // Copyright © 1997-2001 Sami Tolvanen (sami@tolvanen.com). 6 // Copyright © 2001-2006 Garrett Trant (support@heidi.ie). 7 // Copyright © 2007 The Eraser Project 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 22 // 02111-1307, USA. 3 23 4 24 #include "stdafx.h" … … 13 33 IMPLEMENT_DYNAMIC(CKeyComboDlg, CDialog) 14 34 CKeyComboDlg::CKeyComboDlg(CString wValue /* ="" */, CString strValName /* ="" */, CWnd* pParent /*=NULL*/) 15 : CDialog(CKeyComboDlg::IDD, pParent), m_strValue(wValue),m_strRegKey(strValName)35 : CDialog(CKeyComboDlg::IDD, pParent), m_strValue(wValue),m_strRegKey(strValName) 16 36 { 17 37 } … … 40 60 { 41 61 CDialog::OnInitDialog(); 42 62 43 63 m_eKey.SetLimitText(1); 44 64 m_eKey.SetWindowText(m_strValue); 45 65 46 66 // TODO: Add extra initialization here 47 67 … … 80 100 if (!strLine.IsEmpty()) 81 101 { 82 CString strTmp(m_strRegKey.MakeUpper());102 CString strTmp(m_strRegKey.MakeUpper()); 83 103 strLine.MakeUpper(); 84 104 if (strTmp.Find(strLine[0]) ==-1 ) {
Note: See TracChangeset
for help on using the changeset viewer.
