home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / vcterm / commctrl.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  6.7 KB  |  360 lines

  1. // commctrl.cpp : implementation of the CCommCtrl class
  2.  
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
  14.  
  15. // NOTE: Do not modify the contents of this file.  If this class is regenerated by
  16. // Microsoft Visual C++, your modifications will be overwritten.
  17.  
  18. #include "stdafx.h"
  19. #include "commctrl.h"
  20.  
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CCommCtrl
  23.  
  24. IMPLEMENT_DYNCREATE(CCommCtrl, CWnd)
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CCommCtrl properties
  28.  
  29. BOOL CCommCtrl::GetCDHolding()
  30. {
  31.     BOOL result;
  32.     GetProperty(0x1, VT_BOOL, (void*)&result);
  33.     return result;
  34. }
  35.  
  36. void CCommCtrl::SetCDHolding(BOOL propVal)
  37. {
  38.     SetProperty(0x1, VT_BOOL, propVal);
  39. }
  40.  
  41. long CCommCtrl::GetCDTimeout()
  42. {
  43.     long result;
  44.     GetProperty(0x2, VT_I4, (void*)&result);
  45.     return result;
  46. }
  47.  
  48. void CCommCtrl::SetCDTimeout(long propVal)
  49. {
  50.     SetProperty(0x2, VT_I4, propVal);
  51. }
  52.  
  53. short CCommCtrl::GetCommID()
  54. {
  55.     short result;
  56.     GetProperty(0x3, VT_I2, (void*)&result);
  57.     return result;
  58. }
  59.  
  60. void CCommCtrl::SetCommID(short propVal)
  61. {
  62.     SetProperty(0x3, VT_I2, propVal);
  63. }
  64.  
  65. short CCommCtrl::GetCommPort()
  66. {
  67.     short result;
  68.     GetProperty(0x4, VT_I2, (void*)&result);
  69.     return result;
  70. }
  71.  
  72. void CCommCtrl::SetCommPort(short propVal)
  73. {
  74.     SetProperty(0x4, VT_I2, propVal);
  75. }
  76.  
  77. BOOL CCommCtrl::GetCTSHolding()
  78. {
  79.     BOOL result;
  80.     GetProperty(0x5, VT_BOOL, (void*)&result);
  81.     return result;
  82. }
  83.  
  84. void CCommCtrl::SetCTSHolding(BOOL propVal)
  85. {
  86.     SetProperty(0x5, VT_BOOL, propVal);
  87. }
  88.  
  89. long CCommCtrl::GetCTSTimeout()
  90. {
  91.     long result;
  92.     GetProperty(0x6, VT_I4, (void*)&result);
  93.     return result;
  94. }
  95.  
  96. void CCommCtrl::SetCTSTimeout(long propVal)
  97. {
  98.     SetProperty(0x6, VT_I4, propVal);
  99. }
  100.  
  101. BOOL CCommCtrl::GetDSRHolding()
  102. {
  103.     BOOL result;
  104.     GetProperty(0x7, VT_BOOL, (void*)&result);
  105.     return result;
  106. }
  107.  
  108. void CCommCtrl::SetDSRHolding(BOOL propVal)
  109. {
  110.     SetProperty(0x7, VT_BOOL, propVal);
  111. }
  112.  
  113. long CCommCtrl::GetDSRTimeout()
  114. {
  115.     long result;
  116.     GetProperty(0x8, VT_I4, (void*)&result);
  117.     return result;
  118. }
  119.  
  120. void CCommCtrl::SetDSRTimeout(long propVal)
  121. {
  122.     SetProperty(0x8, VT_I4, propVal);
  123. }
  124.  
  125. BOOL CCommCtrl::GetDTREnable()
  126. {
  127.     BOOL result;
  128.     GetProperty(0x9, VT_BOOL, (void*)&result);
  129.     return result;
  130. }
  131.  
  132. void CCommCtrl::SetDTREnable(BOOL propVal)
  133. {
  134.     SetProperty(0x9, VT_BOOL, propVal);
  135. }
  136.  
  137. long CCommCtrl::GetHandshaking()
  138. {
  139.     long result;
  140.     GetProperty(0xa, VT_I4, (void*)&result);
  141.     return result;
  142. }
  143.  
  144. void CCommCtrl::SetHandshaking(long propVal)
  145. {
  146.     SetProperty(0xa, VT_I4, propVal);
  147. }
  148.  
  149. short CCommCtrl::GetInBufferSize()
  150. {
  151.     short result;
  152.     GetProperty(0xb, VT_I2, (void*)&result);
  153.     return result;
  154. }
  155.  
  156. void CCommCtrl::SetInBufferSize(short propVal)
  157. {
  158.     SetProperty(0xb, VT_I2, propVal);
  159. }
  160.  
  161. short CCommCtrl::GetInBufferCount()
  162. {
  163.     short result;
  164.     GetProperty(0xc, VT_I2, (void*)&result);
  165.     return result;
  166. }
  167.  
  168. void CCommCtrl::SetInBufferCount(short propVal)
  169. {
  170.     SetProperty(0xc, VT_I2, propVal);
  171. }
  172.  
  173. BOOL CCommCtrl::GetBreak()
  174. {
  175.     BOOL result;
  176.     GetProperty(0xd, VT_BOOL, (void*)&result);
  177.     return result;
  178. }
  179.  
  180. void CCommCtrl::SetBreak(BOOL propVal)
  181. {
  182.     SetProperty(0xd, VT_BOOL, propVal);
  183. }
  184.  
  185. short CCommCtrl::GetInputLen()
  186. {
  187.     short result;
  188.     GetProperty(0xe, VT_I2, (void*)&result);
  189.     return result;
  190. }
  191.  
  192. void CCommCtrl::SetInputLen(short propVal)
  193. {
  194.     SetProperty(0xe, VT_I2, propVal);
  195. }
  196.  
  197. long CCommCtrl::GetInterval()
  198. {
  199.     long result;
  200.     GetProperty(0xf, VT_I4, (void*)&result);
  201.     return result;
  202. }
  203.  
  204. void CCommCtrl::SetInterval(long propVal)
  205. {
  206.     SetProperty(0xf, VT_I4, propVal);
  207. }
  208.  
  209. BOOL CCommCtrl::GetNullDiscard()
  210. {
  211.     BOOL result;
  212.     GetProperty(0x10, VT_BOOL, (void*)&result);
  213.     return result;
  214. }
  215.  
  216. void CCommCtrl::SetNullDiscard(BOOL propVal)
  217. {
  218.     SetProperty(0x10, VT_BOOL, propVal);
  219. }
  220.  
  221. short CCommCtrl::GetOutBufferSize()
  222. {
  223.     short result;
  224.     GetProperty(0x11, VT_I2, (void*)&result);
  225.     return result;
  226. }
  227.  
  228. void CCommCtrl::SetOutBufferSize(short propVal)
  229. {
  230.     SetProperty(0x11, VT_I2, propVal);
  231. }
  232.  
  233. short CCommCtrl::GetOutBufferCount()
  234. {
  235.     short result;
  236.     GetProperty(0x12, VT_I2, (void*)&result);
  237.     return result;
  238. }
  239.  
  240. void CCommCtrl::SetOutBufferCount(short propVal)
  241. {
  242.     SetProperty(0x12, VT_I2, propVal);
  243. }
  244.  
  245. CString CCommCtrl::GetParityReplace()
  246. {
  247.     CString result;
  248.     GetProperty(0x13, VT_BSTR, (void*)&result);
  249.     return result;
  250. }
  251.  
  252. void CCommCtrl::SetParityReplace(LPCTSTR propVal)
  253. {
  254.     SetProperty(0x13, VT_BSTR, propVal);
  255. }
  256.  
  257. BOOL CCommCtrl::GetPortOpen()
  258. {
  259.     BOOL result;
  260.     GetProperty(0x14, VT_BOOL, (void*)&result);
  261.     return result;
  262. }
  263.  
  264. void CCommCtrl::SetPortOpen(BOOL propVal)
  265. {
  266.     SetProperty(0x14, VT_BOOL, propVal);
  267. }
  268.  
  269. short CCommCtrl::GetRThreshold()
  270. {
  271.     short result;
  272.     GetProperty(0x15, VT_I2, (void*)&result);
  273.     return result;
  274. }
  275.  
  276. void CCommCtrl::SetRThreshold(short propVal)
  277. {
  278.     SetProperty(0x15, VT_I2, propVal);
  279. }
  280.  
  281. BOOL CCommCtrl::GetRTSEnable()
  282. {
  283.     BOOL result;
  284.     GetProperty(0x16, VT_BOOL, (void*)&result);
  285.     return result;
  286. }
  287.  
  288. void CCommCtrl::SetRTSEnable(BOOL propVal)
  289. {
  290.     SetProperty(0x16, VT_BOOL, propVal);
  291. }
  292.  
  293. CString CCommCtrl::GetSettings()
  294. {
  295.     CString result;
  296.     GetProperty(0x17, VT_BSTR, (void*)&result);
  297.     return result;
  298. }
  299.  
  300. void CCommCtrl::SetSettings(LPCTSTR propVal)
  301. {
  302.     SetProperty(0x17, VT_BSTR, propVal);
  303. }
  304.  
  305. short CCommCtrl::GetSThreshold()
  306. {
  307.     short result;
  308.     GetProperty(0x18, VT_I2, (void*)&result);
  309.     return result;
  310. }
  311.  
  312. void CCommCtrl::SetSThreshold(short propVal)
  313. {
  314.     SetProperty(0x18, VT_I2, propVal);
  315. }
  316.  
  317. VARIANT CCommCtrl::GetOutput()
  318. {
  319.     VARIANT result;
  320.     GetProperty(0x19, VT_VARIANT, (void*)&result);
  321.     return result;
  322. }
  323.  
  324. void CCommCtrl::SetOutput(const VARIANT& propVal)
  325. {
  326.     SetProperty(0x19, VT_VARIANT, &propVal);
  327. }
  328.  
  329. CString CCommCtrl::GetInput()
  330. {
  331.     CString result;
  332.     GetProperty(0x1a, VT_BSTR, (void*)&result);
  333.     return result;
  334. }
  335.  
  336. void CCommCtrl::SetInput(LPCTSTR propVal)
  337. {
  338.     SetProperty(0x1a, VT_BSTR, propVal);
  339. }
  340.  
  341. short CCommCtrl::GetCommEvent()
  342. {
  343.     short result;
  344.     GetProperty(0x1b, VT_I2, (void*)&result);
  345.     return result;
  346. }
  347.  
  348. void CCommCtrl::SetCommEvent(short propVal)
  349. {
  350.     SetProperty(0x1b, VT_I2, propVal);
  351. }
  352.  
  353. /////////////////////////////////////////////////////////////////////////////
  354. // CCommCtrl operations
  355.  
  356. void CCommCtrl::AboutBox()
  357. {
  358.     InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  359. }
  360.