home *** CD-ROM | disk | FTP | other *** search
/ Media Share 13 / mediashare_13.zip / mediashare_13 / ZIPPED / PROGRAM / WTJ9403.ZIP / WILDASS / SOURCE / OPTSDLG.CPP < prev    next >
C/C++ Source or Header  |  1993-08-14  |  3KB  |  99 lines

  1. // optsdlg.cpp : implementation file
  2. //
  3.  
  4. #include <afxwin.h>
  5. #include <afxext.h> 
  6. #include <ctl3d.h>
  7.                       
  8. #include "resource.h"                      
  9.  
  10. #include "optsdlg.h"
  11. #include "app.h"
  12.  
  13. #ifdef _DEBUG
  14. #undef THIS_FILE
  15. static char BASED_CODE THIS_FILE[] = __FILE__;
  16. #endif
  17.  
  18. /////////////////////////////////////////////////////////////////////////////
  19. // COptsDlg dialog
  20.  
  21. COptsDlg::COptsDlg(CWnd* pParent /*=NULL*/)
  22.    : CDialog(COptsDlg::IDD, pParent)
  23. {
  24.    //{{AFX_DATA_INIT(COptsDlg)
  25.    m_cPixelFrame = 0;
  26.    m_fComeUpAllways = FALSE;
  27.    m_fStayVisible = FALSE;
  28.    //}}AFX_DATA_INIT
  29. }
  30.  
  31. void COptsDlg::DoDataExchange(CDataExchange* pDX)
  32. {
  33.    CDialog::DoDataExchange(pDX);
  34.    //{{AFX_DATA_MAP(COptsDlg)
  35.    DDX_Text(pDX, IDC_NUMPIXELFRAME, m_cPixelFrame);
  36.    DDV_MinMaxUInt(pDX, m_cPixelFrame, 0, 128);
  37.    DDX_Check(pDX, IDC_CHECK1, m_fComeUpAllways);
  38.    DDX_Check(pDX, IDC_CHECK2, m_fStayVisible);
  39.    //}}AFX_DATA_MAP
  40. }
  41.  
  42. BEGIN_MESSAGE_MAP(COptsDlg, CDialog)
  43.    //{{AFX_MSG_MAP(COptsDlg)
  44.    ON_BN_CLICKED(IDC_DESKTOP_ONE, OnClickedDesktopOne)
  45.    ON_BN_CLICKED(IDC_DESKTOP_THREE, OnClickedDesktopThree)
  46.    ON_BN_CLICKED(IDC_DESKTOP_TWO, OnClickedDesktopTwo)
  47.    ON_BN_CLICKED(IDC_HELP, OnClickedHelp)
  48.    //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // COptsDlg message handlers
  53.  
  54. BOOL COptsDlg::OnInitDialog()
  55. {
  56.    // TODO: Add extra initialization here
  57.    
  58.    // Get options settings from the application
  59.    CMyApp * pApp = (CMyApp*)AfxGetApp();
  60.    
  61.    m_cPixelFrame = pApp->Settings_PixelFrame();
  62.    m_fComeUpAllways = pApp->Settings_ComeUpAllways();
  63.    m_fStayVisible = pApp->Settings_StayVisible();
  64.  
  65.    // update data
  66.    CDialog::OnInitDialog();
  67.    
  68.    // CenterWindow();   
  69.    
  70.    return TRUE;  // return TRUE  unless you set the focus to a control
  71. }
  72.  
  73.  
  74. void COptsDlg::OnClickedDesktopOne()
  75. {
  76.    // clean the profile 
  77.    CString strFile = AfxGetAppName() + CString(".ini");
  78.    WritePrivateProfileString( "Desktop1", NULL, NULL, strFile );
  79. }
  80.  
  81. void COptsDlg::OnClickedDesktopThree()
  82. {
  83.    // clean the profile 
  84.    CString strFile = AfxGetAppName() + CString(".ini");
  85.    WritePrivateProfileString( "Desktop2", NULL, NULL, strFile );
  86. }
  87.  
  88. void COptsDlg::OnClickedDesktopTwo()
  89. {
  90.    // clean the profile 
  91.    CString strFile = AfxGetAppName() + CString(".ini");
  92.    WritePrivateProfileString( "Desktop3", NULL, NULL, strFile );
  93. }
  94.  
  95. void COptsDlg::OnClickedHelp()
  96. {
  97.    AfxGetApp()->WinHelp( 0L, HELP_CONTENTS );
  98. }
  99.