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

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