home *** CD-ROM | disk | FTP | other *** search
/ Troubleshooting Netware Systems / CSTRIAL0196.BIN / attach / msj / v10n03 / bocole.exe / MAINFRM.CPP < prev    next >
C/C++ Source or Header  |  1995-03-01  |  2KB  |  80 lines

  1. // mainfrm.cpp : implementation of the CMainFrame class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and Microsoft
  9. // QuickHelp and/or WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14.  
  15. #include "stdafx.h"
  16. #include "bounce.h"
  17. #include "hello.h"
  18. #include "mdi.h"
  19.  
  20. #include "mainfrm.h"
  21.  
  22. #ifdef _DEBUG
  23. #undef THIS_FILE
  24. static char BASED_CODE THIS_FILE[] = __FILE__;
  25. #endif
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // CMainFrame
  29.  
  30. IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameOCF)
  31.  
  32. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameOCF)
  33.   //{{AFX_MSG_MAP(CMainFrame)
  34.   ON_COMMAND(IDM_BOUNCE, OnBounce)
  35.   ON_COMMAND(IDM_HELLO, OnHello)
  36.   //}}AFX_MSG_MAP
  37. END_MESSAGE_MAP()
  38.  
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CMainFrame construction/destruction
  42.  
  43. CMainFrame::CMainFrame()
  44. {
  45. }
  46.  
  47. CMainFrame::~CMainFrame()
  48. {
  49. }
  50.  
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53. // CMainFrame commands
  54.  
  55.  
  56. void CMainFrame::OnBounce()
  57. {
  58.   CBounceWnd *pBounceWnd = new CBounceWnd;
  59.   if (!pBounceWnd->Create("Bounce",
  60.     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW |
  61.     WS_CLIPSIBLINGS | WS_CLIPSIBLINGS,
  62.     rectDefault, this))
  63.     return;
  64.  
  65.   // the default PostNcDestroy handler will delete this object when destroyed
  66. }
  67.  
  68.  
  69. void CMainFrame::OnHello()
  70. {
  71.   CHelloWnd *pHelloWnd = new CHelloWnd;
  72.   if (!pHelloWnd->Create("Hello",
  73.     WS_CHILD | WS_VISIBLE | WS_OVERLAPPEDWINDOW | 
  74.     WS_CLIPSIBLINGS | WS_CLIPSIBLINGS,
  75.     rectDefault, this))
  76.     return;
  77.  
  78.   // the default PostNcDestroy handler will delete this object when destroyed
  79. }
  80.