Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
4.7 KiB

  1. // Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1993 Microsoft Corporation,
  3. // All rights reserved.
  4. // This source code is only intended as a supplement to the
  5. // Microsoft Foundation Classes Reference and Microsoft
  6. // QuickHelp and/or WinHelp documentation provided with the library.
  7. // See these sources for detailed information regarding the
  8. // Microsoft Foundation Classes product.
  9. // Inlines for AFXEXT.H
  10. /////////////////////////////////////////////////////////////////////////////
  11. // main inlines
  12. #ifdef _AFXEXT_INLINE
  13. _AFXEXT_INLINE CCreateContext::CCreateContext()
  14. { memset(this, 0, sizeof(*this)); }
  15. // CSplitterWnd
  16. _AFXEXT_INLINE int CSplitterWnd::GetRowCount() const
  17. { return m_nRows; }
  18. _AFXEXT_INLINE int CSplitterWnd::GetColumnCount() const
  19. { return m_nCols; }
  20. // control bars
  21. _AFXEXT_INLINE int CControlBar::GetCount() const
  22. { return m_nCount; }
  23. _AFXEXT_INLINE BOOL CToolBar::LoadBitmap(UINT nIDResource)
  24. { return LoadBitmap(MAKEINTRESOURCE(nIDResource)); }
  25. _AFXEXT_INLINE BOOL CDialogBar::Create(CWnd* pParentWnd, UINT nIDTemplate,
  26. UINT nStyle, UINT nID)
  27. { return Create(pParentWnd, MAKEINTRESOURCE(nIDTemplate), nStyle, nID); }
  28. // CRectTracker
  29. _AFXEXT_INLINE CRectTracker::CRectTracker()
  30. { Construct(); }
  31. // CBitmapButton
  32. _AFXEXT_INLINE CBitmapButton::CBitmapButton()
  33. { }
  34. // CPrintInfo
  35. _AFXEXT_INLINE void CPrintInfo::SetMinPage(UINT nMinPage)
  36. { m_pPD->m_pd.nMinPage = nMinPage; }
  37. _AFXEXT_INLINE void CPrintInfo::SetMaxPage(UINT nMaxPage)
  38. { m_pPD->m_pd.nMaxPage = nMaxPage; }
  39. _AFXEXT_INLINE UINT CPrintInfo::GetMinPage() const
  40. { return m_pPD->m_pd.nMinPage; }
  41. _AFXEXT_INLINE UINT CPrintInfo::GetMaxPage() const
  42. { return m_pPD->m_pd.nMaxPage; }
  43. _AFXEXT_INLINE UINT CPrintInfo::GetFromPage() const
  44. { return m_pPD->m_pd.nFromPage; }
  45. _AFXEXT_INLINE UINT CPrintInfo::GetToPage() const
  46. { return m_pPD->m_pd.nToPage; }
  47. // CEditView
  48. _AFXEXT_INLINE CEdit& CEditView::GetEditCtrl() const
  49. { return *(CEdit*)this; }
  50. #endif //_AFXEXT_INLINE
  51. /////////////////////////////////////////////////////////////////////////////
  52. // VBX specific inlines
  53. #ifdef _AFXVBX_INLINE
  54. _AFXVBX_INLINE BOOL CVBControl::SetNumProperty(int nPropIndex, LONG lValue,
  55. int index /* = 0 */)
  56. { return SetPropertyWithType(nPropIndex, TYPE_INTEGER, lValue, index); }
  57. _AFXVBX_INLINE BOOL CVBControl::SetNumProperty(LPCSTR lpszPropName, LONG lValue,
  58. int index /* = 0 */)
  59. { return SetPropertyWithType(GetPropIndex(lpszPropName),TYPE_INTEGER,lValue,index); }
  60. _AFXVBX_INLINE BOOL CVBControl::SetFloatProperty(LPCSTR lpszPropName, float value,
  61. int index /* = 0 */)
  62. { return SetFloatProperty(GetPropIndex(lpszPropName), value, index); }
  63. _AFXVBX_INLINE BOOL CVBControl::SetStrProperty(int nPropIndex, LPCSTR lpszValue,
  64. int index /* = 0 */)
  65. { return SetPropertyWithType(nPropIndex, TYPE_STRING, (LONG)lpszValue, index); }
  66. _AFXVBX_INLINE BOOL CVBControl::SetStrProperty(LPCSTR lpszPropName, LPCSTR lpszValue,
  67. int index /* = 0 */)
  68. { return SetPropertyWithType(GetPropIndex(lpszPropName), TYPE_STRING,
  69. (LONG)lpszValue, index); }
  70. _AFXVBX_INLINE BOOL CVBControl::SetPictureProperty(int nPropIndex, HPIC hPic,
  71. int index /* = 0 */)
  72. { return SetPropertyWithType(nPropIndex, TYPE_PICTURE, (UINT)hPic,
  73. index); }
  74. _AFXVBX_INLINE BOOL CVBControl::SetPictureProperty(LPCSTR lpszPropName, HPIC hPic,
  75. int index /* = 0 */)
  76. { return SetPropertyWithType(GetPropIndex(lpszPropName), TYPE_PICTURE,
  77. (UINT)hPic, index); }
  78. _AFXVBX_INLINE LONG CVBControl::GetNumProperty(int nPropIndex, int index /* = 0 */)
  79. { return GetNumPropertyWithType(nPropIndex, TYPE_INTEGER, index); }
  80. _AFXVBX_INLINE LONG CVBControl::GetNumProperty(LPCSTR lpszPropName, int index /* = 0 */)
  81. { return GetNumPropertyWithType(GetPropIndex(lpszPropName), TYPE_INTEGER, index); }
  82. _AFXVBX_INLINE float CVBControl::GetFloatProperty(LPCSTR lpszPropName,
  83. int index /* = 0 */)
  84. { return GetFloatProperty(GetPropIndex(lpszPropName), index); }
  85. _AFXVBX_INLINE CString CVBControl::GetStrProperty(LPCSTR lpszPropName,
  86. int index /* = 0 */)
  87. { return GetStrProperty(GetPropIndex(lpszPropName), index); }
  88. _AFXVBX_INLINE HPIC CVBControl::GetPictureProperty(int nPropIndex,
  89. int index /* = 0 */)
  90. { return (HPIC) GetNumPropertyWithType(nPropIndex, TYPE_PICTURE, index); }
  91. _AFXVBX_INLINE HPIC CVBControl::GetPictureProperty(LPCSTR lpszPropName,
  92. int index /* = 0 */)
  93. { return (HPIC) GetNumPropertyWithType(GetPropIndex(lpszPropName), TYPE_PICTURE, index); }
  94. _AFXVBX_INLINE HCTL CVBControl::GetHCTL()
  95. { return m_hCtl; }
  96. _AFXVBX_INLINE CVBControlModel* CVBControl::GetModel()
  97. { return m_pModel; }
  98. #endif //_AFXVBX_INLINE
  99. /////////////////////////////////////////////////////////////////////////////