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