home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.1 / BRANCH.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  3.7 KB  |  183 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 "branch.h"
  9.  
  10. // Dispatch interfaces referenced by this interface
  11. #include "picture.h"
  12.  
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CBranch properties
  16.  
  17. CString CBranch::GetText()
  18. {
  19.     CString result;
  20.     GetProperty(0x1, VT_BSTR, (void*)&result);
  21.     return result;
  22. }
  23.  
  24. void CBranch::SetText(LPCTSTR propVal)
  25. {
  26.     SetProperty(0x1, VT_BSTR, propVal);
  27. }
  28.  
  29. long CBranch::GetData()
  30. {
  31.     long result;
  32.     GetProperty(0x2, VT_I4, (void*)&result);
  33.     return result;
  34. }
  35.  
  36. void CBranch::SetData(long propVal)
  37. {
  38.     SetProperty(0x2, VT_I4, propVal);
  39. }
  40.  
  41. short CBranch::GetLevel()
  42. {
  43.     short result;
  44.     GetProperty(0x3, VT_I2, (void*)&result);
  45.     return result;
  46. }
  47.  
  48. void CBranch::SetLevel(short propVal)
  49. {
  50.     SetProperty(0x3, VT_I2, propVal);
  51. }
  52.  
  53. BOOL CBranch::GetIsOpen()
  54. {
  55.     BOOL result;
  56.     GetProperty(0x4, VT_BOOL, (void*)&result);
  57.     return result;
  58. }
  59.  
  60. void CBranch::SetIsOpen(BOOL propVal)
  61. {
  62.     SetProperty(0x4, VT_BOOL, propVal);
  63. }
  64.  
  65. short CBranch::GetStandardItemPicture()
  66. {
  67.     short result;
  68.     GetProperty(0x5, VT_I2, (void*)&result);
  69.     return result;
  70. }
  71.  
  72. void CBranch::SetStandardItemPicture(short propVal)
  73. {
  74.     SetProperty(0x5, VT_I2, propVal);
  75. }
  76.  
  77. CPicture CBranch::GetCustomItemPicture()
  78. {
  79.     LPDISPATCH pDispatch;
  80.     GetProperty(0x6, VT_DISPATCH, (void*)&pDispatch);
  81.     return CPicture(pDispatch);
  82. }
  83.  
  84. void CBranch::SetCustomItemPicture(LPDISPATCH propVal)
  85. {
  86.     SetProperty(0x6, VT_DISPATCH, propVal);
  87. }
  88.  
  89. /////////////////////////////////////////////////////////////////////////////
  90. // CBranch operations
  91.  
  92. void CBranch::Clear()
  93. {
  94.     InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  95. }
  96.  
  97. CBranch CBranch::Add(short relationship, short relative, LPCTSTR text)
  98. {
  99.     LPDISPATCH pDispatch;
  100.     static BYTE parms[] =
  101.         VTS_I2 VTS_I2 VTS_BSTR;
  102.     InvokeHelper(0x8, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
  103.         relationship, relative, text);
  104.     return CBranch(pDispatch);
  105. }
  106.  
  107. CBranch CBranch::Get(short relationship, short relative)
  108. {
  109.     LPDISPATCH pDispatch;
  110.     static BYTE parms[] =
  111.         VTS_I2 VTS_I2;
  112.     InvokeHelper(0x9, DISPATCH_METHOD, VT_DISPATCH, (void*)&pDispatch, parms,
  113.         relationship, relative);
  114.     return CBranch(pDispatch);
  115. }
  116.  
  117. void CBranch::Remove()
  118. {
  119.     InvokeHelper(0xa, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  120. }
  121.  
  122. void CBranch::Lock()
  123. {
  124.     InvokeHelper(0xb, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  125. }
  126.  
  127. void CBranch::Unlock()
  128. {
  129.     InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  130. }
  131.  
  132. BOOL CBranch::IsLocked()
  133. {
  134.     BOOL result;
  135.     InvokeHelper(0xd, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
  136.     return result;
  137. }
  138.  
  139. BOOL CBranch::IsValid()
  140. {
  141.     BOOL result;
  142.     InvokeHelper(0xe, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
  143.     return result;
  144. }
  145.  
  146. BOOL CBranch::IsMainBranch()
  147. {
  148.     BOOL result;
  149.     InvokeHelper(0xf, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
  150.     return result;
  151. }
  152.  
  153. void CBranch::Open(short cmd)
  154. {
  155.     static BYTE parms[] =
  156.         VTS_I2;
  157.     InvokeHelper(0x10, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  158.          cmd);
  159. }
  160.  
  161. void CBranch::Close(short cmd)
  162. {
  163.     static BYTE parms[] =
  164.         VTS_I2;
  165.     InvokeHelper(0x11, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  166.          cmd);
  167. }
  168.  
  169. void CBranch::Select(short cmd)
  170. {
  171.     static BYTE parms[] =
  172.         VTS_I2;
  173.     InvokeHelper(0x12, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  174.          cmd);
  175. }
  176.  
  177. long CBranch::GetHandle()
  178. {
  179.     long result;
  180.     InvokeHelper(0x13, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
  181.     return result;
  182. }
  183.