DLL client.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // DLL client.cpp : Defines the class behaviors for the application.
  2. //
  3. // Copyright 2002 Neil Van Eps
  4. //
  5. #include "stdafx.h"
  6. #include "DLL client.h"
  7. #include "DLL clientDlg.h"
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CDLLclientApp
  15. BEGIN_MESSAGE_MAP(CDLLclientApp, CWinApp)
  16. //{{AFX_MSG_MAP(CDLLclientApp)
  17. // NOTE - the ClassWizard will add and remove mapping macros here.
  18. // DO NOT EDIT what you see in these blocks of generated code!
  19. //}}AFX_MSG
  20. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  21. END_MESSAGE_MAP()
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CDLLclientApp construction
  24. CDLLclientApp::CDLLclientApp()
  25. {
  26. // TODO: add construction code here,
  27. // Place all significant initialization in InitInstance
  28. }
  29. /////////////////////////////////////////////////////////////////////////////
  30. // The one and only CDLLclientApp object
  31. CDLLclientApp theApp;
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CDLLclientApp initialization
  34. BOOL CDLLclientApp::InitInstance()
  35. {
  36. // Standard initialization
  37. // If you are not using these features and wish to reduce the size
  38. // of your final executable, you should remove from the following
  39. // the specific initialization routines you do not need.
  40. #ifdef _AFXDLL
  41. Enable3dControls(); // Call this when using MFC in a shared DLL
  42. #else
  43. Enable3dControlsStatic(); // Call this when linking to MFC statically
  44. #endif
  45. CDLLclientDlg dlg;
  46. m_pMainWnd = &dlg;
  47. int nResponse = dlg.DoModal();
  48. if (nResponse == IDOK)
  49. {
  50. // TODO: Place code here to handle when the dialog is
  51. // dismissed with OK
  52. }
  53. else if (nResponse == IDCANCEL)
  54. {
  55. // TODO: Place code here to handle when the dialog is
  56. // dismissed with Cancel
  57. }
  58. // Since the dialog has been closed, return FALSE so that we exit the
  59. // application, rather than start the application's message pump.
  60. return FALSE;
  61. }