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.

101 lines
4.7 KiB

  1. // Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1993 Microsoft Corporation,
  3. // All rights reserved.
  4. // This source code is only intended as a supplement to the
  5. // Microsoft Foundation Classes Reference and Microsoft
  6. // QuickHelp and/or WinHelp documentation provided with the library.
  7. // See these sources for detailed information regarding the
  8. // Microsoft Foundation Classes product.
  9. // Inlines for AFXDLGS.H
  10. #ifdef _AFXDLGS_INLINE
  11. /////////////////////////////////////////////////////////////////////////////
  12. _AFXDLGS_INLINE CString CFileDialog::GetPathName() const
  13. { return m_ofn.lpstrFile; }
  14. _AFXDLGS_INLINE CString CFileDialog::GetFileExt() const
  15. { if (m_ofn.nFileExtension == 0) return (char)'\0';
  16. else return m_ofn.lpstrFile + m_ofn.nFileExtension; }
  17. _AFXDLGS_INLINE CString CFileDialog::GetFileTitle() const
  18. { return m_ofn.lpstrFileTitle; }
  19. _AFXDLGS_INLINE BOOL CFileDialog::GetReadOnlyPref() const
  20. { return m_ofn.Flags & OFN_READONLY ? TRUE : FALSE; }
  21. _AFXDLGS_INLINE void CFontDialog::GetCurrentFont(LPLOGFONT lplf)
  22. { ASSERT(m_hWnd != NULL); SendMessage(WM_CHOOSEFONT_GETLOGFONT,
  23. 0, (DWORD)(LPSTR)lplf); }
  24. _AFXDLGS_INLINE CString CFontDialog::GetFaceName() const
  25. { return (LPCSTR)m_cf.lpLogFont->lfFaceName; }
  26. _AFXDLGS_INLINE CString CFontDialog::GetStyleName() const
  27. { return m_cf.lpszStyle; }
  28. _AFXDLGS_INLINE int CFontDialog::GetSize() const
  29. { return m_cf.iPointSize; }
  30. _AFXDLGS_INLINE int CFontDialog::GetWeight() const
  31. { return m_cf.lpLogFont->lfWeight; }
  32. _AFXDLGS_INLINE BOOL CFontDialog::IsItalic() const
  33. { return m_cf.lpLogFont->lfItalic ? TRUE : FALSE; }
  34. _AFXDLGS_INLINE BOOL CFontDialog::IsStrikeOut() const
  35. { return m_cf.lpLogFont->lfStrikeOut ? TRUE : FALSE; }
  36. _AFXDLGS_INLINE BOOL CFontDialog::IsBold() const
  37. { return m_cf.lpLogFont->lfWeight == FW_BOLD ? TRUE : FALSE; }
  38. _AFXDLGS_INLINE BOOL CFontDialog::IsUnderline() const
  39. { return m_cf.lpLogFont->lfUnderline ? TRUE : FALSE; }
  40. _AFXDLGS_INLINE COLORREF CFontDialog::GetColor() const
  41. { return m_cf.rgbColors; }
  42. _AFXDLGS_INLINE COLORREF CColorDialog::GetColor() const
  43. { return m_cc.rgbResult; }
  44. _AFXDLGS_INLINE BOOL CPrintDialog::GetDefaults()
  45. { m_pd.Flags |= PD_RETURNDEFAULT;
  46. return ::PrintDlg(&m_pd); }
  47. _AFXDLGS_INLINE BOOL CPrintDialog::PrintSelection() const
  48. { return m_pd.Flags & PD_SELECTION ? TRUE : FALSE; }
  49. _AFXDLGS_INLINE BOOL CPrintDialog::PrintRange() const
  50. { return m_pd.Flags & PD_PAGENUMS ? TRUE : FALSE; }
  51. _AFXDLGS_INLINE BOOL CPrintDialog::PrintAll() const
  52. { return !PrintRange() && !PrintSelection() ? TRUE : FALSE; }
  53. _AFXDLGS_INLINE BOOL CPrintDialog::PrintCollate() const
  54. { return m_pd.Flags & PD_COLLATE ? TRUE : FALSE; }
  55. _AFXDLGS_INLINE int CPrintDialog::GetFromPage() const
  56. { return (PrintRange() ? m_pd.nFromPage :-1); }
  57. _AFXDLGS_INLINE int CPrintDialog::GetToPage() const
  58. { return (PrintRange() ? m_pd.nToPage :-1); }
  59. _AFXDLGS_INLINE BOOL CFindReplaceDialog::IsTerminating() const
  60. { return m_fr.Flags & FR_DIALOGTERM ? TRUE : FALSE ; }
  61. _AFXDLGS_INLINE CString CFindReplaceDialog::GetReplaceString() const
  62. { return m_fr.lpstrReplaceWith; }
  63. _AFXDLGS_INLINE CString CFindReplaceDialog::GetFindString() const
  64. { return m_fr.lpstrFindWhat; }
  65. _AFXDLGS_INLINE BOOL CFindReplaceDialog::SearchDown() const
  66. { return m_fr.Flags & FR_DOWN ? TRUE : FALSE; }
  67. _AFXDLGS_INLINE BOOL CFindReplaceDialog::FindNext() const
  68. { return m_fr.Flags & FR_FINDNEXT ? TRUE : FALSE; }
  69. _AFXDLGS_INLINE BOOL CFindReplaceDialog::MatchCase() const
  70. { return m_fr.Flags & FR_MATCHCASE ? TRUE : FALSE; }
  71. _AFXDLGS_INLINE BOOL CFindReplaceDialog::MatchWholeWord() const
  72. { return m_fr.Flags & FR_WHOLEWORD ? TRUE : FALSE; }
  73. _AFXDLGS_INLINE BOOL CFindReplaceDialog::ReplaceCurrent() const
  74. { return m_fr. Flags & FR_REPLACE ? TRUE : FALSE; }
  75. _AFXDLGS_INLINE BOOL CFindReplaceDialog::ReplaceAll() const
  76. { return m_fr.Flags & FR_REPLACEALL ? TRUE : FALSE; }
  77. // CPropertySheet/CPropertyPage/CTabControl inlines
  78. _AFXDLGS_INLINE int CTabControl::GetCurSel() const
  79. { return m_nCurTab; }
  80. _AFXDLGS_INLINE CTabItem* CTabControl::GetTabItem(int nTab) const
  81. { return (CTabItem*)m_tabs[nTab]; }
  82. _AFXDLGS_INLINE int CTabControl::GetItemCount() const
  83. { return m_tabs.GetSize(); }
  84. _AFXDLGS_INLINE void CPropertySheet::EnableStackedTabs(BOOL bStacked)
  85. { m_bStacked = bStacked; }
  86. _AFXDLGS_INLINE int CPropertySheet::GetPageCount() const
  87. { return m_pages.GetSize(); }
  88. _AFXDLGS_INLINE CPropertyPage* CPropertySheet::GetPage(int nPage) const
  89. { return (CPropertyPage*)m_pages[nPage]; }
  90. _AFXDLGS_INLINE CPropertyPage* CPropertySheet::GetActivePage() const
  91. {return GetPage(m_nCurPage);}
  92. /////////////////////////////////////////////////////////////////////////////
  93. #endif //_AFXDLGS_INLINE