Click here to Skip to main content
15,891,136 members
Articles / Programming Languages / Objective C

Date-Time Conversion Utility

Rate me:
Please Sign up or sign in to vote.
4.57/5 (14 votes)
21 Sep 20012 min read 234.1K   3.1K   40  
A simple app that converts to and between time_t, DATE, and regular date string expressions
// DlgOptions.cpp : implementation file
//

#include "stdafx.h"
#include "dtconverter.h"
#include "DlgOptions.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgOptions dialog


CDlgOptions::CDlgOptions(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgOptions::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgOptions)
	m_iAutoPaste = -1;
	m_bAutoConvert = FALSE;
	m_iAutoConvert = -1;
	//}}AFX_DATA_INIT
}


void CDlgOptions::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgOptions)
	DDX_Radio(pDX, IDC_RD_NOAUTOPASTE, m_iAutoPaste);
	DDX_Check(pDX, IDC_CHK_AUTOCONVERT, m_bAutoConvert);
	DDX_Radio(pDX, IDC_RD_NOAUTOCONVERT, m_iAutoConvert);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgOptions, CDialog)
	//{{AFX_MSG_MAP(CDlgOptions)
	ON_BN_CLICKED(IDOK, OnApply)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgOptions message handlers

void CDlgOptions::OnApply() 
{
  CDialog::OnOK();
}

BOOL CDlgOptions::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
  UpdateData(FALSE);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


Written By
Web Developer
United States United States
I've done extensive work with C++, MFC, COM, and ATL on the Windows side. On the Web side, I've worked with VB, ASP, JavaScript, and COM+. I've also been involved with server-side Java, which includes JSP, Servlets, and EJB, and more recently with ASP.NET/C#.

Comments and Discussions