PropGrid.cpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // PropGrid.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "PropGrid.h"
  5. #include "PropGridDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #endif
  9. // CPropGridApp
  10. BEGIN_MESSAGE_MAP(CPropGridApp, CWinApp)
  11. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  12. END_MESSAGE_MAP()
  13. // CPropGridApp construction
  14. CPropGridApp::CPropGridApp()
  15. {
  16. // TODO: add construction code here,
  17. // Place all significant initialization in InitInstance
  18. }
  19. // The one and only CPropGridApp object
  20. CPropGridApp theApp;
  21. // CPropGridApp initialization
  22. BOOL CPropGridApp::InitInstance()
  23. {
  24. // InitCommonControls() is required on Windows XP if an application
  25. // manifest specifies use of ComCtl32.dll version 6 or later to enable
  26. // visual styles. Otherwise, any window creation will fail.
  27. InitCommonControls();
  28. CWinApp::InitInstance();
  29. // Standard initialization
  30. // If you are not using these features and wish to reduce the size
  31. // of your final executable, you should remove from the following
  32. // the specific initialization routines you do not need
  33. // Change the registry key under which our settings are stored
  34. // TODO: You should modify this string to be something appropriate
  35. // such as the name of your company or organization
  36. SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  37. CPropGridDlg dlg;
  38. m_pMainWnd = &dlg;
  39. INT_PTR nResponse = dlg.DoModal();
  40. if (nResponse == IDOK)
  41. {
  42. // TODO: Place code here to handle when the dialog is
  43. // dismissed with OK
  44. }
  45. else if (nResponse == IDCANCEL)
  46. {
  47. // TODO: Place code here to handle when the dialog is
  48. // dismissed with Cancel
  49. }
  50. // Since the dialog has been closed, return FALSE so that we exit the
  51. // application, rather than start the application's message pump.
  52. return FALSE;
  53. }