home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / database / mdibind / msdgrid.cpp < prev    next >
C/C++ Source or Header  |  1998-03-26  |  9KB  |  465 lines

  1. // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
  2.  
  3. // NOTE: Do not modify the contents of this file.  If this class is regenerated by
  4. //  Microsoft Visual C++, your modifications will be overwritten.
  5.  
  6.  
  7. #include "stdafx.h"
  8. #include "msdgrid.h"
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CMsDgridCtrl
  12.  
  13. IMPLEMENT_DYNCREATE(CMsDgridCtrl, CWnd)
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CMsDgridCtrl properties
  17.  
  18. BOOL CMsDgridCtrl::GetAllowDelete()
  19. {
  20.     BOOL result;
  21.     GetProperty(0x1, VT_BOOL, (void*)&result);
  22.     return result;
  23. }
  24.  
  25. void CMsDgridCtrl::SetAllowDelete(BOOL propVal)
  26. {
  27.     SetProperty(0x1, VT_BOOL, propVal);
  28. }
  29.  
  30. BOOL CMsDgridCtrl::GetAllowAddNew()
  31. {
  32.     BOOL result;
  33.     GetProperty(0x2, VT_BOOL, (void*)&result);
  34.     return result;
  35. }
  36.  
  37. void CMsDgridCtrl::SetAllowAddNew(BOOL propVal)
  38. {
  39.     SetProperty(0x2, VT_BOOL, propVal);
  40. }
  41.  
  42. BOOL CMsDgridCtrl::GetAllowRowSizing()
  43. {
  44.     BOOL result;
  45.     GetProperty(0x3, VT_BOOL, (void*)&result);
  46.     return result;
  47. }
  48.  
  49. void CMsDgridCtrl::SetAllowRowSizing(BOOL propVal)
  50. {
  51.     SetProperty(0x3, VT_BOOL, propVal);
  52. }
  53.  
  54. BOOL CMsDgridCtrl::GetAllowUpdate()
  55. {
  56.     BOOL result;
  57.     GetProperty(0x4, VT_BOOL, (void*)&result);
  58.     return result;
  59. }
  60.  
  61. void CMsDgridCtrl::SetAllowUpdate(BOOL propVal)
  62. {
  63.     SetProperty(0x4, VT_BOOL, propVal);
  64. }
  65.  
  66. short CMsDgridCtrl::GetBorderStyle()
  67. {
  68.     short result;
  69.     GetProperty(DISPID_BORDERSTYLE, VT_I4, (void*)&result);
  70.     return result;
  71. }
  72.  
  73. void CMsDgridCtrl::SetBorderStyle(short propVal)
  74. {
  75.     SetProperty(DISPID_BORDERSTYLE, VT_I4, propVal);
  76. }
  77.  
  78. VARIANT CMsDgridCtrl::GetBookmark()
  79. {
  80.     VARIANT result;
  81.     GetProperty(0x5, VT_VARIANT, (void*)&result);
  82.     return result;
  83. }
  84.  
  85. void CMsDgridCtrl::SetBookmark(const VARIANT& propVal)
  86. {
  87.     SetProperty(0x5, VT_VARIANT, &propVal);
  88. }
  89.  
  90. short CMsDgridCtrl::GetCol()
  91. {
  92.     short result;
  93.     GetProperty(0x6, VT_I2, (void*)&result);
  94.     return result;
  95. }
  96.  
  97. void CMsDgridCtrl::SetCol(short propVal)
  98. {
  99.     SetProperty(0x6, VT_I2, propVal);
  100. }
  101.  
  102. BOOL CMsDgridCtrl::GetColumnHeaders()
  103. {
  104.     BOOL result;
  105.     GetProperty(0x7, VT_BOOL, (void*)&result);
  106.     return result;
  107. }
  108.  
  109. void CMsDgridCtrl::SetColumnHeaders(BOOL propVal)
  110. {
  111.     SetProperty(0x7, VT_BOOL, propVal);
  112. }
  113.  
  114. long CMsDgridCtrl::GetDataMode()
  115. {
  116.     long result;
  117.     GetProperty(0x25, VT_I4, (void*)&result);
  118.     return result;
  119. }
  120.  
  121. void CMsDgridCtrl::SetDataMode(long propVal)
  122. {
  123.     SetProperty(0x25, VT_I4, propVal);
  124. }
  125.  
  126. LPUNKNOWN CMsDgridCtrl::GetDataSource()
  127. {
  128.     LPUNKNOWN result;
  129.     GetProperty(0x9, VT_UNKNOWN, (void*)&result);
  130.     return result;
  131. }
  132.  
  133. void CMsDgridCtrl::SetDataSource(LPUNKNOWN propVal)
  134. {
  135.     SetProperty(0x9, VT_UNKNOWN, propVal);
  136. }
  137.  
  138. float CMsDgridCtrl::GetDefColWidth()
  139. {
  140.     float result;
  141.     GetProperty(0xa, VT_R4, (void*)&result);
  142.     return result;
  143. }
  144.  
  145. void CMsDgridCtrl::SetDefColWidth(float propVal)
  146. {
  147.     SetProperty(0xa, VT_R4, propVal);
  148. }
  149.  
  150. BOOL CMsDgridCtrl::GetEnabled()
  151. {
  152.     BOOL result;
  153.     GetProperty(DISPID_ENABLED, VT_BOOL, (void*)&result);
  154.     return result;
  155. }
  156.  
  157. void CMsDgridCtrl::SetEnabled(BOOL propVal)
  158. {
  159.     SetProperty(DISPID_ENABLED, VT_BOOL, propVal);
  160. }
  161.  
  162. VARIANT CMsDgridCtrl::GetFirstRow()
  163. {
  164.     VARIANT result;
  165.     GetProperty(0x16, VT_VARIANT, (void*)&result);
  166.     return result;
  167. }
  168.  
  169. void CMsDgridCtrl::SetFirstRow(const VARIANT& propVal)
  170. {
  171.     SetProperty(0x16, VT_VARIANT, &propVal);
  172. }
  173.  
  174. LPDISPATCH CMsDgridCtrl::GetHeadFont()
  175. {
  176.     LPDISPATCH result;
  177.     GetProperty(0xb, VT_DISPATCH, (void*)&result);
  178.     return result;
  179. }
  180.  
  181. void CMsDgridCtrl::SetHeadFont(LPDISPATCH propVal)
  182. {
  183.     SetProperty(0xb, VT_DISPATCH, propVal);
  184. }
  185.  
  186. float CMsDgridCtrl::GetHeadLines()
  187. {
  188.     float result;
  189.     GetProperty(0xc, VT_R4, (void*)&result);
  190.     return result;
  191. }
  192.  
  193. void CMsDgridCtrl::SetHeadLines(float propVal)
  194. {
  195.     SetProperty(0xc, VT_R4, propVal);
  196. }
  197.  
  198. OLE_HANDLE CMsDgridCtrl::GetHWnd()
  199. {
  200.     OLE_HANDLE result;
  201.     GetProperty(DISPID_HWND, VT_I4, (void*)&result);
  202.     return result;
  203. }
  204.  
  205. BOOL CMsDgridCtrl::GetRecordSelectors()
  206. {
  207.     BOOL result;
  208.     GetProperty(0xd, VT_BOOL, (void*)&result);
  209.     return result;
  210. }
  211.  
  212. void CMsDgridCtrl::SetRecordSelectors(BOOL propVal)
  213. {
  214.     SetProperty(0xd, VT_BOOL, propVal);
  215. }
  216.  
  217. short CMsDgridCtrl::GetRow()
  218. {
  219.     short result;
  220.     GetProperty(0xe, VT_I2, (void*)&result);
  221.     return result;
  222. }
  223.  
  224. void CMsDgridCtrl::SetRow(short propVal)
  225. {
  226.     SetProperty(0xe, VT_I2, propVal);
  227. }
  228.  
  229. long CMsDgridCtrl::GetRowDividerStyle()
  230. {
  231.     long result;
  232.     GetProperty(0xf, VT_I4, (void*)&result);
  233.     return result;
  234. }
  235.  
  236. void CMsDgridCtrl::SetRowDividerStyle(long propVal)
  237. {
  238.     SetProperty(0xf, VT_I4, propVal);
  239. }
  240.  
  241. float CMsDgridCtrl::GetRowHeight()
  242. {
  243.     float result;
  244.     GetProperty(0x10, VT_R4, (void*)&result);
  245.     return result;
  246. }
  247.  
  248. void CMsDgridCtrl::SetRowHeight(float propVal)
  249. {
  250.     SetProperty(0x10, VT_R4, propVal);
  251. }
  252.  
  253. long CMsDgridCtrl::GetScrollBars()
  254. {
  255.     long result;
  256.     GetProperty(0x20, VT_I4, (void*)&result);
  257.     return result;
  258. }
  259.  
  260. void CMsDgridCtrl::SetScrollBars(long propVal)
  261. {
  262.     SetProperty(0x20, VT_I4, propVal);
  263. }
  264.  
  265. short CMsDgridCtrl::GetSelStartCol()
  266. {
  267.     short result;
  268.     GetProperty(0x11, VT_I2, (void*)&result);
  269.     return result;
  270. }
  271.  
  272. void CMsDgridCtrl::SetSelStartCol(short propVal)
  273. {
  274.     SetProperty(0x11, VT_I2, propVal);
  275. }
  276.  
  277. short CMsDgridCtrl::GetSelEndCol()
  278. {
  279.     short result;
  280.     GetProperty(0x12, VT_I2, (void*)&result);
  281.     return result;
  282. }
  283.  
  284. void CMsDgridCtrl::SetSelEndCol(short propVal)
  285. {
  286.     SetProperty(0x12, VT_I2, propVal);
  287. }
  288.  
  289. short CMsDgridCtrl::GetVisibleCols()
  290. {
  291.     short result;
  292.     GetProperty(0x21, VT_I2, (void*)&result);
  293.     return result;
  294. }
  295.  
  296. short CMsDgridCtrl::GetVisibleRows()
  297. {
  298.     short result;
  299.     GetProperty(0x13, VT_I2, (void*)&result);
  300.     return result;
  301. }
  302.  
  303. OLE_COLOR CMsDgridCtrl::GetBackColor()
  304. {
  305.     OLE_COLOR result;
  306.     GetProperty(DISPID_BACKCOLOR, VT_I4, (void*)&result);
  307.     return result;
  308. }
  309.  
  310. void CMsDgridCtrl::SetBackColor(OLE_COLOR propVal)
  311. {
  312.     SetProperty(DISPID_BACKCOLOR, VT_I4, propVal);
  313. }
  314.  
  315. OLE_COLOR CMsDgridCtrl::GetForeColor()
  316. {
  317.     OLE_COLOR result;
  318.     GetProperty(DISPID_FORECOLOR, VT_I4, (void*)&result);
  319.     return result;
  320. }
  321.  
  322. void CMsDgridCtrl::SetForeColor(OLE_COLOR propVal)
  323. {
  324.     SetProperty(DISPID_FORECOLOR, VT_I4, propVal);
  325. }
  326.  
  327. CString CMsDgridCtrl::GetCaption()
  328. {
  329.     CString result;
  330.     GetProperty(DISPID_CAPTION, VT_BSTR, (void*)&result);
  331.     return result;
  332. }
  333.  
  334. void CMsDgridCtrl::SetCaption(LPCTSTR propVal)
  335. {
  336.     SetProperty(DISPID_CAPTION, VT_BSTR, propVal);
  337. }
  338.  
  339. LPFONTDISP CMsDgridCtrl::GetFont()
  340. {
  341.     LPFONTDISP result;
  342.     GetProperty(DISPID_FONT, VT_DISPATCH, (void*)&result);
  343.     return result;
  344. }
  345.  
  346. void CMsDgridCtrl::SetFont(LPFONTDISP propVal)
  347. {
  348.     SetProperty(DISPID_FONT, VT_DISPATCH, propVal);
  349. }
  350.  
  351. short CMsDgridCtrl::GetLeftCol()
  352. {
  353.     short result;
  354.     GetProperty(0x17, VT_I2, (void*)&result);
  355.     return result;
  356. }
  357.  
  358. void CMsDgridCtrl::SetLeftCol(short propVal)
  359. {
  360.     SetProperty(0x17, VT_I2, propVal);
  361. }
  362.  
  363. /////////////////////////////////////////////////////////////////////////////
  364. // CMsDgridCtrl operations
  365.  
  366. void CMsDgridCtrl::AboutBox()
  367. {
  368.     InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  369. }
  370.  
  371. LPDISPATCH CMsDgridCtrl::GetColumns(const VARIANT& Index)
  372. {
  373.     LPDISPATCH result;
  374.     static BYTE parms[] =
  375.         VTS_VARIANT;
  376.     InvokeHelper(0x8, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, parms,
  377.         &Index);
  378.     return result;
  379. }
  380.  
  381. VARIANT CMsDgridCtrl::GetSelBookmarks(const VARIANT& Index)
  382. {
  383.     VARIANT result;
  384.     static BYTE parms[] =
  385.         VTS_VARIANT;
  386.     InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, parms,
  387.         &Index);
  388.     return result;
  389. }
  390.  
  391. short CMsDgridCtrl::ColContaining(float X)
  392. {
  393.     short result;
  394.     static BYTE parms[] =
  395.         VTS_R4;
  396.     InvokeHelper(0x18, DISPATCH_METHOD, VT_I2, (void*)&result, parms,
  397.         X);
  398.     return result;
  399. }
  400.  
  401. VARIANT CMsDgridCtrl::GetBookmark(long RowNum)
  402. {
  403.     VARIANT result;
  404.     static BYTE parms[] =
  405.         VTS_I4;
  406.     InvokeHelper(0x19, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms,
  407.         RowNum);
  408.     return result;
  409. }
  410.  
  411. void CMsDgridCtrl::ReBind()
  412. {
  413.     InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  414. }
  415.  
  416. VARIANT CMsDgridCtrl::RowBookmark(short RowNum)
  417. {
  418.     VARIANT result;
  419.     static BYTE parms[] =
  420.         VTS_I2;
  421.     InvokeHelper(0x1b, DISPATCH_METHOD, VT_VARIANT, (void*)&result, parms,
  422.         RowNum);
  423.     return result;
  424. }
  425.  
  426. short CMsDgridCtrl::RowContaining(float Y)
  427. {
  428.     short result;
  429.     static BYTE parms[] =
  430.         VTS_R4;
  431.     InvokeHelper(0x1c, DISPATCH_METHOD, VT_I2, (void*)&result, parms,
  432.         Y);
  433.     return result;
  434. }
  435.  
  436. float CMsDgridCtrl::RowTop(short RowNum)
  437. {
  438.     float result;
  439.     static BYTE parms[] =
  440.         VTS_I2;
  441.     InvokeHelper(0x1d, DISPATCH_METHOD, VT_R4, (void*)&result, parms,
  442.         RowNum);
  443.     return result;
  444. }
  445.  
  446. void CMsDgridCtrl::Scroll(long Cols, long Rows)
  447. {
  448.     static BYTE parms[] =
  449.         VTS_I4 VTS_I4;
  450.     InvokeHelper(0x1e, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  451.          Cols, Rows);
  452. }
  453.  
  454. void CMsDgridCtrl::Refresh()
  455. {
  456.     InvokeHelper(DISPID_REFRESH, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  457. }
  458.  
  459. LPDISPATCH CMsDgridCtrl::CaptureImage()
  460. {
  461.     LPDISPATCH result;
  462.     InvokeHelper(0x24, DISPATCH_METHOD, VT_DISPATCH, (void*)&result, NULL);
  463.     return result;
  464. }
  465.