SearchModeDlg.cpp
上传用户:zslianheng
上传日期:2013-04-03
资源大小:946k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Visual C++

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *   This program is free software; you can redistribute it and/or modify  *
  4.  *   it under the terms of the GNU General Public License as published by  *
  5.  *   the Free Software Foundation; either version 2 of the License, or     *
  6.  *   (at your option) any later version.                                   *
  7.  *                                                                         *
  8.  *   copyright            : (C) 2002 by Zhang Yong                         *
  9.  *   email                : z-yong163@163.com                              *
  10.  ***************************************************************************/
  11. // SearchModeDlg.cpp : implementation file
  12. //
  13. #include "stdafx.h"
  14. #include "myicq.h"
  15. #include "SearchModeDlg.h"
  16. #include "SearchWizard.h"
  17. #include "serversession.h"
  18. #include "icqlink.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CSearchModeDlg property page
  26. IMPLEMENT_DYNCREATE(CSearchModeDlg, CPropertyPage)
  27. CSearchModeDlg::CSearchModeDlg() : CPropertyPage(CSearchModeDlg::IDD)
  28. {
  29. //{{AFX_DATA_INIT(CSearchModeDlg)
  30. m_mode = 0;
  31. m_nrOnlines = _T("");
  32. //}}AFX_DATA_INIT
  33. uint32 n = serverSession()->sessionCount;
  34. if (n)
  35. m_nrOnlines.Format("%lu", n);
  36. else
  37. m_nrOnlines.LoadString(IDS_UNKNOWN);
  38. }
  39. CSearchModeDlg::~CSearchModeDlg()
  40. {
  41. }
  42. void CSearchModeDlg::DoDataExchange(CDataExchange* pDX)
  43. {
  44. CPropertyPage::DoDataExchange(pDX);
  45. //{{AFX_DATA_MAP(CSearchModeDlg)
  46. DDX_Radio(pDX, IDC_SEARCH_ONLINE, m_mode);
  47. DDX_Text(pDX, IDC_NR_ONLINES, m_nrOnlines);
  48. //}}AFX_DATA_MAP
  49. }
  50. BEGIN_MESSAGE_MAP(CSearchModeDlg, CPropertyPage)
  51. //{{AFX_MSG_MAP(CSearchModeDlg)
  52. // NOTE: the ClassWizard will add message map macros here
  53. //}}AFX_MSG_MAP
  54. END_MESSAGE_MAP()
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CSearchModeDlg message handlers
  57. LRESULT CSearchModeDlg::OnWizardNext() 
  58. {
  59. UpdateData();
  60. if (m_mode == SEARCH_MODE_ONLINE)
  61. return IDD_SEARCH_RESULT;
  62. else
  63. return CPropertyPage::OnWizardNext();
  64. }
  65. BOOL CSearchModeDlg::OnSetActive() 
  66. {
  67. ((CPropertySheet *) GetParent())->SetWizardButtons(PSWIZB_NEXT);
  68. return CPropertyPage::OnSetActive();
  69. }
  70. void CSearchModeDlg::OnCancel() 
  71. {
  72. GetParent()->DestroyWindow();
  73. }