home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / controls / smiley / smilectl.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.3 KB  |  108 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 "smilectl.h"
  9.  
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CSmileCtl
  12.  
  13. IMPLEMENT_DYNCREATE(CSmileCtl, CWnd)
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSmileCtl properties
  17.  
  18. OLE_COLOR CSmileCtl::GetBackColor()
  19. {
  20.     OLE_COLOR result;
  21.     GetProperty(DISPID_BACKCOLOR, VT_I4, (void*)&result);
  22.     return result;
  23. }
  24.  
  25. void CSmileCtl::SetBackColor(OLE_COLOR propVal)
  26. {
  27.     SetProperty(DISPID_BACKCOLOR, VT_I4, propVal);
  28. }
  29.  
  30. short CSmileCtl::GetBorderStyle()
  31. {
  32.     short result;
  33.     GetProperty(DISPID_BORDERSTYLE, VT_I2, (void*)&result);
  34.     return result;
  35. }
  36.  
  37. void CSmileCtl::SetBorderStyle(short propVal)
  38. {
  39.     SetProperty(DISPID_BORDERSTYLE, VT_I2, propVal);
  40. }
  41.  
  42. LPFONTDISP CSmileCtl::GetFont()
  43. {
  44.     LPFONTDISP result;
  45.     GetProperty(DISPID_FONT, VT_DISPATCH, (void*)&result);
  46.     return result;
  47. }
  48.  
  49. void CSmileCtl::SetFont(LPFONTDISP propVal)
  50. {
  51.     SetProperty(DISPID_FONT, VT_DISPATCH, propVal);
  52. }
  53.  
  54. OLE_COLOR CSmileCtl::GetForeColor()
  55. {
  56.     OLE_COLOR result;
  57.     GetProperty(DISPID_FORECOLOR, VT_I4, (void*)&result);
  58.     return result;
  59. }
  60.  
  61. void CSmileCtl::SetForeColor(OLE_COLOR propVal)
  62. {
  63.     SetProperty(DISPID_FORECOLOR, VT_I4, propVal);
  64. }
  65.  
  66. BSTR CSmileCtl::GetCaption()
  67. {
  68.     BSTR result;
  69.     GetProperty(DISPID_CAPTION, VT_BSTR, (void*)&result);
  70.     return result;
  71. }
  72.  
  73. void CSmileCtl::SetCaption(LPCTSTR propVal)
  74. {
  75.     SetProperty(DISPID_CAPTION, VT_BSTR, propVal);
  76. }
  77.  
  78. BOOL CSmileCtl::GetSad()
  79. {
  80.     BOOL result;
  81.     GetProperty(0x1, VT_BOOL, (void*)&result);
  82.     return result;
  83. }
  84.  
  85. void CSmileCtl::SetSad(BOOL propVal)
  86. {
  87.     SetProperty(0x1, VT_BOOL, propVal);
  88. }
  89.  
  90. /////////////////////////////////////////////////////////////////////////////
  91. // CSmileCtl operations
  92.  
  93. void CSmileCtl::Beep()
  94. {
  95.     InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  96. }
  97.  
  98. void CSmileCtl::Wink(BOOL bWink)
  99. {
  100.     static BYTE parms[] = VTS_BOOL;
  101.     InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms, bWink);
  102. }
  103.  
  104. void CSmileCtl::AboutBox()
  105. {
  106.     InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
  107. }
  108.