15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


DDX_FieldText for CTime

Charles -- chung.charles@syncrude.com
Thursday, September 19, 1996


Environment: MSVC 1.52 , Win 3.1

Hi all,
     I have a variable of type CTime and I would like to perform 
"DoDataExchange" on it. However, DDX_FieldText does not take in CTime as a 
variable. Is there any other function I can call instead of DDX_FieldText?
     The folowing is an extract from my code.
     Thanx.
Charles.

class TEST_TYPE {
     CTime m_INSET_DATE ;
}  m_pSet ;

void CChemInvView::DoDataExchange(CDataExchange* pDX)
{
     CRecordView::DoDataExchange(pDX);
     DDX_FieldText(pDX, IDC_TXT_INSERT_DATE,
               m_pSet.m_INSERT_DATE, m_pSet) ;
}




David Little -- dlittle@communique.net
Saturday, September 21, 1996

[Mini-digest: 2 responses]

If you were using a 16-bit CRecordset, you could use this (or something similar):

DoFieldExchange()
{.....
RFX_Date(pFX, "UCRACCT_ACTIVITY_DATE", m_UCRACCT_ACTIVITY_DATE);
}

in place of the DDX routines, and don't forget...CTime doesn't work for dates prior to 1970, so you can't use it for birthdate....


----------
From: 	Chung, Charles[SMTP:chung.charles@syncrude.com]
Sent: 	Thursday, September 19, 1996 1:24 PM
To: 	C++
Subject: 	DDX_FieldText for CTime


Environment: MSVC 1.52 , Win 3.1

Hi all,
     I have a variable of type CTime and I would like to perform 
"DoDataExchange" on it. However, DDX_FieldText does not take in CTime as a 
variable. Is there any other function I can call instead of DDX_FieldText?
     The folowing is an extract from my code.
     Thanx.
Charles.

class TEST_TYPE {
     CTime m_INSET_DATE ;
}  m_pSet ;

void CChemInvView::DoDataExchange(CDataExchange* pDX)
{
     CRecordView::DoDataExchange(pDX);
     DDX_FieldText(pDX, IDC_TXT_INSERT_DATE,
               m_pSet.m_INSERT_DATE, m_pSet) ;
}


-----From: pjn@indigo.ie (pjn)

Unfortunately there is no routine for this. If you were in Win32, you
could read it in as a COleDateTime and then convert to a CTime but
this is not going to solve your immediate problem. You might want to
have a look at a number of classes I have produced called "DTime". Its
home page is at URL:http://indigo.ie/~pjn/dtime.html


                             '''	   
                             @ @
+========================ooO-(_)-Ooo=================================+
|                                           PJ Naughter              |
|                                                                    |
| Software Developer                   Email: pjn@indigo.ie          |
| Softech Telecom                      Tel:   +353-1-2958384         |
|                                      Fax:   +353-1-2956290         |
| Author of DTime - A Collection       URL:   http://indigo.ie/~pjn  |
| of Date & Time classes for MFC                                     |
|                                                                    |
|                  Addr: 7 Woodford, Brewery Road, Stillorgan,       |
|                        Blackrock, Co. Dublin, Republic of Ireland  |
+====================================================================+




| Вернуться в корень Архива |