Click here to Skip to main content
16,005,169 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Makeing changes to static text background color and text color?? Pin
Bryan Tyson24-Aug-01 22:13
Bryan Tyson24-Aug-01 22:13 
GeneralRe: Makeing changes to static text background color and text color?? Pin
Michael Dunn24-Aug-01 22:16
sitebuilderMichael Dunn24-Aug-01 22:16 
GeneralComposite Control Pin
KingsGambit24-Aug-01 20:53
KingsGambit24-Aug-01 20:53 
Generalregarding flexgrid and mfc dialog based Pin
Cnoob24-Aug-01 18:23
Cnoob24-Aug-01 18:23 
GeneralSimple Toolbar Question. Pin
Mike Doner24-Aug-01 17:33
Mike Doner24-Aug-01 17:33 
GeneralRe: Simple Toolbar Question. Pin
Ben Burnett24-Aug-01 18:00
Ben Burnett24-Aug-01 18:00 
QuestionConvert FILETIME to DATE for ADO ? Pin
Christian Graus24-Aug-01 16:35
protectorChristian Graus24-Aug-01 16:35 
AnswerRe: Convert FILETIME to DATE for ADO ? Pin
Ben Burnett24-Aug-01 16:48
Ben Burnett24-Aug-01 16:48 
You could rip the conversion function off from the MFC sources, its located in "olevar.cpp" : line # 1568 ().

It takes the form;
_AfxOleDateFromTm ( WORD wYear, WORD wMonth, WORD wDay,
   WORD wHour, WORD wMinute, WORD wSecond, DATE & dtDest )

>>> [Update]
You'll also have to use FileTimeToLocalFileTime() and FileTimeToSystemTime() to get a usable date structure ( namely SYSTEMTIME ).

FILETIME fileTime; <br />
<br />
// first convert file time (UTC time) to local time<br />
FILETIME localTime;<br />
FileTimeToLocalFileTime ( &fileTime, &localTime );<br />
<br />
// then convert that time to system time<br />
SYSTEMTIME sysTime;<br />
FileTimeToSystemTime ( &localTime, &sysTime );<br />
<br />
// finaly, convert the system time to DATE type<br />
DATE theDate;<br />
_AfxOleDateFromTm ( stCreate.wYear, stCreate.wMonth, stCreate.wDay,<br />
        stCreate.wHour, stCreate.wMinute, stCreate.wSecond, theDate );

<<< [Update]

Hope this helps.

Have a good one,
Ben Burnett

---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic" Wink | ;)
AnswerRe: Convert FILETIME to DATE for ADO ? Pin
Carlos Antollini24-Aug-01 16:55
Carlos Antollini24-Aug-01 16:55 
GeneralADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 16:32
protectorChristian Graus24-Aug-01 16:32 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Carlos Antollini24-Aug-01 16:49
Carlos Antollini24-Aug-01 16:49 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 17:03
protectorChristian Graus24-Aug-01 17:03 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Carlos Antollini24-Aug-01 17:11
Carlos Antollini24-Aug-01 17:11 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 17:27
protectorChristian Graus24-Aug-01 17:27 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 20:05
protectorChristian Graus24-Aug-01 20:05 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Carlos Antollini25-Aug-01 5:05
Carlos Antollini25-Aug-01 5:05 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Ben Burnett24-Aug-01 17:39
Ben Burnett24-Aug-01 17:39 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 17:51
protectorChristian Graus24-Aug-01 17:51 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Ben Burnett24-Aug-01 18:15
Ben Burnett24-Aug-01 18:15 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 18:21
protectorChristian Graus24-Aug-01 18:21 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Michael Dunn24-Aug-01 18:20
sitebuilderMichael Dunn24-Aug-01 18:20 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 18:26
protectorChristian Graus24-Aug-01 18:26 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Ben Burnett24-Aug-01 18:38
Ben Burnett24-Aug-01 18:38 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Christian Graus24-Aug-01 20:03
protectorChristian Graus24-Aug-01 20:03 
GeneralRe: ADO/ATL problems - my life is hell. Pin
Tim Deveaux25-Aug-01 14:54
Tim Deveaux25-Aug-01 14:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.