TransparentControl.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // TransparentControl.cpp : Defines the class behaviors for the application.
  2. //
  3. #include "stdafx.h"
  4. #include "TransparentControl.h"
  5. //#include "TransparentControlDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #endif
  9. // CTransparentControlApp
  10. BEGIN_MESSAGE_MAP(CTransparentControlApp, CWinApp)
  11. ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  12. END_MESSAGE_MAP()
  13. // CTransparentControlApp construction
  14. CTransparentControlApp::CTransparentControlApp()
  15. {
  16. // TODO: add construction code here,
  17. // Place all significant initialization in InitInstance
  18. }
  19. // The one and only CTransparentControlApp object
  20. CTransparentControlApp theApp;
  21. // CTransparentControlApp initialization
  22. BOOL CTransparentControlApp::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. AfxEnableControlContainer();
  30. // Standard initialization
  31. // If you are not using these features and wish to reduce the size
  32. // of your final executable, you should remove from the following
  33. // the specific initialization routines you do not need
  34. // Change the registry key under which our settings are stored
  35. // TODO: You should modify this string to be something appropriate
  36. // such as the name of your company or organization
  37. SetRegistryKey(_T("Local AppWizard-Generated Applications"));
  38. CTransparentControlDlg dlg;
  39. m_pMainWnd = &dlg;
  40. INT_PTR nResponse = dlg.DoModal();
  41. if (nResponse == IDOK)
  42. {
  43. // TODO: Place code here to handle when the dialog is
  44. // dismissed with OK
  45. }
  46. else if (nResponse == IDCANCEL)
  47. {
  48. // TODO: Place code here to handle when the dialog is
  49. // dismissed with Cancel
  50. }
  51. // Since the dialog has been closed, return FALSE so that we exit the
  52. // application, rather than start the application's message pump.
  53. return FALSE;
  54. }