Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: ScInsBar.h
  8. //
  9. //--------------------------------------------------------------------------
  10. #if !defined(AFX_SCINSBAR_H__D7E6F002_DDE8_11D1_803B_0000F87A49E0__INCLUDED_)
  11. #define AFX_SCINSBAR_H__D7E6F002_DDE8_11D1_803B_0000F87A49E0__INCLUDED_
  12. #if _MSC_VER >= 1000
  13. #pragma once
  14. #endif // _MSC_VER >= 1000
  15. // ScInsBar.h : header file
  16. //
  17. /////////////////////////////////////////////////////////////////////////////
  18. //
  19. // Includes
  20. //
  21. #include "statmon.h"
  22. #include "scHlpArr.h"
  23. /////////////////////////////////////////////////////////////////////////////
  24. //
  25. // Constants for (sub)dialog
  26. //
  27. #define MAX_ITEMLEN 255
  28. // Image list properties
  29. #define IMAGE_WIDTH 32
  30. #define IMAGE_HEIGHT 32
  31. #define NUMBER_IMAGES 5
  32. const UINT IMAGE_LIST_IDS[] = {IDI_SC_READERLOADED_V2,
  33. IDI_SC_READEREMPTY_V2,
  34. IDI_SC_WRONGCARD,
  35. IDI_SC_READERERR,
  36. IDI_SC_CARDUNKNOWN};
  37. #define READERLOADED 0
  38. #define READEREMPTY 1
  39. #define WRONGCARD 2
  40. #define READERERROR 3
  41. #define UKNOWNCARD 4
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CScEdit -- Edit boxes that pass OnContextMenu messages to parent
  44. class CScEdit : public CEdit
  45. {
  46. protected:
  47. // Generated message map functions
  48. //{{AFX_MSG(CScEdit)
  49. afx_msg void OnContextMenu(CWnd* pWnd, CPoint pt);
  50. //}}AFX_MSG
  51. DECLARE_MESSAGE_MAP()
  52. };
  53. /////////////////////////////////////////////////////////////////////////////
  54. // CScInsertBar dialog
  55. class CScInsertBar : public CDialog
  56. {
  57. // Construction
  58. public:
  59. CScInsertBar(CWnd* pParent = NULL); // standard constructor
  60. // Dialog Data
  61. //{{AFX_DATA(CScInsertBar)
  62. enum { IDD = IDD_SCARDDLG_BAR };
  63. CScEdit m_ediName;
  64. CScEdit m_ediStatus;
  65. CListCtrl m_lstReaders;
  66. //}}AFX_DATA
  67. void ResetReaderList(void);
  68. // Overrides
  69. // ClassWizard generated virtual function overrides
  70. //{{AFX_VIRTUAL(CScInsertBar)
  71. protected:
  72. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  73. //}}AFX_VIRTUAL
  74. // Implementation
  75. public:
  76. // UI routines
  77. void EnableStatusList(bool f) { m_lstReaders.EnableWindow(f); }
  78. void UpdateStatusList(CSCardReaderStateArray* paReaderState);
  79. protected:
  80. // UI routines
  81. void InitializeReaderList(void);
  82. void OnReaderSelChange(CSCardReaderState* pSelectedRdr);
  83. // Data
  84. CImageList m_SCardImages;
  85. CSCardReaderStateArray* m_paReaderState;
  86. // Generated message map functions
  87. //{{AFX_MSG(CScInsertBar)
  88. afx_msg void OnDestroy();
  89. virtual BOOL OnInitDialog();
  90. afx_msg void OnReaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  91. virtual void OnCancel();
  92. afx_msg BOOL OnHelpInfo(LPHELPINFO lpHelpInfo);
  93. afx_msg void OnContextMenu(CWnd* pWnd, CPoint pt);
  94. //}}AFX_MSG
  95. DECLARE_MESSAGE_MAP()
  96. // helper function
  97. void ShowHelp(HWND hWnd, UINT nCommand);
  98. };
  99. //{{AFX_INSERT_LOCATION}}
  100. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  101. #endif // !defined(AFX_SCINSBAR_H__D7E6F002_DDE8_11D1_803B_0000F87A49E0__INCLUDED_)