home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / include / afxwin2.inl < prev    next >
Text File  |  1998-06-16  |  59KB  |  1,018 lines

  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.  
  11. // Inlines for AFXWIN.H (part 2)
  12.  
  13. #ifdef _AFXWIN_INLINE
  14.  
  15. // CWnd
  16. _AFXWIN_INLINE CWnd::operator HWND() const
  17.     { return this == NULL ? NULL : m_hWnd; }
  18. _AFXWIN_INLINE BOOL CWnd::operator==(const CWnd& wnd) const
  19.     { return ((HWND) wnd) == m_hWnd; }
  20. _AFXWIN_INLINE BOOL CWnd::operator!=(const CWnd& wnd) const
  21.     { return ((HWND) wnd) != m_hWnd; }
  22. _AFXWIN_INLINE HWND CWnd::GetSafeHwnd() const
  23.     { return this == NULL ? NULL : m_hWnd; }
  24. #ifdef _AFX_NO_OCC_SUPPORT
  25. _AFXWIN_INLINE DWORD CWnd::GetStyle() const
  26.     { ASSERT(::IsWindow(m_hWnd)); return (DWORD)GetWindowLong(m_hWnd, GWL_STYLE); }
  27. _AFXWIN_INLINE DWORD CWnd::GetExStyle() const
  28.     { ASSERT(::IsWindow(m_hWnd)); return (DWORD)GetWindowLong(m_hWnd, GWL_EXSTYLE); }
  29. _AFXWIN_INLINE BOOL CWnd::ModifyStyle(DWORD dwRemove, DWORD dwAdd, UINT nFlags)
  30.     { ASSERT(::IsWindow(m_hWnd)); return ModifyStyle(m_hWnd, dwRemove, dwAdd, nFlags); }
  31. _AFXWIN_INLINE BOOL CWnd::ModifyStyleEx(DWORD dwRemove, DWORD dwAdd, UINT nFlags)
  32.     { ASSERT(::IsWindow(m_hWnd)); return ModifyStyleEx(m_hWnd, dwRemove, dwAdd, nFlags); }
  33. #endif //_AFX_NO_OCC_SUPPORT
  34. _AFXWIN_INLINE CWnd* CWnd::GetOwner() const
  35.     { return m_hWndOwner != NULL ? CWnd::FromHandle(m_hWndOwner) : GetParent(); }
  36. _AFXWIN_INLINE void CWnd::SetOwner(CWnd* pOwnerWnd)
  37.     { m_hWndOwner = pOwnerWnd != NULL ? pOwnerWnd->m_hWnd : NULL; }
  38. _AFXWIN_INLINE LRESULT CWnd::SendMessage(UINT message, WPARAM wParam, LPARAM lParam)
  39.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, message, wParam, lParam); }
  40. _AFXWIN_INLINE BOOL CWnd::PostMessage(UINT message, WPARAM wParam, LPARAM lParam)
  41.     { ASSERT(::IsWindow(m_hWnd)); return ::PostMessage(m_hWnd, message, wParam, lParam); }
  42. #ifdef _AFX_NO_OCC_SUPPORT
  43. _AFXWIN_INLINE void CWnd::SetWindowText(LPCTSTR lpszString)
  44.     { ASSERT(::IsWindow(m_hWnd)); ::SetWindowText(m_hWnd, lpszString); }
  45. _AFXWIN_INLINE int CWnd::GetWindowText(LPTSTR lpszString, int nMaxCount) const
  46.     { ASSERT(::IsWindow(m_hWnd)); return ::GetWindowText(m_hWnd, lpszString, nMaxCount); }
  47. _AFXWIN_INLINE int CWnd::GetWindowTextLength() const
  48.     { ASSERT(::IsWindow(m_hWnd)); return ::GetWindowTextLength(m_hWnd); }
  49. #endif //_AFX_NO_OCC_SUPPORT
  50. _AFXWIN_INLINE void CWnd::SetFont(CFont* pFont, BOOL bRedraw)
  51.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_SETFONT, (WPARAM)pFont->GetSafeHandle(), bRedraw); }
  52. _AFXWIN_INLINE CFont* CWnd::GetFont() const
  53.     { ASSERT(::IsWindow(m_hWnd)); return CFont::FromHandle(
  54.         (HFONT)::SendMessage(m_hWnd, WM_GETFONT, 0, 0)); }
  55. _AFXWIN_INLINE CMenu* CWnd::GetMenu() const
  56.     { ASSERT(::IsWindow(m_hWnd)); return CMenu::FromHandle(::GetMenu(m_hWnd)); }
  57. _AFXWIN_INLINE BOOL CWnd::SetMenu(CMenu* pMenu)
  58.     { ASSERT(::IsWindow(m_hWnd)); return ::SetMenu(m_hWnd, pMenu->GetSafeHmenu()); }
  59. _AFXWIN_INLINE void CWnd::DrawMenuBar()
  60.     { ASSERT(::IsWindow(m_hWnd)); ::DrawMenuBar(m_hWnd); }
  61. _AFXWIN_INLINE CMenu* CWnd::GetSystemMenu(BOOL bRevert) const
  62.     { ASSERT(::IsWindow(m_hWnd)); return CMenu::FromHandle(::GetSystemMenu(m_hWnd, bRevert)); }
  63. _AFXWIN_INLINE BOOL CWnd::HiliteMenuItem(CMenu* pMenu, UINT nIDHiliteItem, UINT nHilite)
  64.     { ASSERT(::IsWindow(m_hWnd)); return ::HiliteMenuItem(m_hWnd, pMenu->m_hMenu, nIDHiliteItem, nHilite); }
  65. #ifdef _AFX_NO_OCC_SUPPORT
  66. _AFXWIN_INLINE int CWnd::GetDlgCtrlID() const
  67.     { ASSERT(::IsWindow(m_hWnd)); return ::GetDlgCtrlID(m_hWnd); }
  68. _AFXWIN_INLINE int CWnd::SetDlgCtrlID(int nID)
  69.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SetWindowLong(m_hWnd, GWL_ID, nID); }
  70. #endif //_AFX_NO_OCC_SUPPORT
  71. _AFXWIN_INLINE BOOL CWnd::IsIconic() const
  72.     { ASSERT(::IsWindow(m_hWnd)); return ::IsIconic(m_hWnd); }
  73. _AFXWIN_INLINE BOOL CWnd::IsZoomed() const
  74.     { ASSERT(::IsWindow(m_hWnd)); return ::IsZoomed(m_hWnd); }
  75. #ifdef _AFX_NO_OCC_SUPPORT
  76. _AFXWIN_INLINE void CWnd::MoveWindow(int x, int y, int nWidth, int nHeight, BOOL bRepaint)
  77.     { ASSERT(::IsWindow(m_hWnd)); ::MoveWindow(m_hWnd, x, y, nWidth, nHeight, bRepaint); }
  78. #endif //_AFX_NO_OCC_SUPPORT
  79. _AFXWIN_INLINE void CWnd::MoveWindow(LPCRECT lpRect, BOOL bRepaint)
  80.     { MoveWindow(lpRect->left, lpRect->top, lpRect->right - lpRect->left,
  81.         lpRect->bottom - lpRect->top, bRepaint); }
  82. #ifdef _AFX_NO_OCC_SUPPORT
  83. _AFXWIN_INLINE BOOL CWnd::SetWindowPos(const CWnd* pWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
  84.     { ASSERT(::IsWindow(m_hWnd)); return ::SetWindowPos(m_hWnd, pWndInsertAfter->GetSafeHwnd(),
  85.         x, y, cx, cy, nFlags); }
  86. #endif //_AFX_NO_OCC_SUPPORT
  87. _AFXWIN_INLINE UINT CWnd::ArrangeIconicWindows()
  88.     { ASSERT(::IsWindow(m_hWnd)); return ::ArrangeIconicWindows(m_hWnd); }
  89. _AFXWIN_INLINE int CWnd::SetWindowRgn(HRGN hRgn, BOOL bRedraw)
  90.     { ASSERT(::IsWindow(m_hWnd)); return ::SetWindowRgn(m_hWnd, hRgn, bRedraw); }
  91. _AFXWIN_INLINE int CWnd::GetWindowRgn(HRGN hRgn) const
  92.     { ASSERT(::IsWindow(m_hWnd) && hRgn != NULL); return ::GetWindowRgn(m_hWnd, hRgn); }
  93. _AFXWIN_INLINE void CWnd::BringWindowToTop()
  94.     { ASSERT(::IsWindow(m_hWnd)); ::BringWindowToTop(m_hWnd); }
  95. _AFXWIN_INLINE void CWnd::GetWindowRect(LPRECT lpRect) const
  96.     { ASSERT(::IsWindow(m_hWnd)); ::GetWindowRect(m_hWnd, lpRect); }
  97. _AFXWIN_INLINE void CWnd::GetClientRect(LPRECT lpRect) const
  98.     { ASSERT(::IsWindow(m_hWnd)); ::GetClientRect(m_hWnd, lpRect); }
  99. _AFXWIN_INLINE void CWnd::MapWindowPoints(CWnd* pwndTo, LPPOINT lpPoint, UINT nCount) const
  100.     { ASSERT(::IsWindow(m_hWnd)); ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), lpPoint, nCount); }
  101. _AFXWIN_INLINE void CWnd::MapWindowPoints(CWnd* pwndTo, LPRECT lpRect) const
  102.     { ASSERT(::IsWindow(m_hWnd)); ::MapWindowPoints(m_hWnd, pwndTo->GetSafeHwnd(), (LPPOINT)lpRect, 2); }
  103. _AFXWIN_INLINE void CWnd::ClientToScreen(LPPOINT lpPoint) const
  104.     { ASSERT(::IsWindow(m_hWnd)); ::ClientToScreen(m_hWnd, lpPoint); }
  105. _AFXWIN_INLINE void CWnd::ScreenToClient(LPPOINT lpPoint) const
  106.     { ASSERT(::IsWindow(m_hWnd)); ::ScreenToClient(m_hWnd, lpPoint); }
  107. _AFXWIN_INLINE CDC* CWnd::BeginPaint(LPPAINTSTRUCT lpPaint)
  108.     { ASSERT(::IsWindow(m_hWnd)); return CDC::FromHandle(::BeginPaint(m_hWnd, lpPaint)); }
  109. _AFXWIN_INLINE void CWnd::EndPaint(LPPAINTSTRUCT lpPaint)
  110.     { ASSERT(::IsWindow(m_hWnd)); ::EndPaint(m_hWnd, lpPaint); }
  111. _AFXWIN_INLINE CDC* CWnd::GetDC()
  112.     { ASSERT(::IsWindow(m_hWnd)); return CDC::FromHandle(::GetDC(m_hWnd)); }
  113. _AFXWIN_INLINE CDC* CWnd::GetWindowDC()
  114.     { ASSERT(::IsWindow(m_hWnd)); return CDC::FromHandle(::GetWindowDC(m_hWnd)); }
  115. _AFXWIN_INLINE int CWnd::ReleaseDC(CDC* pDC)
  116.     { ASSERT(::IsWindow(m_hWnd)); return ::ReleaseDC(m_hWnd, pDC->m_hDC); }
  117. _AFXWIN_INLINE void CWnd::UpdateWindow()
  118.     { ASSERT(::IsWindow(m_hWnd)); ::UpdateWindow(m_hWnd); }
  119. _AFXWIN_INLINE void CWnd::SetRedraw(BOOL bRedraw)
  120.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_SETREDRAW, bRedraw, 0); }
  121. _AFXWIN_INLINE BOOL CWnd::GetUpdateRect(LPRECT lpRect, BOOL bErase)
  122.     { ASSERT(::IsWindow(m_hWnd)); return ::GetUpdateRect(m_hWnd, lpRect, bErase); }
  123. _AFXWIN_INLINE int CWnd::GetUpdateRgn(CRgn* pRgn, BOOL bErase)
  124.     { ASSERT(::IsWindow(m_hWnd)); return ::GetUpdateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle(), bErase); }
  125. _AFXWIN_INLINE void CWnd::Invalidate(BOOL bErase)
  126.     { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, NULL, bErase); }
  127. _AFXWIN_INLINE void CWnd::InvalidateRect(LPCRECT lpRect, BOOL bErase)
  128.     { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, lpRect, bErase); }
  129. _AFXWIN_INLINE void CWnd::InvalidateRgn(CRgn* pRgn, BOOL bErase)
  130.     { ASSERT(::IsWindow(m_hWnd)); ::InvalidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle(), bErase); }
  131. _AFXWIN_INLINE void CWnd::ValidateRect(LPCRECT lpRect)
  132.     { ASSERT(::IsWindow(m_hWnd)); ::ValidateRect(m_hWnd, lpRect); }
  133. _AFXWIN_INLINE void CWnd::ValidateRgn(CRgn* pRgn)
  134.     { ASSERT(::IsWindow(m_hWnd)); ::ValidateRgn(m_hWnd, (HRGN)pRgn->GetSafeHandle()); }
  135. #ifdef _AFX_NO_OCC_SUPPORT
  136. _AFXWIN_INLINE BOOL CWnd::ShowWindow(int nCmdShow)
  137.     { ASSERT(::IsWindow(m_hWnd)); return ::ShowWindow(m_hWnd, nCmdShow); }
  138. #endif //_AFX_NO_OCC_SUPPORT
  139. _AFXWIN_INLINE BOOL CWnd::IsWindowVisible() const
  140.     { ASSERT(::IsWindow(m_hWnd)); return ::IsWindowVisible(m_hWnd); }
  141. _AFXWIN_INLINE void CWnd::ShowOwnedPopups(BOOL bShow)
  142.     { ASSERT(::IsWindow(m_hWnd)); ::ShowOwnedPopups(m_hWnd, bShow); }
  143. _AFXWIN_INLINE void CWnd::SendMessageToDescendants(
  144.     UINT message, WPARAM wParam, LPARAM lParam, BOOL bDeep, BOOL bOnlyPerm)
  145.     { ASSERT(::IsWindow(m_hWnd)); CWnd::SendMessageToDescendants(m_hWnd, message, wParam, lParam, bDeep,
  146.         bOnlyPerm); }
  147. _AFXWIN_INLINE CWnd* CWnd::GetDescendantWindow(int nID, BOOL bOnlyPerm) const
  148.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::GetDescendantWindow(m_hWnd, nID, bOnlyPerm); }
  149. #ifdef _AFX_NO_OCC_SUPPORT
  150. _AFXWIN_INLINE BOOL CWnd::IsDialogMessage(LPMSG lpMsg)
  151.     { ASSERT(::IsWindow(m_hWnd)); return ::IsDialogMessage(m_hWnd, lpMsg); }
  152. #endif
  153.  
  154. _AFXWIN_INLINE CDC* CWnd::GetDCEx(CRgn* prgnClip, DWORD flags)
  155.     { ASSERT(::IsWindow(m_hWnd)); return CDC::FromHandle(::GetDCEx(m_hWnd, (HRGN)prgnClip->GetSafeHandle(), flags)); }
  156. _AFXWIN_INLINE BOOL CWnd::LockWindowUpdate()
  157.     { ASSERT(::IsWindow(m_hWnd)); return ::LockWindowUpdate(m_hWnd); }
  158. _AFXWIN_INLINE void CWnd::UnlockWindowUpdate()
  159.     { ASSERT(::IsWindow(m_hWnd)); ::LockWindowUpdate(NULL); }
  160. _AFXWIN_INLINE BOOL CWnd::RedrawWindow(LPCRECT lpRectUpdate, CRgn* prgnUpdate,
  161.     UINT flags)
  162.     { ASSERT(::IsWindow(m_hWnd)); return ::RedrawWindow(m_hWnd, lpRectUpdate, (HRGN)prgnUpdate->GetSafeHandle(), flags); }
  163. _AFXWIN_INLINE BOOL CWnd::EnableScrollBar(int nSBFlags, UINT nArrowFlags)
  164.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::EnableScrollBar(m_hWnd, nSBFlags, nArrowFlags); }
  165.  
  166. _AFXWIN_INLINE UINT CWnd::SetTimer(UINT nIDEvent, UINT nElapse,
  167.         void (CALLBACK* lpfnTimer)(HWND, UINT, UINT, DWORD))
  168.     { ASSERT(::IsWindow(m_hWnd)); return ::SetTimer(m_hWnd, nIDEvent, nElapse,
  169.         (TIMERPROC)lpfnTimer); }
  170. _AFXWIN_INLINE BOOL CWnd::KillTimer(int nIDEvent)
  171.     { ASSERT(::IsWindow(m_hWnd)); return ::KillTimer(m_hWnd, nIDEvent); }
  172. #ifdef _AFX_NO_OCC_SUPPORT
  173. _AFXWIN_INLINE BOOL CWnd::IsWindowEnabled() const
  174.     { ASSERT(::IsWindow(m_hWnd)); return ::IsWindowEnabled(m_hWnd); }
  175. _AFXWIN_INLINE BOOL CWnd::EnableWindow(BOOL bEnable)
  176.     { ASSERT(::IsWindow(m_hWnd)); return ::EnableWindow(m_hWnd, bEnable); }
  177. #endif //_AFX_NO_OCC_SUPPORT
  178. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetActiveWindow()
  179.     { return CWnd::FromHandle(::GetActiveWindow()); }
  180. _AFXWIN_INLINE CWnd* CWnd::SetActiveWindow()
  181.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::SetActiveWindow(m_hWnd)); }
  182. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetCapture()
  183.     { return CWnd::FromHandle(::GetCapture()); }
  184. _AFXWIN_INLINE CWnd* CWnd::SetCapture()
  185.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::SetCapture(m_hWnd)); }
  186. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetFocus()
  187.     { return CWnd::FromHandle(::GetFocus()); }
  188. #ifdef _AFX_NO_OCC_SUPPORT
  189. _AFXWIN_INLINE CWnd* CWnd::SetFocus()
  190.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::SetFocus(m_hWnd)); }
  191. #endif //_AFX_NO_OCC_SUPPORT
  192. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetDesktopWindow()
  193.     { return CWnd::FromHandle(::GetDesktopWindow()); }
  194. #ifdef _AFX_NO_OCC_SUPPORT
  195. _AFXWIN_INLINE void CWnd::CheckDlgButton(int nIDButton, UINT nCheck)
  196.     { ASSERT(::IsWindow(m_hWnd)); ::CheckDlgButton(m_hWnd, nIDButton, nCheck); }
  197. _AFXWIN_INLINE void CWnd::CheckRadioButton(int nIDFirstButton, int nIDLastButton,
  198.         int nIDCheckButton)
  199.     { ASSERT(::IsWindow(m_hWnd)); ::CheckRadioButton(m_hWnd, nIDFirstButton, nIDLastButton, nIDCheckButton); }
  200. #endif //_AFX_NO_OCC_SUPPORT
  201. _AFXWIN_INLINE int CWnd::DlgDirList(LPTSTR lpPathSpec, int nIDListBox,
  202.         int nIDStaticPath, UINT nFileType)
  203.     { ASSERT(::IsWindow(m_hWnd)); return ::DlgDirList(m_hWnd, lpPathSpec, nIDListBox,
  204.             nIDStaticPath, nFileType); }
  205. _AFXWIN_INLINE int CWnd::DlgDirListComboBox(LPTSTR lpPathSpec, int nIDComboBox,
  206.         int nIDStaticPath, UINT nFileType)
  207.     { ASSERT(::IsWindow(m_hWnd)); return ::DlgDirListComboBox(m_hWnd, lpPathSpec,
  208.             nIDComboBox, nIDStaticPath, nFileType); }
  209. _AFXWIN_INLINE BOOL CWnd::DlgDirSelect(LPTSTR lpString, int nIDListBox)
  210.     { ASSERT(::IsWindow(m_hWnd)); return ::DlgDirSelectEx(m_hWnd, lpString, _MAX_PATH, nIDListBox); }
  211. _AFXWIN_INLINE BOOL CWnd::DlgDirSelectComboBox(LPTSTR lpString, int nIDComboBox)
  212.     { ASSERT(::IsWindow(m_hWnd)); return ::DlgDirSelectComboBoxEx(m_hWnd, lpString, _MAX_PATH, nIDComboBox);}
  213. #ifdef _AFX_NO_OCC_SUPPORT
  214. _AFXWIN_INLINE CWnd* CWnd::GetDlgItem(int nID) const
  215.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetDlgItem(m_hWnd, nID)); }
  216. _AFXWIN_INLINE void CWnd::GetDlgItem(int nID, HWND* phWnd) const
  217.     { ASSERT(::IsWindow(m_hWnd)); ASSERT(phWnd != NULL); *phWnd = ::GetDlgItem(m_hWnd, nID); }
  218. _AFXWIN_INLINE UINT CWnd::GetDlgItemInt(int nID, BOOL* lpTrans,
  219.         BOOL bSigned) const
  220.     { ASSERT(::IsWindow(m_hWnd)); return ::GetDlgItemInt(m_hWnd, nID, lpTrans, bSigned);}
  221. _AFXWIN_INLINE int CWnd::GetDlgItemText(int nID, LPTSTR lpStr, int nMaxCount) const
  222.     { ASSERT(::IsWindow(m_hWnd)); return ::GetDlgItemText(m_hWnd, nID, lpStr, nMaxCount);}
  223. #endif //_AFX_NO_OCC_SUPPORT
  224. _AFXWIN_INLINE CWnd* CWnd::GetNextDlgGroupItem(CWnd* pWndCtl, BOOL bPrevious) const
  225.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetNextDlgGroupItem(m_hWnd,
  226.             pWndCtl->GetSafeHwnd(), bPrevious)); }
  227. _AFXWIN_INLINE CWnd* CWnd::GetNextDlgTabItem(CWnd* pWndCtl, BOOL bPrevious) const
  228.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetNextDlgTabItem(m_hWnd,
  229.             pWndCtl->GetSafeHwnd(), bPrevious)); }
  230. #ifdef _AFX_NO_OCC_SUPPORT
  231. _AFXWIN_INLINE UINT CWnd::IsDlgButtonChecked(int nIDButton) const
  232.     { ASSERT(::IsWindow(m_hWnd)); return ::IsDlgButtonChecked(m_hWnd, nIDButton); }
  233. _AFXWIN_INLINE LPARAM CWnd::SendDlgItemMessage(int nID, UINT message, WPARAM wParam, LPARAM lParam)
  234.     { ASSERT(::IsWindow(m_hWnd)); return ::SendDlgItemMessage(m_hWnd, nID, message, wParam, lParam); }
  235. _AFXWIN_INLINE void CWnd::SetDlgItemInt(int nID, UINT nValue, BOOL bSigned)
  236.     { ASSERT(::IsWindow(m_hWnd)); ::SetDlgItemInt(m_hWnd, nID, nValue, bSigned); }
  237. _AFXWIN_INLINE void CWnd::SetDlgItemText(int nID, LPCTSTR lpszString)
  238.     { ASSERT(::IsWindow(m_hWnd)); ::SetDlgItemText(m_hWnd, nID, lpszString); }
  239. _AFXWIN_INLINE int CWnd::ScrollWindowEx(int dx, int dy,
  240.     LPCRECT lpRectScroll, LPCRECT lpRectClip,
  241.     CRgn* prgnUpdate, LPRECT lpRectUpdate, UINT flags)
  242.     { ASSERT(::IsWindow(m_hWnd)); return ::ScrollWindowEx(m_hWnd, dx, dy, lpRectScroll, lpRectClip,
  243.             (HRGN)prgnUpdate->GetSafeHandle(), lpRectUpdate, flags); }
  244. #endif //_AFX_NO_OCC_SUPPORT
  245.  
  246. _AFXWIN_INLINE void CWnd::ShowScrollBar(UINT nBar, BOOL bShow)
  247.     { ASSERT(::IsWindow(m_hWnd)); ::ShowScrollBar(m_hWnd, nBar, bShow); }
  248. _AFXWIN_INLINE CWnd* CWnd::ChildWindowFromPoint(POINT point) const
  249.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::ChildWindowFromPoint(m_hWnd, point)); }
  250. _AFXWIN_INLINE CWnd* CWnd::ChildWindowFromPoint(POINT point, UINT nFlags) const
  251.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::ChildWindowFromPointEx(m_hWnd, point, nFlags)); }
  252. _AFXWIN_INLINE CWnd* PASCAL CWnd::FindWindow(LPCTSTR lpszClassName, LPCTSTR lpszWindowName)
  253.     { return CWnd::FromHandle(::FindWindow(lpszClassName, lpszWindowName)); }
  254. _AFXWIN_INLINE CWnd* CWnd::GetNextWindow(UINT nFlag) const
  255.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetNextWindow(m_hWnd, nFlag)); }
  256. _AFXWIN_INLINE CWnd* CWnd::GetTopWindow() const
  257.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetTopWindow(m_hWnd)); }
  258. _AFXWIN_INLINE CWnd* CWnd::GetWindow(UINT nCmd) const
  259.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetWindow(m_hWnd, nCmd)); }
  260. _AFXWIN_INLINE CWnd* CWnd::GetLastActivePopup() const
  261.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetLastActivePopup(m_hWnd)); }
  262. _AFXWIN_INLINE BOOL CWnd::IsChild(const CWnd* pWnd) const
  263.     { ASSERT(::IsWindow(m_hWnd)); return ::IsChild(m_hWnd, pWnd->GetSafeHwnd()); }
  264. _AFXWIN_INLINE CWnd* CWnd::GetParent() const
  265.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::GetParent(m_hWnd)); }
  266. _AFXWIN_INLINE CWnd* CWnd::SetParent(CWnd* pWndNewParent)
  267.     { ASSERT(::IsWindow(m_hWnd)); return CWnd::FromHandle(::SetParent(m_hWnd,
  268.             pWndNewParent->GetSafeHwnd())); }
  269. _AFXWIN_INLINE CWnd* PASCAL CWnd::WindowFromPoint(POINT point)
  270.     { return CWnd::FromHandle(::WindowFromPoint(point)); }
  271. _AFXWIN_INLINE BOOL CWnd::FlashWindow(BOOL bInvert)
  272.     { ASSERT(::IsWindow(m_hWnd)); return ::FlashWindow(m_hWnd, bInvert); }
  273. _AFXWIN_INLINE BOOL CWnd::ChangeClipboardChain(HWND hWndNext)
  274.     { ASSERT(::IsWindow(m_hWnd)); return ::ChangeClipboardChain(m_hWnd, hWndNext); }
  275. _AFXWIN_INLINE HWND CWnd::SetClipboardViewer()
  276.     { ASSERT(::IsWindow(m_hWnd)); return ::SetClipboardViewer(m_hWnd); }
  277. _AFXWIN_INLINE BOOL CWnd::OpenClipboard()
  278.     { ASSERT(::IsWindow(m_hWnd)); return ::OpenClipboard(m_hWnd); }
  279. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetOpenClipboardWindow()
  280.     { return CWnd::FromHandle(::GetOpenClipboardWindow()); }
  281. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetClipboardOwner()
  282.     { return CWnd::FromHandle(::GetClipboardOwner()); }
  283. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetClipboardViewer()
  284.     { return CWnd::FromHandle(::GetClipboardViewer()); }
  285. _AFXWIN_INLINE void CWnd::CreateCaret(CBitmap* pBitmap)
  286.     { ASSERT(::IsWindow(m_hWnd)); ::CreateCaret(m_hWnd, (HBITMAP)pBitmap->GetSafeHandle(), 0, 0); }
  287. _AFXWIN_INLINE void CWnd::CreateSolidCaret(int nWidth, int nHeight)
  288.     { ASSERT(::IsWindow(m_hWnd)); ::CreateCaret(m_hWnd, (HBITMAP)0, nWidth, nHeight); }
  289. _AFXWIN_INLINE void CWnd::CreateGrayCaret(int nWidth, int nHeight)
  290.     { ASSERT(::IsWindow(m_hWnd)); ::CreateCaret(m_hWnd, (HBITMAP)1, nWidth, nHeight); }
  291. _AFXWIN_INLINE CPoint PASCAL CWnd::GetCaretPos()
  292.     { CPoint point; ::GetCaretPos((LPPOINT)&point); return point; }
  293. _AFXWIN_INLINE void PASCAL CWnd::SetCaretPos(POINT point)
  294.     { ::SetCaretPos(point.x, point.y); }
  295. _AFXWIN_INLINE void CWnd::HideCaret()
  296.     { ASSERT(::IsWindow(m_hWnd)); ::HideCaret(m_hWnd); }
  297. _AFXWIN_INLINE void CWnd::ShowCaret()
  298.     { ASSERT(::IsWindow(m_hWnd)); ::ShowCaret(m_hWnd); }
  299. _AFXWIN_INLINE BOOL CWnd::SetForegroundWindow()
  300.     { ASSERT(::IsWindow(m_hWnd)); return ::SetForegroundWindow(m_hWnd); }
  301. _AFXWIN_INLINE CWnd* PASCAL CWnd::GetForegroundWindow()
  302.     { return CWnd::FromHandle(::GetForegroundWindow()); }
  303.  
  304. _AFXWIN_INLINE BOOL CWnd::SendNotifyMessage(UINT message, WPARAM wParam, LPARAM lParam)
  305.     { ASSERT(::IsWindow(m_hWnd)); return ::SendNotifyMessage(m_hWnd, message, wParam, lParam); }
  306.  
  307. // Win4
  308. _AFXWIN_INLINE HICON CWnd::SetIcon(HICON hIcon, BOOL bBigIcon)
  309.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, WM_SETICON, bBigIcon, (LPARAM)hIcon); }
  310. _AFXWIN_INLINE HICON CWnd::GetIcon(BOOL bBigIcon) const
  311.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, WM_GETICON, bBigIcon, 0); }
  312. _AFXWIN_INLINE void CWnd::Print(CDC* pDC, DWORD dwFlags) const
  313.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PRINT, (WPARAM)pDC->GetSafeHdc(), dwFlags); }
  314. _AFXWIN_INLINE void CWnd::PrintClient(CDC* pDC, DWORD dwFlags) const
  315.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PRINTCLIENT, (WPARAM)pDC->GetSafeHdc(), dwFlags); }
  316. _AFXWIN_INLINE BOOL CWnd::SetWindowContextHelpId(DWORD dwContextHelpId)
  317.     { ASSERT(::IsWindow(m_hWnd)); return ::SetWindowContextHelpId(m_hWnd, dwContextHelpId); }
  318. _AFXWIN_INLINE DWORD CWnd::GetWindowContextHelpId() const
  319.     { ASSERT(::IsWindow(m_hWnd)); return ::GetWindowContextHelpId(m_hWnd); }
  320.  
  321.  
  322. // Default message map implementations
  323. _AFXWIN_INLINE void CWnd::OnActivateApp(BOOL, HTASK)
  324.     { Default(); }
  325. _AFXWIN_INLINE void CWnd::OnActivate(UINT, CWnd*, BOOL)
  326.     { Default(); }
  327. _AFXWIN_INLINE void CWnd::OnCancelMode()
  328.     { Default(); }
  329. _AFXWIN_INLINE void CWnd::OnChildActivate()
  330.     { Default(); }
  331. _AFXWIN_INLINE void CWnd::OnClose()
  332.     { Default(); }
  333. _AFXWIN_INLINE void CWnd::OnContextMenu(CWnd*, CPoint)
  334.     { Default(); }
  335. _AFXWIN_INLINE int CWnd::OnCopyData(CWnd*, COPYDATASTRUCT*)
  336.     { return (int)Default(); }
  337. _AFXWIN_INLINE int CWnd::OnCreate(LPCREATESTRUCT)
  338.     { return (int)Default(); }
  339. _AFXWIN_INLINE void CWnd::OnEnable(BOOL)
  340.     { Default(); }
  341. _AFXWIN_INLINE void CWnd::OnEndSession(BOOL)
  342.     { Default(); }
  343. _AFXWIN_INLINE BOOL CWnd::OnEraseBkgnd(CDC*)
  344.     { return (BOOL)Default(); }
  345. _AFXWIN_INLINE void CWnd::OnGetMinMaxInfo(MINMAXINFO*)
  346.     { Default(); }
  347. _AFXWIN_INLINE void CWnd::OnIconEraseBkgnd(CDC*)
  348.     { Default(); }
  349. _AFXWIN_INLINE void CWnd::OnKillFocus(CWnd*)
  350.     { Default(); }
  351. _AFXWIN_INLINE LRESULT CWnd::OnMenuChar(UINT, UINT, CMenu*)
  352.     { return Default(); }
  353. _AFXWIN_INLINE void CWnd::OnMenuSelect(UINT, UINT, HMENU)
  354.     { Default(); }
  355. _AFXWIN_INLINE void CWnd::OnMove(int, int)
  356.     { Default(); }
  357. _AFXWIN_INLINE void CWnd::OnPaint()
  358.     { Default(); }
  359. _AFXWIN_INLINE HCURSOR CWnd::OnQueryDragIcon()
  360.     { return (HCURSOR)Default(); }
  361. _AFXWIN_INLINE BOOL CWnd::OnQueryEndSession()
  362.     { return (BOOL)Default(); }
  363. _AFXWIN_INLINE BOOL CWnd::OnQueryNewPalette()
  364.     { return (BOOL)Default(); }
  365. _AFXWIN_INLINE BOOL CWnd::OnQueryOpen()
  366.     { return (BOOL)Default(); }
  367. _AFXWIN_INLINE BOOL CWnd::OnSetCursor(CWnd*, UINT, UINT)
  368.     { return (BOOL)Default(); }
  369. _AFXWIN_INLINE void CWnd::OnSetFocus(CWnd*)
  370.     { Default(); }
  371. _AFXWIN_INLINE void CWnd::OnShowWindow(BOOL, UINT)
  372.     { Default(); }
  373. _AFXWIN_INLINE void CWnd::OnSize(UINT, int, int)
  374.     { Default(); }
  375. _AFXWIN_INLINE void CWnd::OnTCard(UINT, DWORD)
  376.     { Default(); }
  377. _AFXWIN_INLINE void CWnd::OnWindowPosChanging(WINDOWPOS*)
  378.     { Default(); }
  379. _AFXWIN_INLINE void CWnd::OnWindowPosChanged(WINDOWPOS*)
  380.     { Default(); }
  381. _AFXWIN_INLINE void CWnd::OnDropFiles(HDROP)
  382.     { Default(); }
  383. _AFXWIN_INLINE void CWnd::OnPaletteIsChanging(CWnd*)
  384.     { Default(); }
  385. _AFXWIN_INLINE BOOL CWnd::OnNcActivate(BOOL)
  386.     { return (BOOL)Default(); }
  387. _AFXWIN_INLINE void CWnd::OnNcCalcSize(BOOL, NCCALCSIZE_PARAMS*)
  388.     { Default(); }
  389. _AFXWIN_INLINE BOOL CWnd::OnNcCreate(LPCREATESTRUCT)
  390.     { return (BOOL)Default(); }
  391. _AFXWIN_INLINE UINT CWnd::OnNcHitTest(CPoint)
  392.     { return (UINT)Default(); }
  393. _AFXWIN_INLINE void CWnd::OnNcLButtonDblClk(UINT, CPoint)
  394.     { Default(); }
  395. _AFXWIN_INLINE void CWnd::OnNcLButtonDown(UINT, CPoint)
  396.     { Default(); }
  397. _AFXWIN_INLINE void CWnd::OnNcLButtonUp(UINT, CPoint)
  398.     { Default(); }
  399. _AFXWIN_INLINE void CWnd::OnNcMButtonDblClk(UINT, CPoint)
  400.     { Default(); }
  401. _AFXWIN_INLINE void CWnd::OnNcMButtonDown(UINT, CPoint)
  402.     { Default(); }
  403. _AFXWIN_INLINE void CWnd::OnNcMButtonUp(UINT, CPoint)
  404.     { Default(); }
  405. _AFXWIN_INLINE void CWnd::OnNcMouseMove(UINT, CPoint)
  406.     { Default(); }
  407. _AFXWIN_INLINE void CWnd::OnNcPaint()
  408.     { Default(); }
  409. _AFXWIN_INLINE void CWnd::OnNcRButtonDblClk(UINT, CPoint)
  410.     { Default(); }
  411. _AFXWIN_INLINE void CWnd::OnNcRButtonDown(UINT, CPoint)
  412.     { Default(); }
  413. _AFXWIN_INLINE void CWnd::OnNcRButtonUp(UINT, CPoint)
  414.     { Default(); }
  415. _AFXWIN_INLINE void CWnd::OnSysChar(UINT, UINT, UINT)
  416.     { Default(); }
  417. _AFXWIN_INLINE void CWnd::OnSysCommand(UINT, LPARAM)
  418.     { Default(); }
  419. _AFXWIN_INLINE void CWnd::OnSysDeadChar(UINT, UINT, UINT)
  420.     { Default(); }
  421. _AFXWIN_INLINE void CWnd::OnSysKeyDown(UINT, UINT, UINT)
  422.     { Default(); }
  423. _AFXWIN_INLINE void CWnd::OnSysKeyUp(UINT, UINT, UINT)
  424.     { Default(); }
  425. _AFXWIN_INLINE void CWnd::OnCompacting(UINT)
  426.     { Default(); }
  427. _AFXWIN_INLINE void CWnd::OnFontChange()
  428.     { Default(); }
  429. _AFXWIN_INLINE void CWnd::OnPaletteChanged(CWnd*)
  430.     { Default(); }
  431. _AFXWIN_INLINE void CWnd::OnSpoolerStatus(UINT, UINT)
  432.     { Default(); }
  433. _AFXWIN_INLINE void CWnd::OnTimeChange()
  434.     { Default(); }
  435. _AFXWIN_INLINE void CWnd::OnChar(UINT, UINT, UINT)
  436.     { Default(); }
  437. _AFXWIN_INLINE void CWnd::OnDeadChar(UINT, UINT, UINT)
  438.     { Default(); }
  439. _AFXWIN_INLINE void CWnd::OnKeyDown(UINT, UINT, UINT)
  440.     { Default(); }
  441. _AFXWIN_INLINE void CWnd::OnKeyUp(UINT, UINT, UINT)
  442.     { Default(); }
  443. _AFXWIN_INLINE void CWnd::OnLButtonDblClk(UINT, CPoint)
  444.     { Default(); }
  445. _AFXWIN_INLINE void CWnd::OnLButtonDown(UINT, CPoint)
  446.     { Default(); }
  447. _AFXWIN_INLINE void CWnd::OnLButtonUp(UINT, CPoint)
  448.     { Default(); }
  449. _AFXWIN_INLINE void CWnd::OnMButtonDblClk(UINT, CPoint)
  450.     { Default(); }
  451. _AFXWIN_INLINE void CWnd::OnMButtonDown(UINT, CPoint)
  452.     { Default(); }
  453. _AFXWIN_INLINE void CWnd::OnMButtonUp(UINT, CPoint)
  454.     { Default(); }
  455. _AFXWIN_INLINE int CWnd::OnMouseActivate(CWnd*, UINT, UINT)
  456.     { return (int)Default(); }
  457. _AFXWIN_INLINE void CWnd::OnMouseMove(UINT, CPoint)
  458.     { Default(); }
  459. _AFXWIN_INLINE BOOL CWnd::OnMouseWheel(UINT, short, CPoint)
  460.     { return (BOOL)Default(); }
  461. _AFXWIN_INLINE LRESULT CWnd::OnRegisteredMouseWheel(WPARAM, LPARAM)
  462.     { return Default(); }
  463. _AFXWIN_INLINE void CWnd::OnRButtonDblClk(UINT, CPoint)
  464.     { Default(); }
  465. _AFXWIN_INLINE void CWnd::OnRButtonDown(UINT, CPoint)
  466.     { Default(); }
  467. _AFXWIN_INLINE void CWnd::OnRButtonUp(UINT, CPoint)
  468.     { Default(); }
  469. _AFXWIN_INLINE void CWnd::OnTimer(UINT)
  470.     { Default(); }
  471. _AFXWIN_INLINE void CWnd::OnInitMenu(CMenu*)
  472.     { Default(); }
  473. _AFXWIN_INLINE void CWnd::OnInitMenuPopup(CMenu*, UINT, BOOL)
  474.     { Default(); }
  475. _AFXWIN_INLINE void CWnd::OnAskCbFormatName(UINT, LPTSTR)
  476.     { Default(); }
  477. _AFXWIN_INLINE void CWnd::OnChangeCbChain(HWND, HWND)
  478.     { Default(); }
  479. _AFXWIN_INLINE void CWnd::OnDestroyClipboard()
  480.     { Default(); }
  481. _AFXWIN_INLINE void CWnd::OnDrawClipboard()
  482.     { Default(); }
  483. _AFXWIN_INLINE void CWnd::OnHScrollClipboard(CWnd*, UINT, UINT)
  484.     { Default(); }
  485. _AFXWIN_INLINE void CWnd::OnPaintClipboard(CWnd*, HGLOBAL)
  486.     { Default(); }
  487. _AFXWIN_INLINE void CWnd::OnRenderAllFormats()
  488.     { Default(); }
  489. _AFXWIN_INLINE void CWnd::OnRenderFormat(UINT)
  490.     { Default(); }
  491. _AFXWIN_INLINE void CWnd::OnSizeClipboard(CWnd*, HGLOBAL)
  492.     { Default(); }
  493. _AFXWIN_INLINE void CWnd::OnVScrollClipboard(CWnd*, UINT, UINT)
  494.     { Default(); }
  495. _AFXWIN_INLINE UINT CWnd::OnGetDlgCode()
  496.     { return (UINT)Default(); }
  497. _AFXWIN_INLINE void CWnd::OnMDIActivate(BOOL, CWnd*, CWnd*)
  498.     { Default(); }
  499. _AFXWIN_INLINE void CWnd::OnEnterMenuLoop(BOOL)
  500.     { Default(); }
  501. _AFXWIN_INLINE void CWnd::OnExitMenuLoop(BOOL)
  502.     { Default(); }
  503. // Win4 support
  504. _AFXWIN_INLINE void CWnd::OnStyleChanged(int, LPSTYLESTRUCT)
  505.     { Default(); }
  506. _AFXWIN_INLINE void CWnd::OnStyleChanging(int, LPSTYLESTRUCT)
  507.     { Default(); }
  508. _AFXWIN_INLINE void CWnd::OnSizing(UINT, LPRECT)
  509.     { Default(); }
  510. _AFXWIN_INLINE void CWnd::OnMoving(UINT, LPRECT)
  511.     { Default(); }
  512. _AFXWIN_INLINE void CWnd::OnCaptureChanged(CWnd*)
  513.     { Default(); }
  514. _AFXWIN_INLINE BOOL CWnd::OnDeviceChange(UINT, DWORD)
  515.     { return (BOOL)Default(); }
  516.  
  517. // CWnd dialog data support
  518. _AFXWIN_INLINE void CWnd::DoDataExchange(CDataExchange*)
  519.     { } // default does nothing
  520.  
  521. // CWnd modality support
  522. _AFXWIN_INLINE void CWnd::BeginModalState()
  523.     { ::EnableWindow(m_hWnd, FALSE); }
  524. _AFXWIN_INLINE void CWnd::EndModalState()
  525.     { ::EnableWindow(m_hWnd, TRUE); }
  526.  
  527. // CFrameWnd
  528. _AFXWIN_INLINE void CFrameWnd::DelayUpdateFrameTitle()
  529.     { m_nIdleFlags |= idleTitle; }
  530. _AFXWIN_INLINE void CFrameWnd::DelayRecalcLayout(BOOL bNotify)
  531.     { m_nIdleFlags |= (idleLayout | (bNotify ? idleNotify : 0)); };
  532. _AFXWIN_INLINE BOOL CFrameWnd::InModalState() const
  533.     { return m_cModalStack != 0; }
  534. _AFXWIN_INLINE void CFrameWnd::AddControlBar(CControlBar *pBar)
  535.     { m_listControlBars.AddTail(pBar); }
  536. _AFXWIN_INLINE void CFrameWnd::SetTitle(LPCTSTR lpszTitle)
  537.     { m_strTitle = lpszTitle; }
  538. _AFXWIN_INLINE CString CFrameWnd::GetTitle() const
  539.     { return m_strTitle; }
  540.  
  541. // CDialog
  542. _AFXWIN_INLINE BOOL CDialog::Create(UINT nIDTemplate, CWnd* pParentWnd)
  543.     { return Create(MAKEINTRESOURCE(nIDTemplate), pParentWnd); }
  544. _AFXWIN_INLINE void CDialog::MapDialogRect(LPRECT lpRect) const
  545.     { ASSERT(::IsWindow(m_hWnd)); ::MapDialogRect(m_hWnd, lpRect); }
  546. _AFXWIN_INLINE void CDialog::SetHelpID(UINT nIDR)
  547.     { m_nIDHelp = nIDR; }
  548. _AFXWIN_INLINE void CDialog::NextDlgCtrl() const
  549.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 0, 0); }
  550. _AFXWIN_INLINE void CDialog::PrevDlgCtrl() const
  551.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_NEXTDLGCTL, 1, 0); }
  552. _AFXWIN_INLINE void CDialog::GotoDlgCtrl(CWnd* pWndCtrl)
  553.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_NEXTDLGCTL, (WPARAM)pWndCtrl->m_hWnd, 1L); }
  554. _AFXWIN_INLINE void CDialog::SetDefID(UINT nID)
  555.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, DM_SETDEFID, nID, 0); }
  556. _AFXWIN_INLINE DWORD CDialog::GetDefID() const
  557.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, DM_GETDEFID, 0, 0); }
  558.  
  559. // Window control functions
  560. _AFXWIN_INLINE CStatic::CStatic()
  561.     { }
  562. _AFXWIN_INLINE HICON CStatic::SetIcon(HICON hIcon)
  563.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, STM_SETICON, (WPARAM)hIcon, 0L); }
  564. _AFXWIN_INLINE HICON CStatic::GetIcon() const
  565.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, STM_GETICON, 0, 0L); }
  566. #if (WINVER >= 0x400)
  567. _AFXWIN_INLINE HENHMETAFILE CStatic::SetEnhMetaFile(HENHMETAFILE hMetaFile)
  568.     { ASSERT(::IsWindow(m_hWnd)); return (HENHMETAFILE)::SendMessage(m_hWnd, STM_SETIMAGE, IMAGE_ENHMETAFILE, (LPARAM)hMetaFile); }
  569. _AFXWIN_INLINE HENHMETAFILE CStatic::GetEnhMetaFile() const
  570.     { ASSERT(::IsWindow(m_hWnd)); return (HENHMETAFILE)::SendMessage(m_hWnd, STM_GETIMAGE, IMAGE_ENHMETAFILE, 0L); }
  571. _AFXWIN_INLINE HBITMAP CStatic::SetBitmap(HBITMAP hBitmap)
  572.     { ASSERT(::IsWindow(m_hWnd)); return (HBITMAP)::SendMessage(m_hWnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap); }
  573. _AFXWIN_INLINE HBITMAP CStatic::GetBitmap() const
  574.     { ASSERT(::IsWindow(m_hWnd)); return (HBITMAP)::SendMessage(m_hWnd, STM_GETIMAGE, IMAGE_BITMAP, 0L); }
  575. _AFXWIN_INLINE HCURSOR CStatic::SetCursor(HCURSOR hCursor)
  576.     { ASSERT(::IsWindow(m_hWnd)); return (HCURSOR)::SendMessage(m_hWnd, STM_SETIMAGE, IMAGE_CURSOR, (LPARAM)hCursor); }
  577. _AFXWIN_INLINE HCURSOR CStatic::GetCursor()
  578.     { ASSERT(::IsWindow(m_hWnd)); return (HCURSOR)::SendMessage(m_hWnd, STM_GETIMAGE, IMAGE_CURSOR, 0L); }
  579. #endif
  580.  
  581. _AFXWIN_INLINE CButton::CButton()
  582.     { }
  583. _AFXWIN_INLINE UINT CButton::GetState() const
  584.     { ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, BM_GETSTATE, 0, 0); }
  585. _AFXWIN_INLINE void CButton::SetState(BOOL bHighlight)
  586.     { ::SendMessage(m_hWnd, BM_SETSTATE, bHighlight, 0); }
  587. _AFXWIN_INLINE int CButton::GetCheck() const
  588.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, BM_GETCHECK, 0, 0); }
  589. _AFXWIN_INLINE void CButton::SetCheck(int nCheck)
  590.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, BM_SETCHECK, nCheck, 0); }
  591. _AFXWIN_INLINE UINT CButton::GetButtonStyle() const
  592.     { ASSERT(::IsWindow(m_hWnd)); return (UINT)GetWindowLong(m_hWnd, GWL_STYLE) & 0xff; }
  593. _AFXWIN_INLINE void CButton::SetButtonStyle(UINT nStyle, BOOL bRedraw)
  594.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, BM_SETSTYLE, nStyle, (LPARAM)bRedraw); }
  595. // Win4
  596. #if (WINVER >= 0x400)
  597. _AFXWIN_INLINE HICON CButton::SetIcon(HICON hIcon)
  598.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, BM_SETIMAGE, IMAGE_ICON, (LPARAM)hIcon); }
  599. _AFXWIN_INLINE HICON CButton::GetIcon() const
  600.     { ASSERT(::IsWindow(m_hWnd)); return (HICON)::SendMessage(m_hWnd, BM_GETIMAGE, IMAGE_ICON, 0L); }
  601. _AFXWIN_INLINE HBITMAP CButton::SetBitmap(HBITMAP hBitmap)
  602.     { ASSERT(::IsWindow(m_hWnd)); return (HBITMAP)::SendMessage(m_hWnd, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap); }
  603. _AFXWIN_INLINE HBITMAP CButton::GetBitmap() const
  604.     { ASSERT(::IsWindow(m_hWnd)); return (HBITMAP)::SendMessage(m_hWnd, BM_GETIMAGE, IMAGE_BITMAP, 0L); }
  605. _AFXWIN_INLINE HCURSOR CButton::SetCursor(HCURSOR hCursor)
  606.     { ASSERT(::IsWindow(m_hWnd)); return (HCURSOR)::SendMessage(m_hWnd, BM_SETIMAGE, IMAGE_CURSOR, (LPARAM)hCursor); }
  607. _AFXWIN_INLINE HCURSOR CButton::GetCursor()
  608.     { ASSERT(::IsWindow(m_hWnd)); return (HCURSOR)::SendMessage(m_hWnd, BM_GETIMAGE, IMAGE_CURSOR, 0L); }
  609. #endif
  610.  
  611. _AFXWIN_INLINE CListBox::CListBox()
  612.     { }
  613. _AFXWIN_INLINE int CListBox::GetCount() const
  614.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETCOUNT, 0, 0); }
  615. _AFXWIN_INLINE int CListBox::GetCurSel() const
  616.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETCURSEL, 0, 0); }
  617. _AFXWIN_INLINE int CListBox::SetCurSel(int nSelect)
  618.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETCURSEL, nSelect, 0); }
  619. _AFXWIN_INLINE int CListBox::GetHorizontalExtent() const
  620.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETHORIZONTALEXTENT,
  621.         0, 0); }
  622. _AFXWIN_INLINE void CListBox::SetHorizontalExtent(int cxExtent)
  623.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LB_SETHORIZONTALEXTENT, cxExtent, 0); }
  624. _AFXWIN_INLINE int CListBox::GetSelCount() const
  625.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETSELCOUNT, 0, 0); }
  626. _AFXWIN_INLINE int CListBox::GetSelItems(int nMaxItems, LPINT rgIndex) const
  627.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETSELITEMS, nMaxItems, (LPARAM)rgIndex); }
  628. _AFXWIN_INLINE int CListBox::GetTopIndex() const
  629.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETTOPINDEX, 0, 0); }
  630. _AFXWIN_INLINE int CListBox::SetTopIndex(int nIndex)
  631.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETTOPINDEX, nIndex, 0);}
  632. _AFXWIN_INLINE DWORD CListBox::GetItemData(int nIndex) const
  633.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, LB_GETITEMDATA, nIndex, 0); }
  634. _AFXWIN_INLINE int CListBox::SetItemData(int nIndex, DWORD dwItemData)
  635.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETITEMDATA, nIndex, (LPARAM)dwItemData); }
  636. _AFXWIN_INLINE void* CListBox::GetItemDataPtr(int nIndex) const
  637.     { ASSERT(::IsWindow(m_hWnd)); return (LPVOID)::SendMessage(m_hWnd, LB_GETITEMDATA, nIndex, 0); }
  638. _AFXWIN_INLINE int CListBox::SetItemDataPtr(int nIndex, void* pData)
  639.     { ASSERT(::IsWindow(m_hWnd)); return SetItemData(nIndex, (DWORD)(LPVOID)pData); }
  640. _AFXWIN_INLINE int CListBox::GetItemRect(int nIndex, LPRECT lpRect) const
  641.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETITEMRECT, nIndex, (LPARAM)lpRect); }
  642. _AFXWIN_INLINE int CListBox::GetSel(int nIndex) const
  643.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETSEL, nIndex, 0); }
  644. _AFXWIN_INLINE int CListBox::SetSel(int nIndex, BOOL bSelect)
  645.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETSEL, bSelect, nIndex); }
  646. _AFXWIN_INLINE int CListBox::GetText(int nIndex, LPTSTR lpszBuffer) const
  647.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETTEXT, nIndex, (LPARAM)lpszBuffer); }
  648. _AFXWIN_INLINE int CListBox::GetTextLen(int nIndex) const
  649.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETTEXTLEN, nIndex, 0); }
  650. _AFXWIN_INLINE void CListBox::SetColumnWidth(int cxWidth)
  651.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LB_SETCOLUMNWIDTH, cxWidth, 0); }
  652. _AFXWIN_INLINE BOOL CListBox::SetTabStops(int nTabStops, LPINT rgTabStops)
  653.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, nTabStops, (LPARAM)rgTabStops); }
  654. _AFXWIN_INLINE void CListBox::SetTabStops()
  655.     { ASSERT(::IsWindow(m_hWnd)); VERIFY(::SendMessage(m_hWnd, LB_SETTABSTOPS, 0, 0)); }
  656. _AFXWIN_INLINE BOOL CListBox::SetTabStops(const int& cxEachStop)
  657.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, LB_SETTABSTOPS, 1, (LPARAM)(LPINT)&cxEachStop); }
  658. _AFXWIN_INLINE int CListBox::SetItemHeight(int nIndex, UINT cyItemHeight)
  659.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
  660. _AFXWIN_INLINE int CListBox::GetItemHeight(int nIndex) const
  661.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETITEMHEIGHT, nIndex, 0L); }
  662. _AFXWIN_INLINE int CListBox::FindStringExact(int nIndexStart, LPCTSTR lpszFind) const
  663.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_FINDSTRINGEXACT, nIndexStart, (LPARAM)lpszFind); }
  664. _AFXWIN_INLINE int CListBox::GetCaretIndex() const
  665.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETCARETINDEX, 0, 0L); }
  666. _AFXWIN_INLINE int CListBox::SetCaretIndex(int nIndex, BOOL bScroll)
  667.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SETCARETINDEX, nIndex, MAKELONG(bScroll, 0)); }
  668. _AFXWIN_INLINE int CListBox::AddString(LPCTSTR lpszItem)
  669.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_ADDSTRING, 0, (LPARAM)lpszItem); }
  670. _AFXWIN_INLINE int CListBox::DeleteString(UINT nIndex)
  671.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_DELETESTRING, nIndex, 0); }
  672. _AFXWIN_INLINE int CListBox::InsertString(int nIndex, LPCTSTR lpszItem)
  673.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_INSERTSTRING, nIndex, (LPARAM)lpszItem); }
  674. _AFXWIN_INLINE void CListBox::ResetContent()
  675.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LB_RESETCONTENT, 0, 0); }
  676. _AFXWIN_INLINE int CListBox::Dir(UINT attr, LPCTSTR lpszWildCard)
  677.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_DIR, attr, (LPARAM)lpszWildCard); }
  678. _AFXWIN_INLINE int CListBox::FindString(int nStartAfter, LPCTSTR lpszItem) const
  679.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_FINDSTRING,
  680.         nStartAfter, (LPARAM)lpszItem); }
  681. _AFXWIN_INLINE int CListBox::SelectString(int nStartAfter, LPCTSTR lpszItem)
  682.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_SELECTSTRING,
  683.         nStartAfter, (LPARAM)lpszItem); }
  684. _AFXWIN_INLINE int CListBox::SelItemRange(BOOL bSelect, int nFirstItem, int nLastItem)
  685.     { ASSERT(::IsWindow(m_hWnd)); return bSelect ?
  686.         (int)::SendMessage(m_hWnd, LB_SELITEMRANGEEX, nFirstItem, nLastItem) :
  687.         (int)::SendMessage(m_hWnd, LB_SELITEMRANGEEX, nLastItem, nFirstItem); }
  688. _AFXWIN_INLINE void CListBox::SetAnchorIndex(int nIndex)
  689.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, LB_SETANCHORINDEX, nIndex, 0); }
  690. _AFXWIN_INLINE int CListBox::GetAnchorIndex() const
  691.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_GETANCHORINDEX, 0, 0); }
  692. _AFXWIN_INLINE LCID CListBox::GetLocale() const
  693.     { ASSERT(::IsWindow(m_hWnd)); return (LCID)::SendMessage(m_hWnd, LB_GETLOCALE, 0, 0); }
  694. _AFXWIN_INLINE LCID CListBox::SetLocale(LCID nNewLocale)
  695.     { ASSERT(::IsWindow(m_hWnd)); return (LCID)::SendMessage(m_hWnd, LB_SETLOCALE, (WPARAM)nNewLocale, 0); }
  696. #if (WINVER >= 0x400)
  697. _AFXWIN_INLINE int CListBox::InitStorage(int nItems, UINT nBytes)
  698.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, LB_INITSTORAGE, (WPARAM)nItems, nBytes); }
  699. #endif
  700.  
  701. _AFXWIN_INLINE CCheckListBox::CCheckListBox()
  702.     { m_cyText = 0; m_nStyle = 0; }
  703. _AFXWIN_INLINE UINT CCheckListBox::GetCheckStyle()
  704.     { return m_nStyle; }
  705.  
  706. _AFXWIN_INLINE CComboBox::CComboBox()
  707.     { }
  708. _AFXWIN_INLINE int CComboBox::GetCount() const
  709.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETCOUNT, 0, 0); }
  710. _AFXWIN_INLINE int CComboBox::GetCurSel() const
  711.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETCURSEL, 0, 0); }
  712. _AFXWIN_INLINE int CComboBox::SetCurSel(int nSelect)
  713.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETCURSEL, nSelect, 0); }
  714. _AFXWIN_INLINE DWORD CComboBox::GetEditSel() const
  715.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, CB_GETEDITSEL, 0, 0); }
  716. _AFXWIN_INLINE BOOL CComboBox::LimitText(int nMaxChars)
  717.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, CB_LIMITTEXT, nMaxChars, 0); }
  718. _AFXWIN_INLINE BOOL CComboBox::SetEditSel(int nStartChar, int nEndChar)
  719.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, CB_SETEDITSEL, 0, MAKELONG(nStartChar, nEndChar)); }
  720. _AFXWIN_INLINE DWORD CComboBox::GetItemData(int nIndex) const
  721.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, CB_GETITEMDATA, nIndex, 0); }
  722. _AFXWIN_INLINE int CComboBox::SetItemData(int nIndex, DWORD dwItemData)
  723.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETITEMDATA, nIndex, (LPARAM)dwItemData); }
  724. _AFXWIN_INLINE void* CComboBox::GetItemDataPtr(int nIndex) const
  725.     { ASSERT(::IsWindow(m_hWnd)); return (LPVOID)GetItemData(nIndex); }
  726. _AFXWIN_INLINE int CComboBox::SetItemDataPtr(int nIndex, void* pData)
  727.     { ASSERT(::IsWindow(m_hWnd)); return SetItemData(nIndex, (DWORD)(LPVOID)pData); }
  728. _AFXWIN_INLINE int CComboBox::GetLBText(int nIndex, LPTSTR lpszText) const
  729.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETLBTEXT, nIndex, (LPARAM)lpszText); }
  730. _AFXWIN_INLINE int CComboBox::GetLBTextLen(int nIndex) const
  731.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETLBTEXTLEN, nIndex, 0); }
  732. _AFXWIN_INLINE void CComboBox::ShowDropDown(BOOL bShowIt)
  733.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, CB_SHOWDROPDOWN, bShowIt, 0); }
  734. _AFXWIN_INLINE int CComboBox::AddString(LPCTSTR lpszString)
  735.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_ADDSTRING, 0, (LPARAM)lpszString); }
  736. _AFXWIN_INLINE int CComboBox::DeleteString(UINT nIndex)
  737.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_DELETESTRING, nIndex, 0);}
  738. _AFXWIN_INLINE int CComboBox::InsertString(int nIndex, LPCTSTR lpszString)
  739.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_INSERTSTRING, nIndex, (LPARAM)lpszString); }
  740. _AFXWIN_INLINE void CComboBox::ResetContent()
  741.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, CB_RESETCONTENT, 0, 0); }
  742. _AFXWIN_INLINE int CComboBox::Dir(UINT attr, LPCTSTR lpszWildCard)
  743.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_DIR, attr, (LPARAM)lpszWildCard); }
  744. _AFXWIN_INLINE int CComboBox::FindString(int nStartAfter, LPCTSTR lpszString) const
  745.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_FINDSTRING, nStartAfter,
  746.         (LPARAM)lpszString); }
  747. _AFXWIN_INLINE int CComboBox::SelectString(int nStartAfter, LPCTSTR lpszString)
  748.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SELECTSTRING,
  749.         nStartAfter, (LPARAM)lpszString); }
  750. _AFXWIN_INLINE void CComboBox::Clear()
  751.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
  752. _AFXWIN_INLINE void CComboBox::Copy()
  753.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
  754. _AFXWIN_INLINE void CComboBox::Cut()
  755.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
  756. _AFXWIN_INLINE void CComboBox::Paste()
  757.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
  758. _AFXWIN_INLINE int CComboBox::SetItemHeight(int nIndex, UINT cyItemHeight)
  759.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETITEMHEIGHT, nIndex, MAKELONG(cyItemHeight, 0)); }
  760. _AFXWIN_INLINE int CComboBox::GetItemHeight(int nIndex) const
  761.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETITEMHEIGHT, nIndex, 0L); }
  762. _AFXWIN_INLINE int CComboBox::FindStringExact(int nIndexStart, LPCTSTR lpszFind) const
  763.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_FINDSTRINGEXACT, nIndexStart, (LPARAM)lpszFind); }
  764. _AFXWIN_INLINE int CComboBox::SetExtendedUI(BOOL bExtended )
  765.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETEXTENDEDUI, bExtended, 0L); }
  766. _AFXWIN_INLINE BOOL CComboBox::GetExtendedUI() const
  767.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, CB_GETEXTENDEDUI, 0, 0L); }
  768. _AFXWIN_INLINE void CComboBox::GetDroppedControlRect(LPRECT lprect) const
  769.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, CB_GETDROPPEDCONTROLRECT, 0, (DWORD)lprect); }
  770. _AFXWIN_INLINE BOOL CComboBox::GetDroppedState() const
  771.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, CB_GETDROPPEDSTATE, 0, 0L); }
  772. _AFXWIN_INLINE LCID CComboBox::GetLocale() const
  773.     { ASSERT(::IsWindow(m_hWnd)); return (LCID)::SendMessage(m_hWnd, CB_GETLOCALE, 0, 0); }
  774. _AFXWIN_INLINE LCID CComboBox::SetLocale(LCID nNewLocale)
  775.     { ASSERT(::IsWindow(m_hWnd)); return (LCID)::SendMessage(m_hWnd, CB_SETLOCALE, (WPARAM)nNewLocale, 0); }
  776. #if (WINVER >= 0x400)
  777. _AFXWIN_INLINE int CComboBox::GetTopIndex() const
  778.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETTOPINDEX, 0, 0); }
  779. _AFXWIN_INLINE int CComboBox::SetTopIndex(int nIndex)
  780.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETTOPINDEX, nIndex, 0); }
  781. _AFXWIN_INLINE int CComboBox::InitStorage(int nItems, UINT nBytes)
  782.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_INITSTORAGE, (WPARAM)nItems, nBytes); }
  783. _AFXWIN_INLINE void CComboBox::SetHorizontalExtent(UINT nExtent)
  784.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, CB_SETHORIZONTALEXTENT, nExtent, 0); }
  785. _AFXWIN_INLINE UINT CComboBox::GetHorizontalExtent() const
  786.     { ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, CB_GETHORIZONTALEXTENT, 0, 0); }
  787. _AFXWIN_INLINE int CComboBox::SetDroppedWidth(UINT nWidth)
  788.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_SETDROPPEDWIDTH, nWidth, 0); }
  789. _AFXWIN_INLINE int CComboBox::GetDroppedWidth() const
  790.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_GETDROPPEDWIDTH, 0, 0); }
  791. #endif
  792. _AFXWIN_INLINE CEdit::CEdit()
  793.     { }
  794. _AFXWIN_INLINE BOOL CEdit::CanUndo() const
  795.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_CANUNDO, 0, 0); }
  796. _AFXWIN_INLINE int CEdit::GetLineCount() const
  797.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETLINECOUNT, 0, 0); }
  798. _AFXWIN_INLINE BOOL CEdit::GetModify() const
  799.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_GETMODIFY, 0, 0); }
  800. _AFXWIN_INLINE void CEdit::SetModify(BOOL bModified)
  801.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETMODIFY, bModified, 0); }
  802. _AFXWIN_INLINE void CEdit::GetRect(LPRECT lpRect) const
  803.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_GETRECT, 0, (LPARAM)lpRect); }
  804. _AFXWIN_INLINE void CEdit::GetSel(int& nStartChar, int& nEndChar) const
  805.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_GETSEL, (WPARAM)&nStartChar,(LPARAM)&nEndChar); }
  806. _AFXWIN_INLINE DWORD CEdit::GetSel() const
  807.     { ASSERT(::IsWindow(m_hWnd)); return ::SendMessage(m_hWnd, EM_GETSEL, 0, 0); }
  808. _AFXWIN_INLINE HLOCAL CEdit::GetHandle() const
  809.     { ASSERT(::IsWindow(m_hWnd)); return (HLOCAL)::SendMessage(m_hWnd, EM_GETHANDLE, 0, 0); }
  810. _AFXWIN_INLINE void CEdit::SetHandle(HLOCAL hBuffer)
  811.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETHANDLE, (WPARAM)hBuffer, 0); }
  812. _AFXWIN_INLINE int CEdit::GetLine(int nIndex, LPTSTR lpszBuffer) const
  813.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex, (LPARAM)lpszBuffer); }
  814. _AFXWIN_INLINE int CEdit::GetLine(int nIndex, LPTSTR lpszBuffer, int nMaxLength) const
  815.     {
  816.         ASSERT(::IsWindow(m_hWnd));
  817.         *(LPWORD)lpszBuffer = (WORD)nMaxLength;
  818.         return (int)::SendMessage(m_hWnd, EM_GETLINE, nIndex, (LPARAM)lpszBuffer);
  819.     }
  820. _AFXWIN_INLINE void CEdit::EmptyUndoBuffer()
  821.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_EMPTYUNDOBUFFER, 0, 0); }
  822. _AFXWIN_INLINE BOOL CEdit::FmtLines(BOOL bAddEOL)
  823.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_FMTLINES, bAddEOL, 0); }
  824. _AFXWIN_INLINE void CEdit::LimitText(int nChars)
  825.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_LIMITTEXT, nChars, 0); }
  826. _AFXWIN_INLINE int CEdit::LineFromChar(int nIndex) const
  827.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_LINEFROMCHAR, nIndex, 0); }
  828. _AFXWIN_INLINE int CEdit::LineIndex(int nLine) const
  829.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_LINEINDEX, nLine, 0); }
  830. _AFXWIN_INLINE int CEdit::LineLength(int nLine) const
  831.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_LINELENGTH, nLine, 0); }
  832. _AFXWIN_INLINE void CEdit::LineScroll(int nLines, int nChars)
  833.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_LINESCROLL, nChars, nLines); }
  834. _AFXWIN_INLINE void CEdit::ReplaceSel(LPCTSTR lpszNewText, BOOL bCanUndo)
  835.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_REPLACESEL, (WPARAM) bCanUndo, (LPARAM)lpszNewText); }
  836. _AFXWIN_INLINE void CEdit::SetPasswordChar(TCHAR ch)
  837.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETPASSWORDCHAR, ch, 0); }
  838. _AFXWIN_INLINE void CEdit::SetRect(LPCRECT lpRect)
  839.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETRECT, 0, (LPARAM)lpRect); }
  840. _AFXWIN_INLINE void CEdit::SetRectNP(LPCRECT lpRect)
  841.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETRECTNP, 0, (LPARAM)lpRect); }
  842. _AFXWIN_INLINE void CEdit::SetSel(DWORD dwSelection, BOOL bNoScroll)
  843.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETSEL,
  844.         LOWORD(dwSelection), HIWORD(dwSelection));
  845.       if (!bNoScroll)
  846.         ::SendMessage(m_hWnd, EM_SCROLLCARET, 0, 0); }
  847. _AFXWIN_INLINE void CEdit::SetSel(int nStartChar, int nEndChar, BOOL bNoScroll)
  848.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETSEL, nStartChar, nEndChar);
  849.       if (!bNoScroll)
  850.         ::SendMessage(m_hWnd, EM_SCROLLCARET, 0, 0); }
  851. _AFXWIN_INLINE BOOL CEdit::SetTabStops(int nTabStops, LPINT rgTabStops)
  852.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS, nTabStops,
  853.         (LPARAM)rgTabStops); }
  854. _AFXWIN_INLINE void CEdit::SetTabStops()
  855.     { ASSERT(::IsWindow(m_hWnd)); VERIFY(::SendMessage(m_hWnd, EM_SETTABSTOPS, 0, 0)); }
  856. _AFXWIN_INLINE BOOL CEdit::SetTabStops(const int& cxEachStop)
  857.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETTABSTOPS,
  858.         1, (LPARAM)(LPINT)&cxEachStop); }
  859. _AFXWIN_INLINE BOOL CEdit::Undo()
  860.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_UNDO, 0, 0); }
  861. _AFXWIN_INLINE void CEdit::Clear()
  862.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CLEAR, 0, 0); }
  863. _AFXWIN_INLINE void CEdit::Copy()
  864.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_COPY, 0, 0); }
  865. _AFXWIN_INLINE void CEdit::Cut()
  866.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_CUT, 0, 0); }
  867. _AFXWIN_INLINE void CEdit::Paste()
  868.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_PASTE, 0, 0); }
  869. _AFXWIN_INLINE BOOL CEdit::SetReadOnly(BOOL bReadOnly )
  870.     { ASSERT(::IsWindow(m_hWnd)); return (BOOL)::SendMessage(m_hWnd, EM_SETREADONLY, bReadOnly, 0L); }
  871. _AFXWIN_INLINE int CEdit::GetFirstVisibleLine() const
  872.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_GETFIRSTVISIBLELINE, 0, 0L); }
  873. _AFXWIN_INLINE TCHAR CEdit::GetPasswordChar() const
  874.     { ASSERT(::IsWindow(m_hWnd)); return (TCHAR)::SendMessage(m_hWnd, EM_GETPASSWORDCHAR, 0, 0L); }
  875. #if (WINVER >= 0x400)
  876. _AFXWIN_INLINE void CEdit::SetMargins(UINT nLeft, UINT nRight)
  877.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETMARGINS, EC_LEFTMARGIN|EC_RIGHTMARGIN, MAKELONG(nLeft, nRight)); }
  878. _AFXWIN_INLINE DWORD CEdit::GetMargins() const
  879.     { ASSERT(::IsWindow(m_hWnd)); return (DWORD)::SendMessage(m_hWnd, EM_GETMARGINS, 0, 0); }
  880. _AFXWIN_INLINE void CEdit::SetLimitText(UINT nMax)
  881.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, EM_SETLIMITTEXT, nMax, 0); }
  882. _AFXWIN_INLINE UINT CEdit::GetLimitText() const
  883.     { ASSERT(::IsWindow(m_hWnd)); return (UINT)::SendMessage(m_hWnd, EM_GETLIMITTEXT, 0, 0); }
  884. _AFXWIN_INLINE CPoint CEdit::PosFromChar(UINT nChar) const
  885.     { ASSERT(::IsWindow(m_hWnd)); return CPoint( (DWORD)::SendMessage(m_hWnd, EM_POSFROMCHAR, nChar, 0)); }
  886. _AFXWIN_INLINE int CEdit::CharFromPos(CPoint pt) const
  887.     { ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, EM_CHARFROMPOS, 0, MAKELPARAM(pt.x, pt.y)); }
  888. #endif
  889.  
  890. _AFXWIN_INLINE CScrollBar::CScrollBar()
  891.     { }
  892. _AFXWIN_INLINE int CScrollBar::GetScrollPos() const
  893.     { ASSERT(::IsWindow(m_hWnd)); return ::GetScrollPos(m_hWnd, SB_CTL); }
  894. _AFXWIN_INLINE int CScrollBar::SetScrollPos(int nPos, BOOL bRedraw)
  895.     { ASSERT(::IsWindow(m_hWnd)); return ::SetScrollPos(m_hWnd, SB_CTL, nPos, bRedraw); }
  896. _AFXWIN_INLINE void CScrollBar::GetScrollRange(LPINT lpMinPos, LPINT lpMaxPos) const
  897.     { ASSERT(::IsWindow(m_hWnd)); ::GetScrollRange(m_hWnd, SB_CTL, lpMinPos, lpMaxPos); }
  898. _AFXWIN_INLINE void CScrollBar::SetScrollRange(int nMinPos, int nMaxPos, BOOL bRedraw)
  899.     { ASSERT(::IsWindow(m_hWnd)); ::SetScrollRange(m_hWnd, SB_CTL, nMinPos, nMaxPos, bRedraw); }
  900. _AFXWIN_INLINE void CScrollBar::ShowScrollBar(BOOL bShow)
  901.     { ASSERT(::IsWindow(m_hWnd)); ::ShowScrollBar(m_hWnd, SB_CTL, bShow); }
  902. _AFXWIN_INLINE BOOL CScrollBar::EnableScrollBar(UINT nArrowFlags)
  903.     { ASSERT(::IsWindow(m_hWnd)); return ::EnableScrollBar(m_hWnd, SB_CTL, nArrowFlags); }
  904. _AFXWIN_INLINE BOOL CScrollBar::SetScrollInfo(LPSCROLLINFO lpScrollInfo, BOOL bRedraw)
  905.     { return CWnd::SetScrollInfo(SB_CTL, lpScrollInfo, bRedraw); }
  906. _AFXWIN_INLINE BOOL CScrollBar::GetScrollInfo(LPSCROLLINFO lpScrollInfo, UINT nMask)
  907.     { return CWnd::GetScrollInfo(SB_CTL, lpScrollInfo, nMask); }
  908. _AFXWIN_INLINE int CScrollBar::GetScrollLimit()
  909.     { return CWnd::GetScrollLimit(SB_CTL); }
  910.  
  911.  
  912. // MDI functions
  913. _AFXWIN_INLINE void CMDIFrameWnd::MDIActivate(CWnd* pWndActivate)
  914.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDIACTIVATE,
  915.         (WPARAM)pWndActivate->m_hWnd, 0); }
  916. _AFXWIN_INLINE void CMDIFrameWnd::MDIIconArrange()
  917.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDIICONARRANGE, 0, 0); }
  918. _AFXWIN_INLINE void CMDIFrameWnd::MDIMaximize(CWnd* pWnd)
  919.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDIMAXIMIZE, (WPARAM)pWnd->m_hWnd, 0); }
  920. _AFXWIN_INLINE void CMDIFrameWnd::MDINext()
  921.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDINEXT, 0, 0); }
  922. _AFXWIN_INLINE void CMDIFrameWnd::MDIRestore(CWnd* pWnd)
  923.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDIRESTORE, (WPARAM)pWnd->m_hWnd, 0); }
  924. _AFXWIN_INLINE CMenu* CMDIFrameWnd::MDISetMenu(CMenu* pFrameMenu, CMenu* pWindowMenu)
  925.     { ASSERT(::IsWindow(m_hWnd)); return CMenu::FromHandle((HMENU)::SendMessage(
  926.         m_hWndMDIClient, WM_MDISETMENU, (WPARAM)pFrameMenu->GetSafeHmenu(),
  927.         (LPARAM)pWindowMenu->GetSafeHmenu())); }
  928. _AFXWIN_INLINE void CMDIFrameWnd::MDITile()
  929.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDITILE, 0, 0); }
  930. _AFXWIN_INLINE void CMDIFrameWnd::MDICascade()
  931.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, 0, 0); }
  932.  
  933. _AFXWIN_INLINE void CMDIFrameWnd::MDICascade(int nType)
  934.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDICASCADE, nType, 0); }
  935. _AFXWIN_INLINE void CMDIFrameWnd::MDITile(int nType)
  936.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWndMDIClient, WM_MDITILE, nType, 0); }
  937. _AFXWIN_INLINE void CMDIChildWnd::MDIDestroy()
  938.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(GetParent()->m_hWnd, WM_MDIDESTROY, (WPARAM)m_hWnd, 0L); }
  939. _AFXWIN_INLINE void CMDIChildWnd::MDIActivate()
  940.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(GetParent()->m_hWnd, WM_MDIACTIVATE, (WPARAM)m_hWnd, 0L); }
  941. _AFXWIN_INLINE void CMDIChildWnd::MDIMaximize()
  942.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(GetParent()->m_hWnd, WM_MDIMAXIMIZE, (WPARAM)m_hWnd, 0L); }
  943. _AFXWIN_INLINE void CMDIChildWnd::MDIRestore()
  944.     { ASSERT(::IsWindow(m_hWnd)); ::SendMessage(GetParent()->m_hWnd, WM_MDIRESTORE, (WPARAM)m_hWnd, 0L); }
  945.  
  946. // CView
  947. _AFXWIN_INLINE CDocument* CView::GetDocument() const
  948.     { ASSERT(this != NULL); return m_pDocument; }
  949. _AFXWIN_INLINE CSize CScrollView::GetTotalSize() const
  950.     { ASSERT(this != NULL); return m_totalLog; }
  951.  
  952. // CDocument
  953. _AFXWIN_INLINE const CString& CDocument::GetTitle() const
  954.     { ASSERT(this != NULL); return m_strTitle; }
  955. _AFXWIN_INLINE const CString& CDocument::GetPathName() const
  956.     { ASSERT(this != NULL); return m_strPathName; }
  957. _AFXWIN_INLINE CDocTemplate* CDocument::GetDocTemplate() const
  958.     { ASSERT(this != NULL); return m_pDocTemplate; }
  959. _AFXWIN_INLINE BOOL CDocument::IsModified()
  960.     { ASSERT(this != NULL); return m_bModified; }
  961. _AFXWIN_INLINE void CDocument::SetModifiedFlag(BOOL bModified)
  962.     { ASSERT(this != NULL); m_bModified = bModified; }
  963.  
  964. // CWinThread
  965. _AFXWIN_INLINE CWinThread::operator HANDLE() const
  966.     { return this == NULL ? NULL : m_hThread; }
  967. _AFXWIN_INLINE BOOL CWinThread::SetThreadPriority(int nPriority)
  968.     { ASSERT(m_hThread != NULL); return ::SetThreadPriority(m_hThread, nPriority); }
  969. _AFXWIN_INLINE int CWinThread::GetThreadPriority()
  970.     { ASSERT(m_hThread != NULL); return ::GetThreadPriority(m_hThread); }
  971. _AFXWIN_INLINE DWORD CWinThread::ResumeThread()
  972.     { ASSERT(m_hThread != NULL); return ::ResumeThread(m_hThread); }
  973. _AFXWIN_INLINE DWORD CWinThread::SuspendThread()
  974.     { ASSERT(m_hThread != NULL); return ::SuspendThread(m_hThread); }
  975. _AFXWIN_INLINE BOOL CWinThread::PostThreadMessage(UINT message, WPARAM wParam, LPARAM lParam)
  976.     { ASSERT(m_hThread != NULL); return ::PostThreadMessage(m_nThreadID, message, wParam, lParam); }
  977.  
  978. // CWinApp
  979. _AFXWIN_INLINE HCURSOR CWinApp::LoadCursor(LPCTSTR lpszResourceName) const
  980.     { return ::LoadCursor(AfxFindResourceHandle(lpszResourceName,
  981.         RT_GROUP_CURSOR), lpszResourceName); }
  982. _AFXWIN_INLINE HCURSOR CWinApp::LoadCursor(UINT nIDResource) const
  983.     { return ::LoadCursor(AfxFindResourceHandle(MAKEINTRESOURCE(nIDResource),
  984.         RT_GROUP_CURSOR), MAKEINTRESOURCE(nIDResource)); }
  985. _AFXWIN_INLINE HCURSOR CWinApp::LoadStandardCursor(LPCTSTR lpszCursorName) const
  986.     { return ::LoadCursor(NULL, lpszCursorName); }
  987. _AFXWIN_INLINE HCURSOR CWinApp::LoadOEMCursor(UINT nIDCursor) const
  988.     { return ::LoadCursor(NULL, MAKEINTRESOURCE(nIDCursor)); }
  989. _AFXWIN_INLINE HICON CWinApp::LoadIcon(LPCTSTR lpszResourceName) const
  990.     { return ::LoadIcon(AfxFindResourceHandle(lpszResourceName,
  991.         RT_GROUP_ICON), lpszResourceName); }
  992. _AFXWIN_INLINE HICON CWinApp::LoadIcon(UINT nIDResource) const
  993.     { return ::LoadIcon(AfxFindResourceHandle(MAKEINTRESOURCE(nIDResource),
  994.         RT_GROUP_ICON), MAKEINTRESOURCE(nIDResource)); }
  995. _AFXWIN_INLINE HICON CWinApp::LoadStandardIcon(LPCTSTR lpszIconName) const
  996.     { return ::LoadIcon(NULL, lpszIconName); }
  997. _AFXWIN_INLINE HICON CWinApp::LoadOEMIcon(UINT nIDIcon) const
  998.     { return ::LoadIcon(NULL, MAKEINTRESOURCE(nIDIcon)); }
  999.  
  1000. _AFXWIN_INLINE CWaitCursor::CWaitCursor()
  1001.     { AfxGetApp()->BeginWaitCursor(); }
  1002. _AFXWIN_INLINE CWaitCursor::~CWaitCursor()
  1003.     { AfxGetApp()->EndWaitCursor(); }
  1004. _AFXWIN_INLINE void CWaitCursor::Restore()
  1005.     { AfxGetApp()->RestoreWaitCursor(); }
  1006.  
  1007. /////////////////////////////////////////////////////////////////////////////
  1008. // Obsolete and non-portable
  1009.  
  1010. _AFXWIN_INLINE void CWnd::CloseWindow()
  1011.     { ASSERT(::IsWindow(m_hWnd)); ::CloseWindow(m_hWnd); }
  1012. _AFXWIN_INLINE BOOL CWnd::OpenIcon()
  1013.     { ASSERT(::IsWindow(m_hWnd)); return ::OpenIcon(m_hWnd); }
  1014.  
  1015. /////////////////////////////////////////////////////////////////////////////
  1016.  
  1017. #endif //_AFXWIN_INLINE
  1018.