home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / mfc / src / appdlg.cpp < prev    next >
C/C++ Source or Header  |  1998-06-16  |  1KB  |  50 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. #include "stdafx.h"
  12.  
  13. #ifdef AFX_CORE3_SEG
  14. #pragma code_seg(AFX_CORE3_SEG)
  15. #endif
  16.  
  17. #ifdef _DEBUG
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21.  
  22. /////////////////////////////////////////////////////////////////////////////
  23. // WinApp features for new and open
  24.  
  25. void CWinApp::OnFileNew()
  26. {
  27.     if (m_pDocManager != NULL)
  28.         m_pDocManager->OnFileNew();
  29. }
  30.  
  31. /////////////////////////////////////////////////////////////////////////////
  32.  
  33. void CWinApp::OnFileOpen()
  34. {
  35.     ASSERT(m_pDocManager != NULL);
  36.     m_pDocManager->OnFileOpen();
  37. }
  38.  
  39. // prompt for file name - used for open and save as
  40. BOOL CWinApp::DoPromptFileName(CString& fileName, UINT nIDSTitle, DWORD lFlags,
  41.     BOOL bOpenFileDialog, CDocTemplate* pTemplate)
  42.         // if pTemplate==NULL => all document templates
  43. {
  44.     ASSERT(m_pDocManager != NULL);
  45.     return m_pDocManager->DoPromptFileName(fileName, nIDSTitle, lFlags,
  46.         bOpenFileDialog, pTemplate);
  47. }
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50.