home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.1 / PVFONT~1.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  3.0 KB  |  141 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 "pvfontsel.h"
  9.  
  10. // Dispatch interfaces referenced by this interface
  11. #include "font.h"
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CPVFontSel
  15.  
  16. IMPLEMENT_DYNCREATE(CPVFontSel, CWnd)
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // CPVFontSel properties
  20.  
  21. short CPVFontSel::GetAppearance()
  22. {
  23.     short result;
  24.     GetProperty(DISPID_APPEARANCE, VT_I2, (void*)&result);
  25.     return result;
  26. }
  27.  
  28. void CPVFontSel::SetAppearance(short propVal)
  29. {
  30.     SetProperty(DISPID_APPEARANCE, VT_I2, propVal);
  31. }
  32.  
  33. short CPVFontSel::GetBorderStyle()
  34. {
  35.     short result;
  36.     GetProperty(DISPID_BORDERSTYLE, VT_I2, (void*)&result);
  37.     return result;
  38. }
  39.  
  40. void CPVFontSel::SetBorderStyle(short propVal)
  41. {
  42.     SetProperty(DISPID_BORDERSTYLE, VT_I2, propVal);
  43. }
  44.  
  45. BOOL CPVFontSel::GetEnabled()
  46. {
  47.     BOOL result;
  48.     GetProperty(DISPID_ENABLED, VT_BOOL, (void*)&result);
  49.     return result;
  50. }
  51.  
  52. void CPVFontSel::SetEnabled(BOOL propVal)
  53. {
  54.     SetProperty(DISPID_ENABLED, VT_BOOL, propVal);
  55. }
  56.  
  57. OLE_HANDLE CPVFontSel::GetHWnd()
  58. {
  59.     OLE_HANDLE result;
  60.     GetProperty(DISPID_HWND, VT_I4, (void*)&result);
  61.     return result;
  62. }
  63.  
  64. void CPVFontSel::SetHWnd(OLE_HANDLE propVal)
  65. {
  66.     SetProperty(DISPID_HWND, VT_I4, propVal);
  67. }
  68.  
  69. COleFont CPVFontSel::GetFont()
  70. {
  71.     LPDISPATCH pDispatch;
  72.     GetProperty(DISPID_FONT, VT_DISPATCH, (void*)&pDispatch);
  73.     return COleFont(pDispatch);
  74. }
  75.  
  76. void CPVFontSel::SetFont(LPDISPATCH propVal)
  77. {
  78.     SetProperty(DISPID_FONT, VT_DISPATCH, propVal);
  79. }
  80.  
  81. /////////////////////////////////////////////////////////////////////////////
  82. // CPVFontSel operations
  83.  
  84. void CPVFontSel::SetItemHeight(short Height)
  85. {
  86.     static BYTE parms[] =
  87.         VTS_I2;
  88.     InvokeHelper(0x1, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  89.          Height);
  90. }
  91.  
  92. CString CPVFontSel::GetFontName()
  93. {
  94.     CString result;
  95.     InvokeHelper(0x2, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
  96.     return result;
  97. }
  98.  
  99. void CPVFontSel::SetFontName(LPCTSTR strFontName)
  100. {
  101.     static BYTE parms[] =
  102.         VTS_BSTR;
  103.     InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  104.          strFontName);
  105. }
  106.  
  107. short CPVFontSel::GetFontHeight()
  108. {
  109.     short result;
  110.     InvokeHelper(0x4, DISPATCH_METHOD, VT_I2, (void*)&result, NULL);
  111.     return result;
  112. }
  113.  
  114. short CPVFontSel::GetPointSize()
  115. {
  116.     short result;
  117.     InvokeHelper(0x5, DISPATCH_METHOD, VT_I2, (void*)&result, NULL);
  118.     return result;
  119. }
  120.  
  121. void CPVFontSel::SetFontHeight(short Height)
  122. {
  123.     static BYTE parms[] =
  124.         VTS_I2;
  125.     InvokeHelper(0x6, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  126.          Height);
  127. }
  128.  
  129. void CPVFontSel::SetPointSize(short PointSize)
  130. {
  131.     static BYTE parms[] =
  132.         VTS_I2;
  133.     InvokeHelper(0x7, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
  134.          PointSize);
  135. }
  136.  
  137. void CPVFontSel::AboutBox()
  138. {
  139.     InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  140. }
  141.