home *** CD-ROM | disk | FTP | other *** search
/ Delphi Developer's Kit 1996 / Delphi Developer's Kit 1996.iso / power / csystray.000 / csystray / systray.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-22  |  1.5 KB  |  60 lines

  1. // systray.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "systray.h"
  6. #include "systrdlg.h"
  7. #include "csystray.h"
  8.  
  9. #ifdef _DEBUG
  10. #undef THIS_FILE
  11. static char BASED_CODE THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CSystrayApp
  16.  
  17. BEGIN_MESSAGE_MAP(CSystrayApp, CWinApp)
  18.     //{{AFX_MSG_MAP(CSystrayApp)
  19.     //}}AFX_MSG
  20.     ON_COMMAND(ID_HELP, CWinApp::OnHelp)
  21. END_MESSAGE_MAP()
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CSystrayApp construction
  25.  
  26. CSystrayApp::CSystrayApp()
  27. {
  28. }
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // The one and only CSystrayApp object
  32.  
  33. CSystrayApp theApp;
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CSystrayApp initialization
  37.  
  38. BOOL CSystrayApp::InitInstance()
  39. {
  40.     // Standard initialization
  41.  
  42.     Enable3dControls();
  43.     LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  44.  
  45.     {
  46.         CSystrayDlg dlg;
  47.         m_pMainWnd = &dlg;
  48.         CString szINISection = "CSysTray";
  49.         dlg.m_bLoadOnStartup = AfxGetApp()->GetProfileInt(szINISection,
  50.             "Load on Startup", 0);
  51.         dlg.m_bEnable = dlg.m_bLoadOnStartup;
  52.         dlg.m_bCycle = GetProfileInt(szINISection, "Cycle Icon", 0);
  53.         dlg.DoModal();
  54.     }
  55.  
  56.     // Since the dialog has been closed, return FALSE so that we exit the
  57.     //  application, rather than start the application's message pump.
  58.     return FALSE;
  59. }
  60.