home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / MFC / INCLUDE / AFXEXT.IN_ / AFXEXT.IN
Encoding:
Text File  |  1993-02-08  |  4.6 KB  |  107 lines

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