rswitch-cvs Mailing List for RsWitch
Status: Alpha
Brought to you by:
bcrochet
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Zak <za...@mu...> - 2001-03-11 03:59:39
|
Hey thrash you still on this thing? :) Well I finally helped out. I basically finished it up to a point where anyone can use it. Fixed the bugs in the dialogs so that they updated correctly, and then modifed the main hot key check to sequence through the list of hot keys. And added saving out to the registry. Seems to all be working at least if you don't try to break it :). w00t! I tagged CVS with the new version and am going to distribute it :) Ref ----- Original Message ----- From: "Zak Phelps" <ref...@us...> To: <rsw...@li...> Sent: Saturday, March 10, 2001 7:57 PM Subject: [RsWitch-cvs] CVS: rswitch RsWitch.rc,1.2,1.3 > Update of /cvsroot/rswitch/rswitch > In directory usw-pr-cvs1:/tmp/cvs-serv12477 > > Modified Files: > RsWitch.rc > Log Message: > incremented the version # to 0.2.0.0 > > Index: RsWitch.rc > =================================================================== > RCS file: /cvsroot/rswitch/rswitch/RsWitch.rc,v > retrieving revision 1.2 > retrieving revision 1.3 > diff -C2 -r1.2 -r1.3 > *** RsWitch.rc 2000/12/03 21:04:13 1.2 > --- RsWitch.rc 2001/03/11 03:57:09 1.3 > *************** > *** 165,170 **** > > VS_VERSION_INFO VERSIONINFO > ! FILEVERSION 0,1,0,1 > ! PRODUCTVERSION 0,1,0,1 > FILEFLAGSMASK 0x3fL > #ifdef _DEBUG > --- 165,170 ---- > > VS_VERSION_INFO VERSIONINFO > ! FILEVERSION 0,2,0,0 > ! PRODUCTVERSION 0,2,0,0 > FILEFLAGSMASK 0x3fL > #ifdef _DEBUG > *************** > *** 184,188 **** > VALUE "CompanyName", "\0" > VALUE "FileDescription", "RsWitch\0" > ! VALUE "FileVersion", "0, 1, 0, 1\0" > VALUE "InternalName", "RsWitch\0" > VALUE "LegalCopyright", "Copyright (C) 2000\0" > --- 184,188 ---- > VALUE "CompanyName", "\0" > VALUE "FileDescription", "RsWitch\0" > ! VALUE "FileVersion", "0, 2, 0, 0\0" > VALUE "InternalName", "RsWitch\0" > VALUE "LegalCopyright", "Copyright (C) 2000\0" > *************** > *** 191,195 **** > VALUE "PrivateBuild", "\0" > VALUE "ProductName", "RsWitch Application\0" > ! VALUE "ProductVersion", "0, 1, 0, 1\0" > VALUE "SpecialBuild", "\0" > END > --- 191,195 ---- > VALUE "PrivateBuild", "\0" > VALUE "ProductName", "RsWitch Application\0" > ! VALUE "ProductVersion", "0, 2, 0, 0\0" > VALUE "SpecialBuild", "\0" > END > > > _______________________________________________ > rswitch-cvs mailing list > rsw...@li... > http://lists.sourceforge.net/lists/listinfo/rswitch-cvs > |
From: Zak P. <ref...@us...> - 2001-03-11 03:55:18
|
Update of /cvsroot/rswitch/rswitch In directory usw-pr-cvs1:/tmp/cvs-serv12477 Modified Files: RsWitch.rc Log Message: incremented the version # to 0.2.0.0 Index: RsWitch.rc =================================================================== RCS file: /cvsroot/rswitch/rswitch/RsWitch.rc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** RsWitch.rc 2000/12/03 21:04:13 1.2 --- RsWitch.rc 2001/03/11 03:57:09 1.3 *************** *** 165,170 **** VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,1,0,1 ! PRODUCTVERSION 0,1,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG --- 165,170 ---- VS_VERSION_INFO VERSIONINFO ! FILEVERSION 0,2,0,0 ! PRODUCTVERSION 0,2,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG *************** *** 184,188 **** VALUE "CompanyName", "\0" VALUE "FileDescription", "RsWitch\0" ! VALUE "FileVersion", "0, 1, 0, 1\0" VALUE "InternalName", "RsWitch\0" VALUE "LegalCopyright", "Copyright (C) 2000\0" --- 184,188 ---- VALUE "CompanyName", "\0" VALUE "FileDescription", "RsWitch\0" ! VALUE "FileVersion", "0, 2, 0, 0\0" VALUE "InternalName", "RsWitch\0" VALUE "LegalCopyright", "Copyright (C) 2000\0" *************** *** 191,195 **** VALUE "PrivateBuild", "\0" VALUE "ProductName", "RsWitch Application\0" ! VALUE "ProductVersion", "0, 1, 0, 1\0" VALUE "SpecialBuild", "\0" END --- 191,195 ---- VALUE "PrivateBuild", "\0" VALUE "ProductName", "RsWitch Application\0" ! VALUE "ProductVersion", "0, 2, 0, 0\0" VALUE "SpecialBuild", "\0" END |
From: Zak P. <ref...@us...> - 2001-03-11 03:50:59
|
Update of /cvsroot/rswitch/rswitch In directory usw-pr-cvs1:/tmp/cvs-serv12061 Modified Files: MainConfigDlg.cpp AddEditDlg.cpp Log Message: many changes - fixed the editing of channels, and added saving to the registry Index: MainConfigDlg.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainConfigDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MainConfigDlg.cpp 2000/12/05 05:42:36 1.2 --- MainConfigDlg.cpp 2001/03/11 03:52:50 1.3 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.3 2001/03/11 03:52:50 refinersfire + // many changes - fixed the editing of channels, and added saving to the registry + // // Revision 1.2 2000/12/05 05:42:36 bcrochet // * Added member pointer to hotkeylist *************** *** 85,107 **** m_pHotKeyList = &(GetMainFrame()->GetHotKeyList()); ! HotKeyList::iterator i; ! for ( i = m_pHotKeyList->begin(); i != m_pHotKeyList->end(); i++ ) { LV_ITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; ! lvItem.iItem = 0; lvItem.iSubItem = 0; - //CString modString = GetModifierString( (*i).GetModifiers() ); - //CString virtString = GetVirtKeyString( (*i).GetVirtKey() ); - //modString += " + "; - //modString += virtString; - //lvItem.pszText = ToLpstr( modString ); lvItem.pszText = LPSTR_TEXTCALLBACK; ! lvItem.lParam = (LPARAM)m_pHotKeyList->size() - 1; ! m_ctrlHotkeyList.InsertItem(&lvItem); ! lvItem.iSubItem = 1; ! //lvItem.pszText = ToLpstr( (*i).GetServerName() + "/" + (*i).GetChannelName() ); lvItem.pszText = LPSTR_TEXTCALLBACK; ! m_ctrlHotkeyList.SetItem(&lvItem); } --- 88,109 ---- m_pHotKeyList = &(GetMainFrame()->GetHotKeyList()); ! ! long listSize = m_pHotKeyList->size(); ! ! for (long i = 0; i < listSize; i++ ) { LV_ITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; ! lvItem.iItem = i; lvItem.iSubItem = 0; lvItem.pszText = LPSTR_TEXTCALLBACK; ! lvItem.lParam = (LPARAM)i; ! ! m_ctrlHotkeyList.InsertItem(&lvItem); ! ! lvItem.iSubItem = 1; lvItem.pszText = LPSTR_TEXTCALLBACK; ! ! m_ctrlHotkeyList.SetItem(&lvItem); } *************** *** 154,177 **** CHotKeyEntry newEntry( dlg.m_wModifiers, dlg.m_wVirtualKeyCode, dlg.m_sServerName, dlg.m_sChannel ); m_pHotKeyList->push_back( newEntry ); LV_ITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = m_ctrlHotkeyList.GetItemCount(); lvItem.iSubItem = 0; - //CString modString = GetModifierString( dlg.m_wModifiers ); - //CString virtString = GetVirtKeyString( dlg.m_wVirtualKeyCode ); - //modString += " + "; - //modString += virtString; - //lvItem.pszText = ToLpstr( modString ); lvItem.pszText = LPSTR_TEXTCALLBACK; lvItem.lParam = (LPARAM)m_pHotKeyList->size() - 1; m_ctrlHotkeyList.InsertItem(&lvItem); lvItem.iSubItem = 1; - //CString ipaddr; - //ipaddr.Format( "%s %s/%s", - // dlg.m_sFunction, - // dlg.m_sServerName, - // dlg.m_sChannel - // ); - //lvItem.pszText = ToLpstr( ipaddr ); lvItem.pszText = LPSTR_TEXTCALLBACK; m_ctrlHotkeyList.SetItem(&lvItem); --- 156,169 ---- CHotKeyEntry newEntry( dlg.m_wModifiers, dlg.m_wVirtualKeyCode, dlg.m_sServerName, dlg.m_sChannel ); m_pHotKeyList->push_back( newEntry ); + LV_ITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = m_ctrlHotkeyList.GetItemCount(); lvItem.iSubItem = 0; lvItem.pszText = LPSTR_TEXTCALLBACK; lvItem.lParam = (LPARAM)m_pHotKeyList->size() - 1; m_ctrlHotkeyList.InsertItem(&lvItem); + lvItem.iSubItem = 1; lvItem.pszText = LPSTR_TEXTCALLBACK; m_ctrlHotkeyList.SetItem(&lvItem); *************** *** 187,190 **** --- 179,183 ---- return; } + CHotKeyEntry& entry = (*m_pHotKeyList)[m_ctrlHotkeyList.GetNextSelectedItem( pos )]; CAddEditDlg dlg(_T("Edit Hotkey"), entry ); *************** *** 193,197 **** --- 186,196 ---- entry.SetChannelName( dlg.m_sChannel ); entry.SetServerName( dlg.m_sServerName ); + entry.SetModifiers(dlg.m_wModifiers); + entry.SetVirtKey(dlg.m_wVirtualKeyCode); + //TODO: Type doesn't work yet + // entry.SetHotKeyType(dlg.m_sChannel); + m_ctrlHotkeyList.Update(m_ctrlHotkeyList.GetNextSelectedItem(pos)); } + } Index: AddEditDlg.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/AddEditDlg.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** AddEditDlg.cpp 2000/12/05 05:45:12 1.2 --- AddEditDlg.cpp 2001/03/11 03:52:50 1.3 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.3 2001/03/11 03:52:50 refinersfire + // many changes - fixed the editing of channels, and added saving to the registry + // // Revision 1.2 2000/12/05 05:45:12 bcrochet // Too many to list. *************** *** 63,66 **** --- 66,71 ---- //}}AFX_DATA_INIT m_sTitle = title; + m_wVirtualKeyCode = hotKeyEntry.GetVirtKey(); + m_wModifiers = hotKeyEntry.GetModifiers(); } *************** *** 108,116 **** CDialog::OnInitDialog(); ! GetMainFrame()->EnableAllHotkeys(false); SetWindowText( m_sTitle ); m_ctrlFunction.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE --- 113,123 ---- CDialog::OnInitDialog(); ! //GetMainFrame()->EnableAllHotkeys(false); SetWindowText( m_sTitle ); m_ctrlFunction.SetCurSel(0); + m_ctrlHotkey.SetHotKey(m_wVirtualKeyCode, m_wModifiers); + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE *************** *** 120,124 **** { m_ctrlHotkey.GetHotKey( m_wVirtualKeyCode, m_wModifiers ); ! GetMainFrame()->EnableAllHotkeys(true); CDialog::OnOK(); --- 127,131 ---- { m_ctrlHotkey.GetHotKey( m_wVirtualKeyCode, m_wModifiers ); ! //GetMainFrame()->EnableAllHotkeys(true); CDialog::OnOK(); |
From: Zak P. <ref...@us...> - 2001-03-11 03:50:36
|
Update of /cvsroot/rswitch/rswitch In directory usw-pr-cvs1:/tmp/cvs-serv12013 Modified Files: MainFrm.cpp Log Message: many changes - fixed the editing of channels, and added saving to the registry Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainFrm.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** MainFrm.cpp 2000/12/03 21:18:52 1.2 --- MainFrm.cpp 2001/03/11 03:52:27 1.3 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.3 2001/03/11 03:52:27 refinersfire + // many changes - fixed the editing of channels, and added saving to the registry + // // Revision 1.2 2000/12/03 21:18:52 bcrochet // * Added ReadHotKeyListFromRegistry *************** *** 91,128 **** void CMainFrame::EnableAllHotkeys(bool bEnable) { ! if ( bEnable ) ! { ! if ( RegisterHotKey( m_hWnd, 0x01, MOD_CONTROL, ALLHANDS ) == 0 ) ! { ! printf( "Hot key creation failed! (1)\n" ); ! } ! if ( RegisterHotKey( m_hWnd, 0x02, MOD_CONTROL, OFFENSE ) == 0 ) ! { ! printf( "Hot key creation failed! (2)\n" ); ! } ! if ( RegisterHotKey( m_hWnd, 0x03, MOD_CONTROL, DEFENSE ) == 0 ) ! { ! printf( "Hot key creation failed! (3)\n" ); ! } ! } ! else ! { ! UnregisterHotKey( m_hWnd, 0x01 ); ! UnregisterHotKey( m_hWnd, 0x02 ); ! UnregisterHotKey( m_hWnd, 0x03 ); ! } } boolean CMainFrame::ReadHotKeyListFromRegistry( HotKeyList& hkList ) { ! CHotKeyEntry* pHotKey = new CHotKeyEntry( HOTKEYF_CONTROL, (WORD)'C', "rw.clantmp.org", "d" ); ! hkList.push_back( *pHotKey ); ! delete pHotKey; ! return true; } boolean CMainFrame::WriteHotKeyListToRegistry( HotKeyList& hkList ) { ! return true; } --- 94,220 ---- void CMainFrame::EnableAllHotkeys(bool bEnable) { ! long listSize = m_hkList.size(); ! ! if ( bEnable ) ! { ! for(long i=0; i < listSize; i++) ! { ! if ( RegisterHotKey( m_hWnd, i, m_hkList[i].GetModifiers(), m_hkList[i].GetVirtKey() ) == 0 ) ! { ! printf( "Hot key creation failed!\n" ); ! } ! } ! } ! else ! { ! for(long i=0; i < listSize; i++) ! { ! UnregisterHotKey( m_hWnd, i); ! } ! } } boolean CMainFrame::ReadHotKeyListFromRegistry( HotKeyList& hkList ) { ! HKEY hKey; ! ! CString baseKey = "Software\\RsWitch"; ! char keyName[MAX_PATH]; ! ! if( RegOpenKeyEx( HKEY_LOCAL_MACHINE, baseKey, 0, KEY_ALL_ACCESS, &hKey ) == ERROR_SUCCESS ) ! { ! for(long i=0; RegEnumKey(hKey, i, keyName, MAX_PATH) == ERROR_SUCCESS; i++) ! { ! HKEY subKey; ! ! if(RegOpenKeyEx(hKey, keyName, 0, KEY_ALL_ACCESS, &subKey) == ERROR_SUCCESS) ! { ! DWORD size; ! DWORD keyType; ! ! DWORD modifier; ! size = 4; ! RegQueryValueEx(subKey, "modifier", NULL, &keyType, (unsigned char*)&modifier, &size); ! ! DWORD virtKey; ! size = 4; ! RegQueryValueEx(subKey, "virtKey", NULL, &keyType, (unsigned char*)&virtKey, &size); ! ! CHotKeyEntry::EHotKeyType type; ! size = 4; ! RegQueryValueEx(subKey, "type", NULL, &keyType, (unsigned char*)&type, &size); ! ! char servername[MAX_PATH]; ! size = MAX_PATH; ! RegQueryValueEx(subKey, "servername", NULL, &keyType, (unsigned char*)servername, &size); ! ! char channel[MAX_PATH]; ! size = MAX_PATH; ! RegQueryValueEx(subKey, "channel", NULL, &keyType, (unsigned char*)channel, &size); ! ! hkList.push_back( CHotKeyEntry( modifier, virtKey, servername, channel) ); ! ! RegCloseKey(subKey); ! } ! } ! ! RegCloseKey(hKey); ! } ! ! return true; } boolean CMainFrame::WriteHotKeyListToRegistry( HotKeyList& hkList ) { ! HKEY hKey; ! CString baseKey = "Software\\RsWitch\\"; ! ! long listSize = hkList.size(); ! ! CString key; ! ! for(long i=0; i<listSize; i++) ! { ! key.Format(_T("%s%d"), baseKey,i); ! ! if(RegOpenKeyEx( HKEY_LOCAL_MACHINE, key, 0, KEY_ALL_ACCESS, &hKey ) != ERROR_SUCCESS ) ! { ! RegCreateKey( HKEY_LOCAL_MACHINE, key, &hKey); ! } ! ! DWORD modifier= hkList[i].GetModifiers(); ! RegSetValueEx(hKey, "modifier", NULL, REG_DWORD, (unsigned char*)&modifier, sizeof(modifier)); ! ! DWORD virtKey= hkList[i].GetVirtKey(); ! RegSetValueEx(hKey, "virtKey", NULL, REG_DWORD, (unsigned char*)&virtKey, sizeof(virtKey)); ! ! CHotKeyEntry::EHotKeyType type = hkList[i].GetHotKeyType(); ! RegSetValueEx(hKey, "type", NULL, REG_DWORD, (unsigned char*)&type, sizeof(type)); ! ! CString servername = hkList[i].GetServerName(); ! RegSetValueEx(hKey, "servername", NULL, REG_SZ, (unsigned char*)(LPCTSTR)servername, servername.GetLength()+1); ! ! CString channel = hkList[i].GetChannelName(); ! RegSetValueEx(hKey, "channel", NULL, REG_SZ, (unsigned char*)(LPCTSTR)channel, channel.GetLength()+1); ! ! RegCloseKey(hKey); ! } ! ! //Delete off all extra keys ! ! key.Format(_T("%s%d"), baseKey,i); ! ! while( RegOpenKeyEx( HKEY_LOCAL_MACHINE, key, 0, KEY_ALL_ACCESS, &hKey ) == ERROR_SUCCESS ) ! { ! RegCloseKey(hKey); ! RegOpenKeyEx( HKEY_LOCAL_MACHINE, baseKey, 0, KEY_ALL_ACCESS, &hKey); ! RegDeleteKey(hKey, CString(i)); ! RegCloseKey(hKey); ! ! i++; ! key.Format(_T("%s%d"), baseKey,i); ! } ! ! return true; } *************** *** 310,356 **** LRESULT CMainFrame::OnHotkey(WPARAM wParam, LPARAM lParam) { ! if ( LOWORD( lParam ) == MOD_CONTROL ) ! { ! if ( HIWORD( lParam ) == ALLHANDS ) ! { ! NOTIFYICONDATA nid; ! nid.cbSize = sizeof( NOTIFYICONDATA ); ! nid.hWnd = m_hWnd; ! nid.uID = 0x1000; ! nid.uFlags = NIF_TIP; ! lstrcpyn( nid.szTip, "RsWitch - All Hands", sizeof( "RsWitch - All Hands" ) ); ! ! Shell_NotifyIcon( NIM_MODIFY, &nid ); ! ! JoinRogerWilcoChannel( CString("12.25.192.166"), CString("A"), CString("") ); ! } ! else if ( HIWORD( lParam ) == OFFENSE ) ! { ! NOTIFYICONDATA nid; ! nid.cbSize = sizeof( NOTIFYICONDATA ); ! nid.hWnd = m_hWnd; ! nid.uID = 0x1000; ! nid.uFlags = NIF_TIP; ! lstrcpyn( nid.szTip, "RsWitch - Offense", sizeof( "RsWitch - Offense" ) ); ! ! Shell_NotifyIcon( NIM_MODIFY, &nid ); ! ! JoinRogerWilcoChannel( CString("12.25.192.166"), CString("O"), CString("") ); ! } ! else if ( HIWORD( lParam ) == DEFENSE ) ! { ! NOTIFYICONDATA nid; ! nid.cbSize = sizeof( NOTIFYICONDATA ); ! nid.hWnd = m_hWnd; ! nid.uID = 0x1000; ! nid.uFlags = NIF_TIP; ! lstrcpyn( nid.szTip, "RsWitch - Defense", sizeof( "RsWitch - Defense" ) ); ! ! Shell_NotifyIcon( NIM_MODIFY, &nid ); ! ! JoinRogerWilcoChannel( CString("12.25.192.166"), CString("D"), CString("") ); ! } ! } ! return 0; } --- 402,426 ---- LRESULT CMainFrame::OnHotkey(WPARAM wParam, LPARAM lParam) { ! //look for a key sequence we may have in list ! HotKeyList::iterator i; ! ! for(i=m_hkList.begin(); i != m_hkList.end(); i++) ! { ! if ( LOWORD( lParam ) == i->GetModifiers() && HIWORD( lParam ) == i->GetVirtKey() ) ! { ! NOTIFYICONDATA nid; ! nid.cbSize = sizeof( NOTIFYICONDATA ); ! nid.hWnd = m_hWnd; ! nid.uID = 0x1000; ! nid.uFlags = NIF_TIP; ! lstrcpyn( nid.szTip, "RsWitch - All Hands", sizeof( "RsWitch - All Hands" ) ); ! ! Shell_NotifyIcon( NIM_MODIFY, &nid ); ! ! JoinRogerWilcoChannel( i->GetServerName(), i->GetChannelName(), CString("") ); ! } ! } ! ! return 0; } *************** *** 407,412 **** void CMainFrame::OnProperties() { ! CMainConfigDlg dlg; ! dlg.DoModal(); } --- 477,485 ---- void CMainFrame::OnProperties() { ! EnableAllHotkeys(false); ! CMainConfigDlg dlg; ! dlg.DoModal(); ! WriteHotKeyListToRegistry(m_hkList); ! EnableAllHotkeys(true); } |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:47:28
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6730 Modified Files: .cvsignore Log Message: New ignores. Index: .cvsignore =================================================================== RCS file: /cvsroot/rswitch/rswitch/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** .cvsignore 2000/11/01 16:02:56 1.1 --- .cvsignore 2000/12/05 05:47:26 1.2 *************** *** 2,3 **** --- 2,6 ---- *.ncb *.opt + *.aps + *.clw + *.plg \ No newline at end of file |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:45:52
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6660 Modified Files: AddEditDlg.h Log Message: Too many to list. Index: AddEditDlg.h =================================================================== RCS file: /cvsroot/rswitch/rswitch/AddEditDlg.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** AddEditDlg.h 2000/11/01 15:10:17 1.1.1.1 --- AddEditDlg.h 2000/12/05 05:45:50 1.2 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.2 2000/12/05 05:45:50 bcrochet + // Too many to list. + // // Revision 1.1.1.1 2000/11/01 15:10:17 bcrochet // Initial revision and import *************** *** 39,66 **** // Construction public: ! CAddEditDlg(CString title, CWnd* pParent = NULL); // standard constructor - DWORD m_dwIpAddr; WORD m_wVirtualKeyCode; WORD m_wModifiers; // Dialog Data ! //{{AFX_DATA(CAddEditDlg) ! enum { IDD = IDD_ADD_EDIT_DLG }; ! CComboBox m_ctrlFunction; ! CEdit m_ctrlChannel; ! CIPAddressCtrl m_ctrlServerIP; ! CHotKeyCtrl m_ctrlHotkey; ! CString m_sChannel; ! CString m_sFunction; ! //}}AFX_DATA // Overrides ! // ClassWizard generated virtual function overrides ! //{{AFX_VIRTUAL(CAddEditDlg) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support ! //}}AFX_VIRTUAL // Implementation --- 42,70 ---- // Construction public: ! CAddEditDlg(CString title, CWnd* pParent = NULL); // standard constructor ! CAddEditDlg(CString title, CHotKeyEntry hotKeyEntry, CWnd* pParent = NULL); WORD m_wVirtualKeyCode; WORD m_wModifiers; // Dialog Data ! //{{AFX_DATA(CAddEditDlg) ! enum { IDD = IDD_ADD_EDIT_DLG }; ! CEdit m_ctrlServerName; ! CComboBox m_ctrlFunction; ! CEdit m_ctrlChannel; ! CHotKeyCtrl m_ctrlHotkey; ! CString m_sChannel; ! CString m_sFunction; ! CString m_sServerName; ! //}}AFX_DATA // Overrides ! // ClassWizard generated virtual function overrides ! //{{AFX_VIRTUAL(CAddEditDlg) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support ! //}}AFX_VIRTUAL // Implementation *************** *** 69,78 **** // Generated message map functions ! //{{AFX_MSG(CAddEditDlg) ! afx_msg void OnSelchangeFunction(); ! virtual BOOL OnInitDialog(); ! virtual void OnOK(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() }; --- 73,82 ---- // Generated message map functions ! //{{AFX_MSG(CAddEditDlg) ! afx_msg void OnSelchangeFunction(); ! virtual BOOL OnInitDialog(); ! virtual void OnOK(); ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() }; |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:45:16
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6591 Modified Files: AddEditDlg.cpp Log Message: Too many to list. Index: AddEditDlg.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/AddEditDlg.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** AddEditDlg.cpp 2000/11/01 15:10:16 1.1.1.1 --- AddEditDlg.cpp 2000/12/05 05:45:12 1.2 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.2 2000/12/05 05:45:12 bcrochet + // Too many to list. + // // Revision 1.1.1.1 2000/11/01 15:10:16 bcrochet // Initial revision and import *************** *** 41,73 **** CAddEditDlg::CAddEditDlg(CString title, CWnd* pParent /*=NULL*/) ! : CDialog(CAddEditDlg::IDD, pParent) { ! //{{AFX_DATA_INIT(CAddEditDlg) ! m_sChannel = _T(""); ! m_sFunction = _T(""); ! //}}AFX_DATA_INIT m_sTitle = title; } void CAddEditDlg::DoDataExchange(CDataExchange* pDX) { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(CAddEditDlg) ! DDX_Control(pDX, IDC_FUNCTION, m_ctrlFunction); ! DDX_Control(pDX, IDC_CHANNEL, m_ctrlChannel); ! DDX_Control(pDX, IDC_SERVERIP, m_ctrlServerIP); ! DDX_Control(pDX, IDC_HOTKEY, m_ctrlHotkey); ! DDX_Text(pDX, IDC_CHANNEL, m_sChannel); ! DDV_MaxChars(pDX, m_sChannel, 5); ! DDX_CBString(pDX, IDC_FUNCTION, m_sFunction); ! //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAddEditDlg, CDialog) ! //{{AFX_MSG_MAP(CAddEditDlg) ! ON_CBN_SELCHANGE(IDC_FUNCTION, OnSelchangeFunction) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 44,88 ---- CAddEditDlg::CAddEditDlg(CString title, CWnd* pParent /*=NULL*/) ! : CDialog(CAddEditDlg::IDD, pParent) { ! //{{AFX_DATA_INIT(CAddEditDlg) ! m_sChannel = _T(""); ! m_sFunction = _T(""); ! m_sServerName = _T(""); ! //}}AFX_DATA_INIT m_sTitle = title; } + CAddEditDlg::CAddEditDlg(CString title, CHotKeyEntry hotKeyEntry, CWnd* pParent /*=NULL*/) + : CDialog(CAddEditDlg::IDD, pParent) + { + //{{AFX_DATA_INIT(CAddEditDlg) + m_sChannel = hotKeyEntry.GetChannelName(); + m_sFunction = _T(""); + m_sServerName = hotKeyEntry.GetServerName(); + //}}AFX_DATA_INIT + m_sTitle = title; + } void CAddEditDlg::DoDataExchange(CDataExchange* pDX) { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(CAddEditDlg) ! DDX_Control(pDX, IDC_SERVERNAME, m_ctrlServerName); ! DDX_Control(pDX, IDC_FUNCTION, m_ctrlFunction); ! DDX_Control(pDX, IDC_CHANNEL, m_ctrlChannel); ! DDX_Control(pDX, IDC_HOTKEY, m_ctrlHotkey); ! DDX_Text(pDX, IDC_CHANNEL, m_sChannel); ! DDV_MaxChars(pDX, m_sChannel, 5); ! DDX_CBString(pDX, IDC_FUNCTION, m_sFunction); ! DDX_Text(pDX, IDC_SERVERNAME, m_sServerName); ! //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAddEditDlg, CDialog) ! //{{AFX_MSG_MAP(CAddEditDlg) ! ON_CBN_SELCHANGE(IDC_FUNCTION, OnSelchangeFunction) ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 79,88 **** if ( m_ctrlFunction.GetCurSel() == 0 ) { ! m_ctrlServerIP.EnableWindow(); m_ctrlChannel.EnableWindow(); } else { ! m_ctrlServerIP.EnableWindow(false); m_ctrlChannel.EnableWindow(false); } --- 94,103 ---- if ( m_ctrlFunction.GetCurSel() == 0 ) { ! m_ctrlServerName.EnableWindow(); m_ctrlChannel.EnableWindow(); } else { ! m_ctrlServerName.EnableWindow(false); m_ctrlChannel.EnableWindow(false); } *************** *** 91,95 **** BOOL CAddEditDlg::OnInitDialog() { ! CDialog::OnInitDialog(); GetMainFrame()->EnableAllHotkeys(false); --- 106,110 ---- BOOL CAddEditDlg::OnInitDialog() { ! CDialog::OnInitDialog(); GetMainFrame()->EnableAllHotkeys(false); *************** *** 98,111 **** m_ctrlFunction.SetCurSel(0); ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE } void CAddEditDlg::OnOK() { - m_ctrlServerIP.GetAddress( m_dwIpAddr ); m_ctrlHotkey.GetHotKey( m_wVirtualKeyCode, m_wModifiers ); ! GetMainFrame()->EnableAllHotkeys(true); ! CDialog::OnOK(); } --- 113,125 ---- m_ctrlFunction.SetCurSel(0); ! return TRUE; // return TRUE unless you set the focus to a control ! // EXCEPTION: OCX Property Pages should return FALSE } void CAddEditDlg::OnOK() { m_ctrlHotkey.GetHotKey( m_wVirtualKeyCode, m_wModifiers ); ! GetMainFrame()->EnableAllHotkeys(true); ! CDialog::OnOK(); } |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:44:35
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6529 Modified Files: RsWitch.dsp Log Message: Added HotKeyEntry.[cpp|h] Index: RsWitch.dsp =================================================================== RCS file: /cvsroot/rswitch/rswitch/RsWitch.dsp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** RsWitch.dsp 2000/11/01 15:10:17 1.1.1.1 --- RsWitch.dsp 2000/12/05 05:44:32 1.2 *************** *** 95,98 **** --- 95,102 ---- # Begin Source File + SOURCE=.\HotKeyEntry.cpp + # End Source File + # Begin Source File + SOURCE=.\MainConfigDlg.cpp # End Source File *************** *** 121,124 **** --- 125,132 ---- SOURCE=.\AddEditDlg.h + # End Source File + # Begin Source File + + SOURCE=.\HotKeyEntry.h # End Source File # Begin Source File |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:44:08
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6494 Modified Files: RsWitch.cpp Log Message: Reformatting. Index: RsWitch.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/RsWitch.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** RsWitch.cpp 2000/11/01 15:10:18 1.1.1.1 --- RsWitch.cpp 2000/12/05 05:44:06 1.2 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.2 2000/12/05 05:44:06 bcrochet + // Reformatting. + // // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet // Initial revision and import *************** *** 41,49 **** BEGIN_MESSAGE_MAP(CRsWitchApp, CWinApp) ! //{{AFX_MSG_MAP(CRsWitchApp) ! ON_COMMAND(ID_APP_ABOUT, OnAppAbout) ! // NOTE - the ClassWizard will add and remove mapping macros here. ! // DO NOT EDIT what you see in these blocks of generated code! ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 44,52 ---- BEGIN_MESSAGE_MAP(CRsWitchApp, CWinApp) ! //{{AFX_MSG_MAP(CRsWitchApp) ! ON_COMMAND(ID_APP_ABOUT, OnAppAbout) ! // NOTE - the ClassWizard will add and remove mapping macros here. ! // DO NOT EDIT what you see in these blocks of generated code! ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 53,58 **** CRsWitchApp::CRsWitchApp() { ! // TODO: add construction code here, ! // Place all significant initialization in InitInstance } --- 56,61 ---- CRsWitchApp::CRsWitchApp() { ! // TODO: add construction code here, ! // Place all significant initialization in InitInstance } *************** *** 67,104 **** BOOL CRsWitchApp::InitInstance() { ! // Standard initialization ! // If you are not using these features and wish to reduce the size ! // of your final executable, you should remove from the following ! // the specific initialization routines you do not need. #ifdef _AFXDLL ! Enable3dControls(); // Call this when using MFC in a shared DLL #else ! Enable3dControlsStatic(); // Call this when linking to MFC statically #endif - - // Change the registry key under which our settings are stored. - // TODO: You should modify this string to be something appropriate - // such as the name of your company or organization. - SetRegistryKey(IDS_REGISTRY_KEY); - // To create the main window, this code creates a new frame window - // object and then sets it as the application's main window object. ! CMainFrame* pFrame = new CMainFrame; ! m_pMainWnd = pFrame; ! // create and load the frame with its resources ! pFrame->LoadFrame(IDR_MAINFRAME, ! WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, ! NULL); ! // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(SW_HIDE); pFrame->UpdateWindow(); ! return TRUE; } --- 70,107 ---- BOOL CRsWitchApp::InitInstance() { ! // Standard initialization ! // If you are not using these features and wish to reduce the size ! // of your final executable, you should remove from the following ! // the specific initialization routines you do not need. #ifdef _AFXDLL ! Enable3dControls(); // Call this when using MFC in a shared DLL #else ! Enable3dControlsStatic(); // Call this when linking to MFC statically #endif + // Change the registry key under which our settings are stored. + // TODO: You should modify this string to be something appropriate + // such as the name of your company or organization. + SetRegistryKey(IDS_REGISTRY_KEY); ! // To create the main window, this code creates a new frame window ! // object and then sets it as the application's main window object. ! CMainFrame* pFrame = new CMainFrame; ! m_pMainWnd = pFrame; ! // create and load the frame with its resources ! ! pFrame->LoadFrame(IDR_MAINFRAME, ! WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, ! NULL); ! // The one and only window has been initialized, so show and update it. pFrame->ShowWindow(SW_HIDE); pFrame->UpdateWindow(); ! return TRUE; } *************** *** 116,157 **** { public: ! CAboutDlg(); // Dialog Data ! //{{AFX_DATA(CAboutDlg) ! enum { IDD = IDD_ABOUTBOX }; ! //}}AFX_DATA ! ! // ClassWizard generated virtual function overrides ! //{{AFX_VIRTUAL(CAboutDlg) ! protected: ! virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support ! //}}AFX_VIRTUAL // Implementation protected: ! //{{AFX_MSG(CAboutDlg) ! // No message handlers ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { ! //{{AFX_DATA_INIT(CAboutDlg) ! //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(CAboutDlg) ! //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) ! //{{AFX_MSG_MAP(CAboutDlg) ! // No message handlers ! //}}AFX_MSG_MAP END_MESSAGE_MAP() --- 119,160 ---- { public: ! CAboutDlg(); // Dialog Data ! //{{AFX_DATA(CAboutDlg) ! enum { IDD = IDD_ABOUTBOX }; ! //}}AFX_DATA + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + // Implementation protected: ! //{{AFX_MSG(CAboutDlg) ! // No message handlers ! //}}AFX_MSG ! DECLARE_MESSAGE_MAP() }; CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) { ! //{{AFX_DATA_INIT(CAboutDlg) ! //}}AFX_DATA_INIT } void CAboutDlg::DoDataExchange(CDataExchange* pDX) { ! CDialog::DoDataExchange(pDX); ! //{{AFX_DATA_MAP(CAboutDlg) ! //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) ! //{{AFX_MSG_MAP(CAboutDlg) ! // No message handlers ! //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 159,164 **** void CRsWitchApp::OnAppAbout() { ! CAboutDlg aboutDlg; ! aboutDlg.DoModal(); } --- 162,167 ---- void CRsWitchApp::OnAppAbout() { ! CAboutDlg aboutDlg; ! aboutDlg.DoModal(); } *************** *** 169,172 **** int CRsWitchApp::ExitInstance() { ! return CWinApp::ExitInstance(); } --- 172,175 ---- int CRsWitchApp::ExitInstance() { ! return CWinApp::ExitInstance(); } |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:43:25
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6443 Added Files: HotKeyEntry.cpp HotKeyEntry.h Log Message: * First major revision. * Created main class. ***** Error reading new file: (2, 'No such file or directory') ***** Error reading new file: (2, 'No such file or directory') |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:42:47
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6406 Modified Files: MainConfigDlg.cpp Log Message: * Added member pointer to hotkeylist * Added OnGetdispinfoHotkeylist * Too many others to list. Index: MainConfigDlg.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainConfigDlg.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** MainConfigDlg.cpp 2000/11/01 15:10:17 1.1.1.1 --- MainConfigDlg.cpp 2000/12/05 05:42:36 1.2 *************** *** 19,22 **** --- 19,27 ---- // $Log$ + // Revision 1.2 2000/12/05 05:42:36 bcrochet + // * Added member pointer to hotkeylist + // * Added OnGetdispinfoHotkeylist + // * Too many others to list. + // // Revision 1.1.1.1 2000/11/01 15:10:17 bcrochet // Initial revision and import *************** *** 63,66 **** --- 68,72 ---- ON_BN_CLICKED(IDC_ADD, OnAdd) ON_BN_CLICKED(IDC_EDIT, OnEdit) + ON_NOTIFY(LVN_GETDISPINFO, IDC_HOTKEYLIST, OnGetdispinfoHotkeylist) //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 78,81 **** --- 84,109 ---- m_ctrlHotkeyList.SetColumnWidth(1, LVSCW_AUTOSIZE_USEHEADER); + m_pHotKeyList = &(GetMainFrame()->GetHotKeyList()); + HotKeyList::iterator i; + for ( i = m_pHotKeyList->begin(); i != m_pHotKeyList->end(); i++ ) + { + LV_ITEM lvItem; + lvItem.mask = LVIF_TEXT | LVIF_PARAM; + lvItem.iItem = 0; + lvItem.iSubItem = 0; + //CString modString = GetModifierString( (*i).GetModifiers() ); + //CString virtString = GetVirtKeyString( (*i).GetVirtKey() ); + //modString += " + "; + //modString += virtString; + //lvItem.pszText = ToLpstr( modString ); + lvItem.pszText = LPSTR_TEXTCALLBACK; + lvItem.lParam = (LPARAM)m_pHotKeyList->size() - 1; + m_ctrlHotkeyList.InsertItem(&lvItem); + lvItem.iSubItem = 1; + //lvItem.pszText = ToLpstr( (*i).GetServerName() + "/" + (*i).GetChannelName() ); + lvItem.pszText = LPSTR_TEXTCALLBACK; + m_ctrlHotkeyList.SetItem(&lvItem); + } + m_ctrlHotkeyList.SetExtendedStyle( m_ctrlHotkeyList.GetExtendedStyle() | LVS_EX_FULLROWSELECT ); *************** *** 124,149 **** if ( dlg.DoModal() == IDOK ) { LV_ITEM lvItem; ! lvItem.mask = LVIF_TEXT; ! lvItem.iItem = 0; lvItem.iSubItem = 0; ! CString modString = GetModifierString( dlg.m_wModifiers ); ! CString virtString = GetVirtKeyString( dlg.m_wVirtualKeyCode ); ! modString += " + "; ! modString += virtString; ! lvItem.pszText = ToLpstr( modString ); m_ctrlHotkeyList.InsertItem(&lvItem); lvItem.iSubItem = 1; ! CString ipaddr; ! DWORD ipAddr = dlg.m_dwIpAddr; ! ipaddr.Format( "%s %d.%d.%d.%d/%s", ! dlg.m_sFunction, ! FIRST_IPADDRESS(ipAddr), ! SECOND_IPADDRESS(ipAddr), ! THIRD_IPADDRESS(ipAddr), ! FOURTH_IPADDRESS(ipAddr), ! dlg.m_sChannel ! ); ! lvItem.pszText = ToLpstr( ipaddr ); m_ctrlHotkeyList.SetItem(&lvItem); } --- 152,178 ---- if ( dlg.DoModal() == IDOK ) { + CHotKeyEntry newEntry( dlg.m_wModifiers, dlg.m_wVirtualKeyCode, dlg.m_sServerName, dlg.m_sChannel ); + m_pHotKeyList->push_back( newEntry ); LV_ITEM lvItem; ! lvItem.mask = LVIF_TEXT | LVIF_PARAM; ! lvItem.iItem = m_ctrlHotkeyList.GetItemCount(); lvItem.iSubItem = 0; ! //CString modString = GetModifierString( dlg.m_wModifiers ); ! //CString virtString = GetVirtKeyString( dlg.m_wVirtualKeyCode ); ! //modString += " + "; ! //modString += virtString; ! //lvItem.pszText = ToLpstr( modString ); ! lvItem.pszText = LPSTR_TEXTCALLBACK; ! lvItem.lParam = (LPARAM)m_pHotKeyList->size() - 1; m_ctrlHotkeyList.InsertItem(&lvItem); lvItem.iSubItem = 1; ! //CString ipaddr; ! //ipaddr.Format( "%s %s/%s", ! // dlg.m_sFunction, ! // dlg.m_sServerName, ! // dlg.m_sChannel ! // ); ! //lvItem.pszText = ToLpstr( ipaddr ); ! lvItem.pszText = LPSTR_TEXTCALLBACK; m_ctrlHotkeyList.SetItem(&lvItem); } *************** *** 152,160 **** void CMainConfigDlg::OnEdit() { ! CAddEditDlg dlg(_T("Edit Hotkey")); ! dlg.DoModal(); } --- 181,219 ---- void CMainConfigDlg::OnEdit() { ! POSITION pos = m_ctrlHotkeyList.GetFirstSelectedItemPosition(); ! if ( pos == NULL ) ! { ! AfxMessageBox( "Please select an item before pressing the Edit button." ); ! return; ! } ! CHotKeyEntry& entry = (*m_pHotKeyList)[m_ctrlHotkeyList.GetNextSelectedItem( pos )]; ! CAddEditDlg dlg(_T("Edit Hotkey"), entry ); ! if ( dlg.DoModal() == IDOK ) ! { ! entry.SetChannelName( dlg.m_sChannel ); ! entry.SetServerName( dlg.m_sServerName ); ! } } + void CMainConfigDlg::OnGetdispinfoHotkeylist(NMHDR* pNMHDR, LRESULT* pResult) + { + LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR; + CString str; + switch ( pDispInfo->item.iSubItem ) + { + case 0: + str.Format( "%s + %s", GetModifierString( (*m_pHotKeyList)[pDispInfo->item.lParam].GetModifiers( ) ), + GetVirtKeyString( (*m_pHotKeyList)[pDispInfo->item.lParam].GetVirtKey( ) ) ); + break; + case 1: + str.Format( "%s/%s", (*m_pHotKeyList)[pDispInfo->item.lParam].GetServerName(), + (*m_pHotKeyList)[pDispInfo->item.lParam].GetChannelName() ); + break; + } + lstrcpyn( pDispInfo->item.pszText, str, str.GetLength() + 1 ); + + *pResult = 0; + } *************** *** 169,173 **** --- 228,234 ---- + // Keep at the bottom of the file to reduce clutter up top + // FIXME: Anyone think of a better way to do this? CString CMainConfigDlg::GetVirtKeyString( WORD wVirtKeyCode ) { *************** *** 302,303 **** --- 363,365 ---- return ret; } + |
From: Brad P. C. <bcr...@us...> - 2000-12-05 05:41:49
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv6370 Modified Files: MainConfigDlg.h Log Message: * Added member pointer to hotkeylist * Added OnGetdispinfoHotkeylist Index: MainConfigDlg.h =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainConfigDlg.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** MainConfigDlg.h 2000/11/01 15:10:18 1.1.1.1 --- MainConfigDlg.h 2000/12/05 05:41:45 1.2 *************** *** 19,22 **** --- 19,26 ---- // $Log$ + // Revision 1.2 2000/12/05 05:41:45 bcrochet + // * Added member pointer to hotkeylist + // * Added OnGetdispinfoHotkeylist + // // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet // Initial revision and import *************** *** 48,53 **** CListCtrl m_ctrlHotkeyList; //}}AFX_DATA - // Overrides // ClassWizard generated virtual function overrides --- 52,57 ---- CListCtrl m_ctrlHotkeyList; //}}AFX_DATA + HotKeyList* m_pHotKeyList; // Overrides // ClassWizard generated virtual function overrides *************** *** 59,63 **** // Implementation protected: - // Generated message map functions //{{AFX_MSG(CMainConfigDlg) --- 63,66 ---- *************** *** 65,68 **** --- 68,72 ---- afx_msg void OnAdd(); afx_msg void OnEdit(); + afx_msg void OnGetdispinfoHotkeylist(NMHDR* pNMHDR, LRESULT* pResult); //}}AFX_MSG DECLARE_MESSAGE_MAP() |
From: Brad P. C. <bcr...@us...> - 2000-12-03 21:21:07
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv13400 Modified Files: MainFrm.h Log Message: * Added HotKeyList vector typedef * Added ReadHotKeyListFromRegistry method prototype * Added WriteHotKeyListToRegistry method prototype * Added HotKeyList member variable. * Include inlines.h Index: MainFrm.h =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainFrm.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** MainFrm.h 2000/11/01 15:10:18 1.1.1.1 --- MainFrm.h 2000/12/03 21:21:04 1.2 *************** *** 19,22 **** --- 19,29 ---- // $Log$ + // Revision 1.2 2000/12/03 21:21:04 bcrochet + // * Added HotKeyList vector typedef + // * Added ReadHotKeyListFromRegistry method prototype + // * Added WriteHotKeyListToRegistry method prototype + // * Added HotKeyList member variable. + // * Include inlines.h + // // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet // Initial revision and import *************** *** 34,37 **** --- 41,49 ---- #endif // _MSC_VER > 1000 + #include "inlines.h" + #include "HotKeyEntry.h" + + typedef std::vector<CHotKeyEntry> HotKeyList; + class CMainFrame : public CFrameWnd { *************** *** 42,45 **** --- 54,59 ---- DECLARE_DYNAMIC(CMainFrame) + HotKeyList m_hkList; + // Attributes public: *************** *** 53,56 **** --- 67,73 ---- bool JoinRogerWilcoChannel(CString& host_ip, CString& channel_name, CString& passwd); bool StartRogerWilco(); + inline HotKeyList& GetHotKeyList() { return m_hkList; } + boolean ReadHotKeyListFromRegistry( HotKeyList& hkList ); + boolean WriteHotKeyListToRegistry( HotKeyList& hkList ); // Overrides |
From: Brad P. C. <bcr...@us...> - 2000-12-03 21:18:56
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv13167 Modified Files: MainFrm.cpp Log Message: * Added ReadHotKeyListFromRegistry * Added WriteHotKeyListToRegistry * Added code to destructor to clear out hotkey vector. Index: MainFrm.cpp =================================================================== RCS file: /cvsroot/rswitch/rswitch/MainFrm.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** MainFrm.cpp 2000/11/01 15:10:18 1.1.1.1 --- MainFrm.cpp 2000/12/03 21:18:52 1.2 *************** *** 19,22 **** --- 19,27 ---- // $Log$ + // Revision 1.2 2000/12/03 21:18:52 bcrochet + // * Added ReadHotKeyListFromRegistry + // * Added WriteHotKeyListToRegistry + // * Added code to destructor to clear out hotkey vector. + // // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet // Initial revision and import *************** *** 66,69 **** --- 71,78 ---- CMainFrame::~CMainFrame() { + for ( int i = m_hkList.size(); i > 0; --i ) + { + m_hkList.pop_back(); + } } *************** *** 105,108 **** --- 114,130 ---- } + boolean CMainFrame::ReadHotKeyListFromRegistry( HotKeyList& hkList ) + { + CHotKeyEntry* pHotKey = new CHotKeyEntry( HOTKEYF_CONTROL, (WORD)'C', "rw.clantmp.org", "d" ); + hkList.push_back( *pHotKey ); + delete pHotKey; + return true; + } + + boolean CMainFrame::WriteHotKeyListToRegistry( HotKeyList& hkList ) + { + return true; + } + ///////////////////////////////////////////////////////////////////////////// // CMainFrame diagnostics *************** *** 264,267 **** --- 286,290 ---- return -1; + ReadHotKeyListFromRegistry( m_hkList ); EnableAllHotkeys( true ); |
From: Brad P. C. <bcr...@us...> - 2000-12-03 21:06:31
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv12319 Modified Files: Resource.h Log Message: Redo layout of Add/Edit dialog Index: Resource.h =================================================================== RCS file: /cvsroot/rswitch/rswitch/Resource.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Resource.h 2000/11/01 15:10:18 1.1.1.1 --- Resource.h 2000/12/03 21:06:19 1.2 *************** *** 1,26 **** - /* - RsWitch -- A Win32 applet for Roger Wilco - Copyright (C) 2000 Brad P. Crochet - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - // $Log$ - // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet - // Initial revision and import - // - //{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file. --- 1,2 ---- *************** *** 39,46 **** #define IDC_ADD 1001 #define IDC_EDIT 1002 - #define IDC_SERVERIP 1003 #define IDC_HOTKEY 1004 #define IDC_CHANNEL 1005 #define IDC_FUNCTION 1006 #define IDM_PROPERTIES 32771 --- 15,22 ---- #define IDC_ADD 1001 #define IDC_EDIT 1002 #define IDC_HOTKEY 1004 #define IDC_CHANNEL 1005 #define IDC_FUNCTION 1006 + #define IDC_SERVERNAME 1007 #define IDM_PROPERTIES 32771 *************** *** 52,56 **** #define _APS_NEXT_RESOURCE_VALUE 134 #define _APS_NEXT_COMMAND_VALUE 32772 ! #define _APS_NEXT_CONTROL_VALUE 1007 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 28,32 ---- #define _APS_NEXT_RESOURCE_VALUE 134 #define _APS_NEXT_COMMAND_VALUE 32772 ! #define _APS_NEXT_CONTROL_VALUE 1009 #define _APS_NEXT_SYMED_VALUE 101 #endif |
From: Brad P. C. <bcr...@us...> - 2000-12-03 21:04:16
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv12127 Modified Files: RsWitch.rc Log Message: Redo layout of Add/Edit dialog Index: RsWitch.rc =================================================================== RCS file: /cvsroot/rswitch/rswitch/RsWitch.rc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** RsWitch.rc 2000/11/01 15:10:16 1.1.1.1 --- RsWitch.rc 2000/12/03 21:04:13 1.2 *************** *** 1,9 **** //Microsoft Developer Studio generated resource script. // - // $Log$ - // Revision 1.1.1.1 2000/11/01 15:10:16 bcrochet - // Initial revision and import - // - // #include "resource.h" --- 1,4 ---- *************** *** 143,147 **** END ! IDD_ADD_EDIT_DLG DIALOG DISCARDABLE 0, 0, 226, 90 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add Or Edit - Change" --- 138,142 ---- END ! IDD_ADD_EDIT_DLG DIALOG DISCARDABLE 0, 0, 171, 122 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Add Or Edit - Change" *************** *** 150,164 **** COMBOBOX IDC_FUNCTION,7,17,100,56,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL "IPAddress1",IDC_SERVERIP,"SysIPAddress32",WS_TABSTOP,7, - 41,100,15 - EDITTEXT IDC_CHANNEL,113,41,40,14,ES_AUTOHSCROLL CONTROL "HotKey1",IDC_HOTKEY,"msctls_hotkey32",WS_BORDER | ! WS_TABSTOP,7,70,80,14 ! DEFPUSHBUTTON "OK",IDOK,169,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,169,24,50,14 LTEXT "Function",IDC_STATIC,7,7,101,8 ! LTEXT "Server I.P.",IDC_STATIC,7,31,80,8 ! LTEXT "Server Channel",IDC_STATIC,113,31,53,8 ! LTEXT "Server Hotkey",IDC_STATIC,7,60,80,8 END --- 145,158 ---- COMBOBOX IDC_FUNCTION,7,17,100,56,CBS_DROPDOWNLIST | CBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP CONTROL "HotKey1",IDC_HOTKEY,"msctls_hotkey32",WS_BORDER | ! WS_TABSTOP,7,101,80,14 ! DEFPUSHBUTTON "OK",IDOK,114,7,50,14 ! PUSHBUTTON "Cancel",IDCANCEL,114,24,50,14 LTEXT "Function",IDC_STATIC,7,7,101,8 ! LTEXT "Server Name",IDC_STATIC,7,32,100,8 ! LTEXT "Server Hotkey",IDC_STATIC,7,91,80,8 ! EDITTEXT IDC_SERVERNAME,7,43,100,14,ES_AUTOHSCROLL ! LTEXT "Channel (If necessary)",IDC_STATIC,7,62,71,8 ! EDITTEXT IDC_CHANNEL,7,73,100,14,ES_AUTOHSCROLL END *************** *** 237,243 **** BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 219 TOPMARGIN, 7 ! BOTTOMMARGIN, 83 END END --- 231,237 ---- BEGIN LEFTMARGIN, 7 ! RIGHTMARGIN, 164 TOPMARGIN, 7 ! BOTTOMMARGIN, 115 END END |
From: Brad P. C. <bcr...@us...> - 2000-12-03 21:03:23
|
Update of /cvsroot/rswitch/rswitch In directory slayer.i.sourceforge.net:/tmp/cvs-serv12049 Modified Files: StdAfx.h Log Message: Added <vector>. Index: StdAfx.h =================================================================== RCS file: /cvsroot/rswitch/rswitch/StdAfx.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** StdAfx.h 2000/11/01 15:10:18 1.1.1.1 --- StdAfx.h 2000/12/03 21:03:16 1.2 *************** *** 19,22 **** --- 19,25 ---- // $Log$ + // Revision 1.2 2000/12/03 21:03:16 bcrochet + // Added <vector>. + // // Revision 1.1.1.1 2000/11/01 15:10:18 bcrochet // Initial revision and import *************** *** 48,51 **** --- 51,55 ---- // Microsoft Visual C++ will insert additional declarations immediately before the previous line. + #include <vector> #include "inlines.h" |