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.

322 lines
23 KiB

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1998 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 related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10. // Inlines for AFXCMN.H (via WINCTRL6.CPP)
  11. #ifdef _AFXCMN_INLINE
  12. /////////////////////////////////////////////////////////////////////////////
  13. _AFXCMN_INLINE BOOL CStatusBarCtrl::IsSimple() const
  14. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_ISSIMPLE, 0, 0); }
  15. _AFXCMN_INLINE void CStatusBarCtrl::SetTipText(int nPane, LPCTSTR pszTipText)
  16. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, SB_SETTIPTEXT, nPane, (LPARAM)pszTipText); }
  17. _AFXCMN_INLINE COLORREF CStatusBarCtrl::SetBkColor(COLORREF cr)
  18. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, SB_SETBKCOLOR, 0, (LPARAM)cr); }
  19. _AFXCMN_INLINE BOOL CStatusBarCtrl::SetIcon(int nPane, HICON hIcon)
  20. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, SB_SETICON, nPane, (LPARAM)hIcon); }
  21. /////////////////////////////////////////////////////////////////////////////
  22. _AFXCMN_INLINE void CSpinButtonCtrl::SetRange32(int nLower, int nUpper)
  23. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, UDM_SETRANGE32, (WPARAM) nLower, (LPARAM) nUpper); }
  24. _AFXCMN_INLINE void CSpinButtonCtrl::GetRange32(int& nLower, int& nUpper) const
  25. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, UDM_GETRANGE32, (WPARAM) &nLower, (LPARAM) &nUpper); }
  26. /////////////////////////////////////////////////////////////////////////////
  27. _AFXCMN_INLINE DWORD CToolBarCtrl::GetButtonSize() const
  28. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETBUTTONSIZE, 0, 0L); }
  29. _AFXCMN_INLINE CImageList* CToolBarCtrl::GetDisabledImageList() const
  30. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETDISABLEDIMAGELIST, 0, 0)); }
  31. _AFXCMN_INLINE CImageList* CToolBarCtrl::GetHotImageList() const
  32. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETHOTIMAGELIST, 0, 0)); }
  33. _AFXCMN_INLINE CImageList* CToolBarCtrl::GetImageList() const
  34. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0)); }
  35. _AFXCMN_INLINE DWORD CToolBarCtrl::GetStyle() const
  36. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_GETSTYLE, 0, 0L); }
  37. _AFXCMN_INLINE INT CToolBarCtrl::GetMaxTextRows() const
  38. { ASSERT(::IsWindow(m_hWnd)); return (INT) ::SendMessage(m_hWnd, TB_GETTEXTROWS, 0, 0L); }
  39. _AFXCMN_INLINE BOOL CToolBarCtrl::GetRect(int nID, LPRECT lpRect) const
  40. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETRECT, nID, (LPARAM)lpRect); }
  41. _AFXCMN_INLINE BOOL CToolBarCtrl::IsButtonHighlighted(int nID) const
  42. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_ISBUTTONHIGHLIGHTED, nID, 0); }
  43. _AFXCMN_INLINE void CToolBarCtrl::LoadImages(int iBitmapID, HINSTANCE hinst)
  44. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_LOADIMAGES, iBitmapID, (LPARAM)hinst); }
  45. _AFXCMN_INLINE BOOL CToolBarCtrl::SetButtonWidth(int cxMin, int cxMax)
  46. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONWIDTH, 0, MAKELPARAM(cxMin, cxMax)); }
  47. _AFXCMN_INLINE CImageList* CToolBarCtrl::SetDisabledImageList(CImageList* pImageList)
  48. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETDISABLEDIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
  49. _AFXCMN_INLINE CImageList* CToolBarCtrl::SetHotImageList(CImageList* pImageList)
  50. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETHOTIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
  51. _AFXCMN_INLINE CImageList* CToolBarCtrl::SetImageList(CImageList* pImageList)
  52. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
  53. _AFXCMN_INLINE BOOL CToolBarCtrl::SetIndent(int iIndent)
  54. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETINDENT, iIndent, 0L); }
  55. _AFXCMN_INLINE BOOL CToolBarCtrl::SetMaxTextRows(int iMaxRows)
  56. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETMAXTEXTROWS, iMaxRows, 0L); }
  57. _AFXCMN_INLINE void CToolBarCtrl::SetStyle(DWORD dwStyle)
  58. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETSTYLE, 0, dwStyle); }
  59. _AFXCMN_INLINE BOOL CToolBarCtrl::GetButtonInfo(int nID, TBBUTTONINFO* ptbbi) const
  60. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETBUTTONINFO, nID, (LPARAM)ptbbi); }
  61. _AFXCMN_INLINE BOOL CToolBarCtrl::SetButtonInfo(int nID, TBBUTTONINFO* ptbbi)
  62. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETBUTTONINFO, nID, (LPARAM)ptbbi); }
  63. _AFXCMN_INLINE DWORD CToolBarCtrl::SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags)
  64. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, TB_SETDRAWTEXTFLAGS, dwMask, dwDTFlags); }
  65. _AFXCMN_INLINE BOOL CToolBarCtrl::GetAnchorHighlight() const
  66. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETANCHORHIGHLIGHT, 0, 0); }
  67. _AFXCMN_INLINE BOOL CToolBarCtrl::SetAnchorHighlight(BOOL fAnchor)
  68. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_SETANCHORHIGHLIGHT, fAnchor, 0); }
  69. _AFXCMN_INLINE int CToolBarCtrl::GetHotItem() const
  70. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_GETHOTITEM, 0, 0); }
  71. _AFXCMN_INLINE int CToolBarCtrl::SetHotItem(int nHot)
  72. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TB_SETHOTITEM, nHot, 0); }
  73. _AFXCMN_INLINE void CToolBarCtrl::GetInsertMark(TBINSERTMARK* ptbim) const
  74. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_GETINSERTMARK, 0, (LPARAM)ptbim); }
  75. _AFXCMN_INLINE void CToolBarCtrl::SetInsertMark(TBINSERTMARK* ptbim)
  76. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TB_SETINSERTMARK, 0, (LPARAM)ptbim); }
  77. _AFXCMN_INLINE BOOL CToolBarCtrl::GetMaxSize(LPSIZE pSize) const
  78. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_GETMAXSIZE, 0, (LPARAM)pSize); }
  79. _AFXCMN_INLINE BOOL CToolBarCtrl::InsertMarkHitTest(LPPOINT ppt, LPTBINSERTMARK ptbim) const
  80. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_INSERTMARKHITTEST, (WPARAM)ppt, (LPARAM)ptbim); }
  81. _AFXCMN_INLINE BOOL CToolBarCtrl::MapAccelerator(TCHAR chAccel, UINT* pIDBtn)
  82. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MAPACCELERATOR, (WPARAM)chAccel, (LPARAM)pIDBtn); }
  83. _AFXCMN_INLINE BOOL CToolBarCtrl::MarkButton(int nID, BOOL bHighlight)
  84. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MARKBUTTON, nID, MAKELPARAM(bHighlight, 0)); }
  85. _AFXCMN_INLINE BOOL CToolBarCtrl::MoveButton(UINT nOldPos, UINT nNewPos)
  86. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, TB_MOVEBUTTON, nOldPos, nNewPos); }
  87. /////////////////////////////////////////////////////////////////////////////
  88. _AFXCMN_INLINE DWORD CListCtrl::SetExtendedStyle(DWORD dwNewStyle)
  89. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM) dwNewStyle); }
  90. _AFXCMN_INLINE HCURSOR CListCtrl::SetHotCursor(HCURSOR hc)
  91. { ASSERT(::IsWindow(m_hWnd) && hc != NULL); return (HCURSOR) ::SendMessage(m_hWnd, LVM_SETHOTCURSOR, 0, (LPARAM) hc); }
  92. _AFXCMN_INLINE int CListCtrl::SetHotItem(int iIndex)
  93. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SETHOTITEM, (WPARAM) iIndex, 0); }
  94. _AFXCMN_INLINE void CListCtrl::SetWorkAreas(int nWorkAreas, LPRECT lpRect)
  95. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LVM_SETWORKAREAS, nWorkAreas, (LPARAM) lpRect); }
  96. _AFXCMN_INLINE int CListCtrl::SubItemHitTest(LPLVHITTESTINFO pInfo)
  97. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SUBITEMHITTEST, 0, (LPARAM) pInfo); }
  98. _AFXCMN_INLINE HCURSOR CListCtrl::GetHotCursor()
  99. { ASSERT(::IsWindow(m_hWnd)); return (HCURSOR) ::SendMessage(m_hWnd, LVM_GETHOTCURSOR, 0, 0); }
  100. _AFXCMN_INLINE int CListCtrl::GetHotItem()
  101. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETHOTITEM, 0, 0); }
  102. _AFXCMN_INLINE DWORD CListCtrl::GetExtendedStyle()
  103. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0); }
  104. _AFXCMN_INLINE CSize CListCtrl::ApproximateViewRect(CSize sz, int iCount) const
  105. { ASSERT(::IsWindow(m_hWnd)); return CSize((DWORD) ::SendMessage(m_hWnd, LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(sz.cx, sz.cy))); }
  106. _AFXCMN_INLINE BOOL CListCtrl::GetBkImage(LVBKIMAGE* plvbkImage) const
  107. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, LVM_GETBKIMAGE, 0, (LPARAM)plvbkImage); }
  108. _AFXCMN_INLINE DWORD CListCtrl::GetHoverTime() const
  109. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_GETHOVERTIME, 0, 0); }
  110. _AFXCMN_INLINE void CListCtrl::GetWorkAreas(int nWorkAreas, LPRECT prc) const
  111. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LVM_GETWORKAREAS, nWorkAreas, (LPARAM)prc); }
  112. _AFXCMN_INLINE BOOL CListCtrl::SetBkImage(LVBKIMAGE* plvbkImage)
  113. { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, LVM_SETBKIMAGE, 0, (LPARAM)plvbkImage); }
  114. _AFXCMN_INLINE DWORD CListCtrl::SetHoverTime(DWORD dwHoverTime)
  115. { ASSERT(::IsWindow(m_hWnd)); return (DWORD)::SendMessage(m_hWnd, LVM_SETHOVERTIME, 0, dwHoverTime); }
  116. _AFXCMN_INLINE UINT CListCtrl::GetNumberOfWorkAreas() const
  117. { ASSERT(::IsWindow(m_hWnd)); UINT nWorkAreas; ::SendMessage(m_hWnd, LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)&nWorkAreas); return nWorkAreas; }
  118. _AFXCMN_INLINE int CListCtrl::SetSelectionMark(int iIndex)
  119. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_SETSELECTIONMARK, 0, (LPARAM) iIndex); }
  120. _AFXCMN_INLINE int CListCtrl::GetSelectionMark()
  121. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, LVM_GETSELECTIONMARK, 0, 0); }
  122. /////////////////////////////////////////////////////////////////////////////
  123. _AFXCMN_INLINE BOOL CHeaderCtrl::GetItemRect(int nIndex, LPRECT lpRect) const
  124. { ASSERT(::IsWindow(m_hWnd)); ASSERT(lpRect != NULL); return (BOOL)::SendMessage(m_hWnd, HDM_GETITEMRECT, nIndex, (LPARAM)lpRect); }
  125. _AFXCMN_INLINE int CHeaderCtrl::OrderToIndex(int nOrder) const
  126. { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_ORDERTOINDEX, nOrder, 0); }
  127. _AFXCMN_INLINE int CHeaderCtrl::SetHotDivider(CPoint pt)
  128. { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_SETHOTDIVIDER, TRUE, MAKELPARAM(pt.x, pt.y)); }
  129. _AFXCMN_INLINE int CHeaderCtrl::SetHotDivider(int nIndex)
  130. { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, HDM_SETHOTDIVIDER, FALSE, nIndex); }
  131. _AFXCMN_INLINE CImageList* CHeaderCtrl::GetImageList() const
  132. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_GETIMAGELIST, 0, 0L)); }
  133. _AFXCMN_INLINE CImageList* CHeaderCtrl::SetImageList(CImageList* pImageList)
  134. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
  135. _AFXCMN_INLINE CImageList* CHeaderCtrl::CreateDragImage(int nIndex)
  136. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, HDM_CREATEDRAGIMAGE, nIndex, 0L)); }
  137. /////////////////////////////////////////////////////////////////////////////
  138. _AFXCMN_INLINE CReBarCtrl::CReBarCtrl()
  139. { }
  140. _AFXCMN_INLINE UINT CReBarCtrl::GetBandCount() const
  141. { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBANDCOUNT, 0, 0L); }
  142. _AFXCMN_INLINE BOOL CReBarCtrl::GetBandInfo(UINT uBand, REBARBANDINFO* prbbi) const
  143. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBANDINFO, uBand, (LPARAM)prbbi); }
  144. _AFXCMN_INLINE UINT CReBarCtrl::GetBarHeight() const
  145. { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETBARHEIGHT, 0, 0L); }
  146. _AFXCMN_INLINE BOOL CReBarCtrl::GetBarInfo(REBARINFO* prbi) const
  147. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETBARINFO, 0, (LPARAM)prbi); }
  148. _AFXCMN_INLINE COLORREF CReBarCtrl::GetBkColor() const
  149. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETBKCOLOR, 0, 0L); }
  150. _AFXCMN_INLINE IDropTarget* CReBarCtrl::GetDropTarget() const
  151. { ASSERT(::IsWindow(m_hWnd)); IDropTarget* pdt; ::SendMessage(m_hWnd, RB_GETDROPTARGET, 0, (LPARAM)&pdt); return pdt; }
  152. _AFXCMN_INLINE BOOL CReBarCtrl::GetRect(UINT uBand, LPRECT prc) const
  153. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_GETRECT, uBand, (LPARAM)prc); }
  154. _AFXCMN_INLINE UINT CReBarCtrl::GetRowCount() const
  155. { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWCOUNT, 0, 0L); }
  156. _AFXCMN_INLINE UINT CReBarCtrl::GetRowHeight(UINT uRow) const
  157. { ASSERT(::IsWindow(m_hWnd)); return (UINT) ::SendMessage(m_hWnd, RB_GETROWHEIGHT, uRow, 0L); }
  158. _AFXCMN_INLINE COLORREF CReBarCtrl::GetTextColor() const
  159. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_GETTEXTCOLOR, 0, 0L); }
  160. _AFXCMN_INLINE CToolTipCtrl* CReBarCtrl::GetToolTips() const
  161. { ASSERT(::IsWindow(m_hWnd)); return (CToolTipCtrl*)CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_GETTOOLTIPS, 0, 0L)); }
  162. _AFXCMN_INLINE int CReBarCtrl::IDToIndex(UINT uBandID) const
  163. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_IDTOINDEX, uBandID, 0L); }
  164. _AFXCMN_INLINE BOOL CReBarCtrl::SetBandInfo(UINT uBand, REBARBANDINFO* prbbi)
  165. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBANDINFO, uBand, (LPARAM)prbbi); }
  166. _AFXCMN_INLINE BOOL CReBarCtrl::SetBarInfo(REBARINFO* prbi)
  167. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SETBARINFO, 0, (LPARAM)prbi); }
  168. _AFXCMN_INLINE COLORREF CReBarCtrl::SetBkColor(COLORREF clr)
  169. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETBKCOLOR, 0, (LPARAM)clr); }
  170. _AFXCMN_INLINE CWnd* CReBarCtrl::SetOwner(CWnd* pWnd)
  171. { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle((HWND)::SendMessage(m_hWnd, RB_SETPARENT, (WPARAM)pWnd->m_hWnd, 0L)); }
  172. _AFXCMN_INLINE COLORREF CReBarCtrl::SetTextColor(COLORREF clr)
  173. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, RB_SETTEXTCOLOR, 0, (LPARAM)clr); }
  174. _AFXCMN_INLINE void CReBarCtrl::SetToolTips(CToolTipCtrl* pTip)
  175. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_SETTOOLTIPS, (WPARAM)pTip->m_hWnd, 0L); }
  176. _AFXCMN_INLINE void CReBarCtrl::BeginDrag(UINT uBand, DWORD dwPos)
  177. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_BEGINDRAG, uBand, dwPos); }
  178. _AFXCMN_INLINE BOOL CReBarCtrl::DeleteBand(UINT uBand)
  179. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_DELETEBAND, uBand, 0L); }
  180. _AFXCMN_INLINE void CReBarCtrl::DragMove(DWORD dwPos)
  181. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_DRAGMOVE, 0, dwPos); }
  182. _AFXCMN_INLINE void CReBarCtrl::EndDrag()
  183. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_ENDDRAG, 0, 0L); }
  184. _AFXCMN_INLINE int CReBarCtrl::HitTest(RBHITTESTINFO* prbht)
  185. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, RB_HITTEST, 0, (LPARAM)prbht); }
  186. _AFXCMN_INLINE BOOL CReBarCtrl::InsertBand(UINT uIndex, REBARBANDINFO* prbbi)
  187. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_INSERTBAND, uIndex, (LPARAM)prbbi); }
  188. _AFXCMN_INLINE void CReBarCtrl::MaximizeBand(UINT uBand)
  189. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MAXIMIZEBAND, uBand, 0L); }
  190. _AFXCMN_INLINE void CReBarCtrl::MinimizeBand(UINT uBand)
  191. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_MINIMIZEBAND, uBand, 0L); }
  192. _AFXCMN_INLINE BOOL CReBarCtrl::SizeToRect(CRect& rect)
  193. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SIZETORECT, 0, (LPARAM)&rect); }
  194. _AFXCMN_INLINE BOOL CReBarCtrl::ShowBand(UINT uBand, BOOL fShow /*= TRUE*/)
  195. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_SHOWBAND, uBand, fShow); }
  196. _AFXCMN_INLINE void CReBarCtrl::GetBandBorders(UINT uBand, LPRECT prc) const
  197. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, RB_GETBANDBORDERS, uBand, (LPARAM)prc); }
  198. _AFXCMN_INLINE CPalette* CReBarCtrl::GetPalette() const
  199. { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_GETPALETTE, 0, 0L)); }
  200. _AFXCMN_INLINE CPalette* CReBarCtrl::SetPalette(HPALETTE hPal)
  201. { ASSERT(::IsWindow(m_hWnd)); return CPalette::FromHandle((HPALETTE)::SendMessage(m_hWnd, RB_SETPALETTE, 0, (LPARAM)hPal)); }
  202. _AFXCMN_INLINE BOOL CReBarCtrl::MoveBand(UINT uFrom, UINT uTo)
  203. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, RB_MOVEBAND, uFrom, uTo); }
  204. /////////////////////////////////////////////////////////////////////////////
  205. _AFXCMN_INLINE void CToolTipCtrl::SetDelayTime(UINT nDelay)
  206. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETDELAYTIME, 0, nDelay); }
  207. _AFXCMN_INLINE int CToolTipCtrl::GetDelayTime(DWORD dwDuration) const
  208. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_GETDELAYTIME, dwDuration, 0L); }
  209. _AFXCMN_INLINE void CToolTipCtrl::GetMargin(LPRECT lprc) const
  210. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_GETMARGIN, 0, (LPARAM)lprc); }
  211. _AFXCMN_INLINE int CToolTipCtrl::GetMaxTipWidth() const
  212. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_GETMAXTIPWIDTH, 0, 0L); }
  213. _AFXCMN_INLINE COLORREF CToolTipCtrl::GetTipBkColor() const
  214. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TTM_GETTIPBKCOLOR, 0, 0L); }
  215. _AFXCMN_INLINE COLORREF CToolTipCtrl::GetTipTextColor() const
  216. { ASSERT(::IsWindow(m_hWnd)); return (COLORREF) ::SendMessage(m_hWnd, TTM_GETTIPTEXTCOLOR, 0, 0L); }
  217. _AFXCMN_INLINE void CToolTipCtrl::Pop()
  218. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_POP, 0, 0L); }
  219. _AFXCMN_INLINE void CToolTipCtrl::SetDelayTime(DWORD dwDuration, int iTime)
  220. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETDELAYTIME, dwDuration, MAKELPARAM(iTime, 0)); }
  221. _AFXCMN_INLINE void CToolTipCtrl::SetMargin(LPRECT lprc)
  222. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETMARGIN, 0, (LPARAM)lprc); }
  223. _AFXCMN_INLINE int CToolTipCtrl::SetMaxTipWidth(int iWidth)
  224. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, TTM_SETMAXTIPWIDTH, 0, iWidth); }
  225. _AFXCMN_INLINE void CToolTipCtrl::SetTipBkColor(COLORREF clr)
  226. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETTIPBKCOLOR, clr, 0L); }
  227. _AFXCMN_INLINE void CToolTipCtrl::SetTipTextColor(COLORREF clr)
  228. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_SETTIPTEXTCOLOR, clr, 0L); }
  229. _AFXCMN_INLINE void CToolTipCtrl::Update()
  230. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, TTM_UPDATE, 0, 0L); }
  231. /////////////////////////////////////////////////////////////////////////////
  232. _AFXCMN_INLINE CComboBoxEx::CComboBoxEx()
  233. { }
  234. _AFXCMN_INLINE DWORD CComboBoxEx::GetExtendedStyle() const
  235. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_GETEXTENDEDSTYLE, 0, 0); }
  236. _AFXCMN_INLINE DWORD CComboBoxEx::SetExtendedStyle(DWORD dwExMask, DWORD dwExStyles)
  237. { ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, CBEM_SETEXTENDEDSTYLE, (DWORD) dwExMask, (LPARAM) dwExStyles); }
  238. _AFXCMN_INLINE BOOL CComboBoxEx::HasEditChanged()
  239. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, CBEM_HASEDITCHANGED, 0, 0); }
  240. _AFXCMN_INLINE CEdit* CComboBoxEx::GetEditCtrl()
  241. { ASSERT(::IsWindow(m_hWnd)); return (CEdit*) CEdit::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETEDITCONTROL, 0, 0)); }
  242. _AFXCMN_INLINE CComboBox* CComboBoxEx::GetComboBoxCtrl()
  243. { ASSERT(::IsWindow(m_hWnd)); return (CComboBox*) CComboBox::FromHandle((HWND) ::SendMessage(m_hWnd, CBEM_GETCOMBOCONTROL, 0, 0)); }
  244. _AFXCMN_INLINE CImageList* CComboBoxEx::SetImageList(CImageList* pImageList)
  245. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_SETIMAGELIST, 0, (LPARAM)pImageList->GetSafeHandle())); }
  246. _AFXCMN_INLINE CImageList* CComboBoxEx::GetImageList() const
  247. { ASSERT(::IsWindow(m_hWnd)); return CImageList::FromHandle((HIMAGELIST) ::SendMessage(m_hWnd, CBEM_GETIMAGELIST, 0, 0)); }
  248. // While CComboBoxEx derives from CComboBox, there are some
  249. // CB_messages the underlying ComboBoxEx control doesn't support.
  250. _AFXCMN_INLINE int CComboBoxEx::Dir(UINT attr, LPCTSTR lpszWildCard)
  251. { UNUSED_ALWAYS(attr); UNUSED_ALWAYS(lpszWildCard);
  252. ASSERT(FALSE); return CB_ERR; }
  253. _AFXCMN_INLINE int CComboBoxEx::FindString(int nIndexStart, LPCTSTR lpszFind) const
  254. { UNUSED_ALWAYS(nIndexStart); UNUSED_ALWAYS(lpszFind);
  255. ASSERT(FALSE); return CB_ERR; }
  256. _AFXCMN_INLINE int CComboBoxEx::AddString(LPCTSTR lpszString)
  257. { UNUSED_ALWAYS(lpszString); ASSERT(FALSE); return CB_ERR;}
  258. _AFXCMN_INLINE BOOL CComboBoxEx::SetEditSel(int nStartChar, int nEndChar)
  259. { UNUSED_ALWAYS(nStartChar); UNUSED_ALWAYS(nEndChar);
  260. ASSERT(FALSE); return FALSE; }
  261. _AFXCMN_INLINE int CComboBoxEx::InsertString(int nIndex, LPCTSTR lpszString)
  262. { UNUSED_ALWAYS(nIndex); UNUSED_ALWAYS(lpszString);
  263. ASSERT(FALSE); return CB_ERR; }
  264. /////////////////////////////////////////////////////////////////////////////
  265. _AFXCMN_INLINE int CProgressCtrl::SetPos(int nPos)
  266. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, PBM_SETPOS, nPos, 0L); }
  267. /////////////////////////////////////////////////////////////////////////////
  268. _AFXCMN_INLINE CIPAddressCtrl::CIPAddressCtrl()
  269. { }
  270. _AFXCMN_INLINE void CIPAddressCtrl::ClearAddress()
  271. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_CLEARADDRESS, 0, 0L); }
  272. _AFXCMN_INLINE BOOL CIPAddressCtrl::IsBlank() const
  273. { ASSERT(::IsWindow(m_hWnd)); return (BOOL) ::SendMessage(m_hWnd, IPM_ISBLANK, 0, 0L); }
  274. _AFXCMN_INLINE int CIPAddressCtrl::GetAddress(DWORD& dwAddress)
  275. { ASSERT(::IsWindow(m_hWnd)); return (int) ::SendMessage(m_hWnd, IPM_GETADDRESS, 0, (LPARAM) &dwAddress); }
  276. _AFXCMN_INLINE void CIPAddressCtrl::SetAddress(DWORD dwAddress)
  277. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETADDRESS, 0, (LPARAM) dwAddress); }
  278. _AFXCMN_INLINE void CIPAddressCtrl::SetAddress(BYTE nField0, BYTE nField1, BYTE nField2, BYTE nField3)
  279. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETADDRESS, 0, (LPARAM) MAKEIPADDRESS(nField0, nField1, nField2, nField3)); }
  280. _AFXCMN_INLINE void CIPAddressCtrl::SetFieldFocus(WORD nField)
  281. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETFOCUS, (WPARAM) nField, 0); }
  282. _AFXCMN_INLINE void CIPAddressCtrl::SetFieldRange(int nField, BYTE nLower, BYTE nUpper)
  283. { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, IPM_SETRANGE, (WPARAM) nField, MAKEIPRANGE(nLower, nUpper)); }
  284. /////////////////////////////////////////////////////////////////////////////
  285. _AFXCMN_INLINE BOOL CImageList::SetImageCount(UINT uNewCount)
  286. { ASSERT(m_hImageList != NULL); return ImageList_SetImageCount(m_hImageList, uNewCount); }
  287. _AFXCMN_INLINE BOOL CImageList::Copy(int iDst, int iSrc, UINT uFlags /* = ILCF_MOVE */)
  288. { ASSERT(m_hImageList != NULL); return ImageList_Copy(m_hImageList, iDst, m_hImageList, iSrc, uFlags); }
  289. _AFXCMN_INLINE BOOL CImageList::Copy(int iDst, CImageList* pSrc, int iSrc, UINT uFlags /* = ILCF_MOVE */)
  290. { ASSERT(m_hImageList != NULL); ASSERT(pSrc != NULL && (HIMAGELIST)*pSrc != NULL); return ImageList_Copy(m_hImageList, iDst, *pSrc, iSrc, uFlags); }
  291. /////////////////////////////////////////////////////////////////////////////
  292. #endif //_AFXCMN_INLINE
  293. /////////////////////////////////////////////////////////////////////////////