Source code of Windows XP (NT5)
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.

133 lines
3.4 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*******************************************************************************
  3. *
  4. * atdlg.h
  5. *
  6. * interface of WINCFG CAsyncTestDlg, CEchoEditControl, and CLed classes
  7. *
  8. * copyright notice: Copyright 1995, Citrix Systems Inc.
  9. *
  10. * $Author: butchd $ Butch Davis
  11. *
  12. * $Log: N:\NT\PRIVATE\UTILS\CITRIX\WINUTILS\WINCFG\VCS\ATDLG.H $
  13. *
  14. * Rev 1.5 12 Sep 1996 16:16:00 butchd
  15. * update
  16. *
  17. *******************************************************************************/
  18. /*
  19. * Include the base dialog and led classes.
  20. */
  21. #include "basedlg.h"
  22. #include "led.h"
  23. ////////////////////////////////////////////////////////////////////////////////
  24. // CEchoEditControl class
  25. //
  26. class CEchoEditControl : public CEdit
  27. {
  28. friend class CAsyncTestDlg;
  29. /*
  30. * Member variables.
  31. */
  32. public:
  33. BOOL m_bProcessingOutput;
  34. HWND m_hDlg;
  35. int m_FontHeight;
  36. int m_FontWidth;
  37. int m_FormatOffsetX;
  38. int m_FormatOffsetY;
  39. /*
  40. * Message map / commands.
  41. */
  42. protected:
  43. //{{AFX_MSG(CEchoEditControl)
  44. afx_msg void OnChar (UINT nChar, UINT nRepCnt, UINT nFlags);
  45. //}}AFX_MSG
  46. DECLARE_MESSAGE_MAP()
  47. }; // end CEchoEditControl class interface
  48. ////////////////////////////////////////////////////////////////////////////////
  49. ////////////////////////////////////////////////////////////////////////////////
  50. // CAsyncTestDlg class
  51. //
  52. #define NUM_LEDS 6
  53. class CAsyncTestDlg : public CBaseDialog
  54. {
  55. /*
  56. * Member variables.
  57. */
  58. //{{AFX_DATA(CAsyncTestDlg)
  59. enum { IDD = IDD_ASYNC_TEST };
  60. //}}AFX_DATA
  61. public:
  62. PDCONFIG m_PdConfig0;
  63. PDCONFIG m_PdConfig1;
  64. PWINSTATIONNAME m_pWSName;
  65. protected:
  66. CEchoEditControl m_EditControl;
  67. HANDLE m_hDevice;
  68. HBRUSH m_hRedBrush;
  69. UINT m_LEDToggleTimer;
  70. PROTOCOLSTATUS m_Status;
  71. CATDlgInputThread *m_pATDlgInputThread;
  72. OVERLAPPED m_OverlapWrite;
  73. BYTE m_Buffer[MAX_COMMAND_LEN+1];
  74. int m_CurrentPos;
  75. DWORD m_BufferBytes;
  76. TCHAR m_szModemInit[MAX_COMMAND_LEN+1];
  77. TCHAR m_szModemDial[MAX_COMMAND_LEN+1];
  78. TCHAR m_szModemListen[MAX_COMMAND_LEN+1];
  79. HANDLE m_hModem;
  80. BOOL m_bDeletedWinStation;
  81. CLed * m_pLeds[NUM_LEDS];
  82. WINSTATIONCONFIG2 m_WSConfig;
  83. /*
  84. * Implementation.
  85. */
  86. public:
  87. CAsyncTestDlg();
  88. ~CAsyncTestDlg();
  89. /*
  90. * Operations.
  91. */
  92. protected:
  93. void NotifyAbort( UINT idError );
  94. BOOL DeviceSetParams();
  95. BOOL DeviceWrite();
  96. void SetInfoFields( PPROTOCOLSTATUS pCurrent, PPROTOCOLSTATUS pNew );
  97. void OutputToEditControl( BYTE *pBuffer, int *pIndex );
  98. /*
  99. * Message map / commands.
  100. */
  101. protected:
  102. //{{AFX_MSG(CAsyncTestDlg)
  103. virtual BOOL OnInitDialog();
  104. afx_msg void OnTimer(UINT nIDEvent);
  105. afx_msg LRESULT OnAsyncTestError(WPARAM wParam, LPARAM lParam);
  106. afx_msg LRESULT OnAsyncTestAbort(WPARAM wParam, LPARAM lParam);
  107. afx_msg LRESULT OnAsyncTestStatusReady(WPARAM wParam, LPARAM lParam);
  108. afx_msg LRESULT OnAsyncTestInputReady(WPARAM wParam, LPARAM lParam);
  109. afx_msg LRESULT OnAsyncTestWriteChar(WPARAM wParam, LPARAM lParam);
  110. afx_msg void OnClickedAtdlgModemDial();
  111. afx_msg void OnClickedAtdlgModemInit();
  112. afx_msg void OnClickedAtdlgModemListen();
  113. afx_msg void OnNcDestroy();
  114. //}}AFX_MSG
  115. DECLARE_MESSAGE_MAP()
  116. }; // end CAsyncTestDlg class interface
  117. #define ASYNC_LED_TOGGLE_MSEC 200
  118. ////////////////////////////////////////////////////////////////////////////////