[Sphere-axis-commits] CVS: Axis AccountDlg.cpp,1.7,1.8 AccountDlg.h,1.3,1.4 drewsky.rc,1.37,1.38 res
Brought to you by:
pesterle
From: Philip E. <pes...@us...> - 2002-05-23 23:25:56
|
Update of /cvsroot/sphere-axis/Axis In directory usw-pr-cvs1:/tmp/cvs-serv17279 Modified Files: AccountDlg.cpp AccountDlg.h drewsky.rc resource.h settingstab.cpp settingstab.h Log Message: beginnings of feature request 553431 Index: AccountDlg.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** AccountDlg.cpp 14 May 2002 20:03:34 -0000 1.7 --- AccountDlg.cpp 23 May 2002 23:25:51 -0000 1.8 *************** *** 30,33 **** --- 30,34 ---- #include "AddValueDialog.h" #include "RemoteConnection.h" + #include "SettingsTab.h" #ifdef _DEBUG *************** *** 78,81 **** --- 79,85 ---- } + CAccountDlg::~CAccountDlg() + { + } void CAccountDlg::DoDataExchange(CDataExchange* pDX) *************** *** 83,86 **** --- 87,111 ---- CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CAccountDlg) + DDX_Control(pDX, IDOK, m_cbOK); + DDX_Control(pDX, IDCANCEL, m_cbCancel); + DDX_Control(pDX, IDC_STATIC_LABEL9, m_csLabel9); + DDX_Control(pDX, IDC_STATIC_LABEL8, m_csLabel8); + DDX_Control(pDX, IDC_STATIC_LABEL7, m_csLabel7); + DDX_Control(pDX, IDC_STATIC_LABEL6, m_csLabel6); + DDX_Control(pDX, IDC_STATIC_LABEL5, m_csLabel5); + DDX_Control(pDX, IDC_STATIC_LABEL4, m_csLabel4); + DDX_Control(pDX, IDC_STATIC_LABEL3, m_csLabel3); + DDX_Control(pDX, IDC_STATIC_LABEL2, m_csLabel2); + DDX_Control(pDX, IDC_STATIC_LABEL15, m_csLabel15); + DDX_Control(pDX, IDC_STATIC_LABEL14, m_csLabel14); + DDX_Control(pDX, IDC_STATIC_LABEL13, m_csLabel13); + DDX_Control(pDX, IDC_STATIC_LABEL12, m_csLabel12); + DDX_Control(pDX, IDC_STATIC_LABEL11, m_csLabel11); + DDX_Control(pDX, IDC_STATIC_LABEL10, m_csLabel10); + DDX_Control(pDX, IDC_STATIC_LABEL1, m_csLabel1); + DDX_Control(pDX, IDC_QUEUELABEL, m_csQueue); + DDX_Control(pDX, IDC_PARAMBOX, m_cbParam); + DDX_Control(pDX, IDC_NEWACCT, m_cbNew); + DDX_Control(pDX, IDC_DELETEACCT, m_cbDelete); DDX_Control(pDX, IDC_ACCTFIRSTIP, m_csFirstIP); DDX_Control(pDX, IDC_CHATCOMMENT, m_ceComment); *************** *** 117,120 **** --- 142,146 ---- ON_EN_CHANGE(IDC_ACCTPWD, OnChangeAcctpwd) ON_EN_CHANGE(IDC_CHATCOMMENT, OnChangeChatcomment) + ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() *************** *** 159,162 **** --- 185,193 ---- this->m_csTime.SetWindowText(""); this->m_csUID.SetWindowText(""); + + // Get the rects for the controls here + GetWindowRect(m_crOriginal); + + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE *************** *** 606,608 **** --- 637,668 ---- return; } + } + + void CAccountDlg::OnSize(UINT nType, int cx, int cy) + { + // Make sure we aren't trying to be narrower or shorter than the original + if ( cx < m_crOriginal.Width() ) + cx = m_crOriginal.Width(); + if ( cy < m_crOriginal.Height() ) + cy = m_crOriginal.Height(); + + int dx, dy; + dx = 0; dy = 0; + CRect crNew; + GetWindowRect(crNew); + ScreenToClient(crNew); + dx = crNew.Width() - m_crOriginal.Width(); + dy = crNew.Height() - m_crOriginal.Height(); + + int dx1 = dx / 2; + int dx2 = dx - dx1; + int dy1 = dy / 2; + int dy2 = dy - dy1; + + // Resize the accounts and queue windows + + // Move the rest of the windows + + CDialog::OnSize(nType, cx, cy); + this->Invalidate(); } Index: AccountDlg.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/AccountDlg.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** AccountDlg.h 1 May 2002 03:33:09 -0000 1.3 --- AccountDlg.h 23 May 2002 23:25:51 -0000 1.4 *************** *** 39,46 **** --- 39,68 ---- public: CAccountDlg(CWnd* pParent = NULL); // standard constructor + ~CAccountDlg(); // Dialog Data //{{AFX_DATA(CAccountDlg) enum { IDD = IDD_ACCOUNT_DLG }; + CButton m_cbOK; + CButton m_cbCancel; + CStatic m_csLabel9; + CStatic m_csLabel8; + CStatic m_csLabel7; + CStatic m_csLabel6; + CStatic m_csLabel5; + CStatic m_csLabel4; + CStatic m_csLabel3; + CStatic m_csLabel2; + CStatic m_csLabel15; + CStatic m_csLabel14; + CStatic m_csLabel13; + CStatic m_csLabel12; + CStatic m_csLabel11; + CStatic m_csLabel10; + CStatic m_csLabel1; + CStatic m_csQueue; + CButton m_cbParam; + CButton m_cbNew; + CButton m_cbDelete; CStatic m_csFirstIP; CEdit m_ceComment; *************** *** 77,80 **** --- 99,105 ---- void Unload(); + CRect m_crOriginal; + + // Generated message map functions //{{AFX_MSG(CAccountDlg) *************** *** 92,95 **** --- 117,121 ---- afx_msg void OnChangeAcctpwd(); afx_msg void OnChangeChatcomment(); + afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() Index: drewsky.rc =================================================================== RCS file: /cvsroot/sphere-axis/Axis/drewsky.rc,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -r1.37 -r1.38 *** drewsky.rc 16 May 2002 01:31:57 -0000 1.37 --- drewsky.rc 23 May 2002 23:25:51 -0000 1.38 *************** *** 1,4 **** //Microsoft Developer Studio generated resource script. ! // Last compiled 5/15/2002 at 19:22:53 #include "resource.h" --- 1,4 ---- //Microsoft Developer Studio generated resource script. ! // #include "resource.h" *************** *** 1858,1863 **** END ! IDD_ACCOUNT_DLG DIALOG DISCARDABLE 0, 0, 274, 279 ! STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Account Manager" FONT 8, "MS Sans Serif" --- 1858,1864 ---- END ! IDD_ACCOUNT_DLG DIALOG DISCARDABLE 0, 0, 274, 278 ! STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ! WS_THICKFRAME CAPTION "Account Manager" FONT 8, "MS Sans Serif" *************** *** 1868,1885 **** LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "Accounts",IDC_STATIC,7,7,31,8 ! LISTBOX IDC_ACCTUPDATES,7,218,104,54,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP ! LTEXT "Accounts in update queue",IDC_STATIC,7,207,84,8 ! GROUPBOX "Account Parameters",IDC_STATIC,113,23,154,249 PUSHBUTTON "New Acct",IDC_NEWACCT,7,191,45,13 PUSHBUTTON "Delete Acct",IDC_DELETEACCT,55,191,53,13 ! LTEXT "Password",IDC_STATIC,119,34,32,8 ! LTEXT "Priv Flags",IDC_STATIC,119,50,32,8 ! LTEXT "Chat Name",IDC_STATIC,119,111,36,8 ! LTEXT "Language",IDC_STATIC,119,125,33,8 ! LTEXT "Email",IDC_STATIC,119,138,18,8 ! LTEXT "Email Failures",IDC_STATIC,119,151,44,8 ! LTEXT "Comment",IDC_STATIC,119,167,30,8 EDITTEXT IDC_ACCTPWD,157,33,105,12,ES_AUTOHSCROLL LISTBOX IDC_ACCTPRIV,157,50,105,42,LBS_NOINTEGRALHEIGHT | --- 1869,1886 ---- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "Accounts",IDC_STATIC,7,7,31,8 ! LISTBOX IDC_ACCTUPDATES,7,217,104,54,LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP ! LTEXT "Accounts in update queue",IDC_QUEUELABEL,7,207,84,8 ! GROUPBOX "Account Parameters",IDC_PARAMBOX,113,22,154,249 PUSHBUTTON "New Acct",IDC_NEWACCT,7,191,45,13 PUSHBUTTON "Delete Acct",IDC_DELETEACCT,55,191,53,13 ! LTEXT "Password",IDC_STATIC_LABEL1,119,34,32,8 ! LTEXT "Priv Flags",IDC_STATIC_LABEL2,119,50,32,8 ! LTEXT "Chat Name",IDC_STATIC_LABEL4,119,111,36,8 ! LTEXT "Language",IDC_STATIC_LABEL5,119,125,33,8 ! LTEXT "Email",IDC_STATIC_LABEL6,119,138,18,8 ! LTEXT "Email Failures",IDC_STATIC_LABEL7,119,152,44,8 ! LTEXT "Comment",IDC_STATIC_LABEL8,119,167,30,8 EDITTEXT IDC_ACCTPWD,157,33,105,12,ES_AUTOHSCROLL LISTBOX IDC_ACCTPRIV,157,50,105,42,LBS_NOINTEGRALHEIGHT | *************** *** 1889,1902 **** EDITTEXT IDC_ACCTEMAIL,157,137,105,12,ES_AUTOHSCROLL EDITTEXT IDC_CHATCOMMENT,157,165,105,12,ES_AUTOHSCROLL ! LTEXT "PLevel",IDC_STATIC,119,95,23,8 COMBOBOX IDC_ACCTLEVEL,157,94,105,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Last Character UID",IDC_STATIC,119,182,62,8 ! LTEXT "Total Connect Time",IDC_STATIC,119,194,63,8 ! LTEXT "Last IP",IDC_STATIC,119,207,23,8 ! LTEXT "Last Connect Time",IDC_STATIC,119,221,60,8 ! LTEXT "Last Connect Date",IDC_STATIC,119,234,60,8 ! LTEXT "First Connect IP",IDC_STATIC,119,247,51,8 ! LTEXT "First Connect Date",IDC_STATIC,119,260,60,8 LTEXT "Static",IDC_ACCTLASTUID,191,182,71,8 LTEXT "Static",IDC_ACCTTIME,191,194,71,8 --- 1890,1903 ---- EDITTEXT IDC_ACCTEMAIL,157,137,105,12,ES_AUTOHSCROLL EDITTEXT IDC_CHATCOMMENT,157,165,105,12,ES_AUTOHSCROLL ! LTEXT "PLevel",IDC_STATIC_LABEL3,119,95,23,8 COMBOBOX IDC_ACCTLEVEL,157,94,105,64,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP ! LTEXT "Last Character UID",IDC_STATIC_LABEL9,119,182,62,8 ! LTEXT "Total Connect Time",IDC_STATIC_LABEL10,119,194,63,8 ! LTEXT "Last IP",IDC_STATIC_LABEL11,119,207,23,8 ! LTEXT "Last Connect Time",IDC_STATIC_LABEL12,119,221,60,8 ! LTEXT "Last Connect Date",IDC_STATIC_LABEL13,119,234,60,8 ! LTEXT "First Connect IP",IDC_STATIC_LABEL14,119,247,51,8 ! LTEXT "First Connect Date",IDC_STATIC_LABEL15,119,260,60,8 LTEXT "Static",IDC_ACCTLASTUID,191,182,71,8 LTEXT "Static",IDC_ACCTTIME,191,194,71,8 *************** *** 2769,2773 **** RIGHTMARGIN, 267 TOPMARGIN, 7 ! BOTTOMMARGIN, 272 END --- 2770,2774 ---- RIGHTMARGIN, 267 TOPMARGIN, 7 ! BOTTOMMARGIN, 271 END Index: resource.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/resource.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -r1.26 -r1.27 *** resource.h 15 May 2002 22:18:48 -0000 1.26 --- resource.h 23 May 2002 23:25:51 -0000 1.27 *************** *** 1284,1287 **** --- 1284,1302 ---- #define IDC_AS_AVAILABLESCRIPTS 1398 #define IDC_AS_ALLOWMULTIPLE 1399 + #define IDC_QUEUELABEL 1400 + #define IDC_PARAMBOX 1401 + #define IDC_STATIC_LABEL3 1402 + #define IDC_STATIC_LABEL4 1403 + #define IDC_STATIC_LABEL5 1404 + #define IDC_STATIC_LABEL6 1405 + #define IDC_STATIC_LABEL7 1406 + #define IDC_STATIC_LABEL8 1407 + #define IDC_STATIC_LABEL9 1408 + #define IDC_STATIC_LABEL10 1409 + #define IDC_STATIC_LABEL11 1410 + #define IDC_STATIC_LABEL12 1411 + #define IDC_STATIC_LABEL13 1412 + #define IDC_STATIC_LABEL14 1413 + #define IDC_STATIC_LABEL15 1414 #define IDM_RC_START_LOGGING 32779 #define IDM_RC_STOP_LOGGING 32780 *************** *** 1318,1322 **** #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1400 #define _APS_NEXT_SYMED_VALUE 101 #endif --- 1333,1337 ---- #define _APS_NEXT_RESOURCE_VALUE 234 #define _APS_NEXT_COMMAND_VALUE 32809 ! #define _APS_NEXT_CONTROL_VALUE 1415 #define _APS_NEXT_SYMED_VALUE 101 #endif Index: settingstab.cpp =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** settingstab.cpp 22 May 2002 22:55:26 -0000 1.19 --- settingstab.cpp 23 May 2002 23:25:51 -0000 1.20 *************** *** 65,68 **** --- 65,70 ---- m_bResourcesOnly = FALSE; m_pDlgStaticTool = NULL; + m_pAcctDlg = NULL; + m_bDeleteAcctDlg = false; //}}AFX_DATA_INIT } *************** *** 75,78 **** --- 77,85 ---- delete m_pDlgStaticTool; } + if ( m_pAcctDlg ) + { + m_pAcctDlg->DestroyWindow(); + delete m_pAcctDlg; + } } *************** *** 654,659 **** void CSettingsTab::OnAcctedit() { ! CAccountDlg dlg; ! dlg.DoModal(); } --- 661,676 ---- void CSettingsTab::OnAcctedit() { ! if ( m_bDeleteAcctDlg ) ! { ! delete m_pAcctDlg; ! m_pAcctDlg = NULL; ! m_bDeleteAcctDlg = false; ! } ! if ( m_pAcctDlg == NULL ) ! { ! m_pAcctDlg = new CAccountDlg; ! m_pAcctDlg->Create(IDD_ACCOUNT_DLG, (CWnd *)this); ! } ! m_pAcctDlg->ShowWindow(SW_SHOW); } Index: settingstab.h =================================================================== RCS file: /cvsroot/sphere-axis/Axis/settingstab.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** settingstab.h 14 May 2002 20:03:35 -0000 1.11 --- settingstab.h 23 May 2002 23:25:51 -0000 1.12 *************** *** 50,53 **** --- 50,55 ---- BOOL m_bDeleteStaticTool; class CStaticToolDlg * m_pDlgStaticTool; + class CAccountDlg * m_pAcctDlg; + bool m_bDeleteAcctDlg; // Dialog Data |