Click here to Skip to main content
16,006,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Bitmaps & pixels Pin
11-Oct-01 14:37
suss11-Oct-01 14:37 
QuestionHOWTO: Pass VB string into VC++ created ATL Object? Pin
Tim Rymer11-Oct-01 10:28
Tim Rymer11-Oct-01 10:28 
AnswerRe: HOWTO: Pass VB string into VC++ created ATL Object? Pin
Not Active11-Oct-01 11:52
mentorNot Active11-Oct-01 11:52 
GeneralRe: HOWTO: Pass VB string into VC++ created ATL Object? Pin
Tim Rymer12-Oct-01 3:47
Tim Rymer12-Oct-01 3:47 
GeneralWindows 2000 group model Pin
rachna11-Oct-01 10:11
rachna11-Oct-01 10:11 
GeneralIPropertySetStorage Pin
11-Oct-01 9:03
suss11-Oct-01 9:03 
GeneralConverting seconds to days:hours:minutes:seconds Pin
RobJones11-Oct-01 8:40
RobJones11-Oct-01 8:40 
GeneralRe: Converting seconds to days:hours:minutes:seconds Pin
Joaquín M López Muñoz11-Oct-01 8:59
Joaquín M López Muñoz11-Oct-01 8:59 
time_t defined in <time.h> is an integral type (usually long int) intended to store the number of seconds elapsed since 00:00, Jan 1, 1970 UTC. The function gmtime() accepts such a time_t value and returns a pointer to a tm struct whith that instant in time expressed as year, month, day and so forth. Assumming the number of seconds elapsed refer to that very moment in time (1970), your code should go along this line:
/* WARNING, this has not even been compiled */
int iTime;
CString strTime;

tm * ptm=gmtime(&((time_t)iTime));
strTime.Format("%d:%d:%d:%d",ptm->tm_yday,ptm->tm_hour,
                             ptm->tm_min,ptm->tm_sec);
The extension of this to the cases when the time elapsed is more than a year and when your zero time is not what gmtime() assumes I left you as an exercise Wink | ;)

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralCheck boxes and HtmlView Pin
Bret Faller11-Oct-01 8:22
Bret Faller11-Oct-01 8:22 
GeneralRe: Check boxes and HtmlView Pin
Not Active11-Oct-01 8:36
mentorNot Active11-Oct-01 8:36 
GeneralRe: Check boxes and HtmlView Pin
Bret Faller11-Oct-01 9:39
Bret Faller11-Oct-01 9:39 
GeneralRe: Check boxes and HtmlView Pin
JRP30-Oct-01 6:25
JRP30-Oct-01 6:25 
GeneralRe: Check boxes and HtmlView Pin
30-Oct-01 7:57
suss30-Oct-01 7:57 
GeneralFlexGrid again Pin
Ahmad11-Oct-01 7:53
Ahmad11-Oct-01 7:53 
GeneralRe: FlexGrid again Pin
Carlos Antollini11-Oct-01 8:10
Carlos Antollini11-Oct-01 8:10 
GeneralRe: FlexGrid again Pin
Carlos Antollini11-Oct-01 8:10
Carlos Antollini11-Oct-01 8:10 
GeneralTry and catch but there is debug Pin
Ahmad11-Oct-01 7:45
Ahmad11-Oct-01 7:45 
GeneralRe: Try and catch but there is debug Pin
Joaquín M López Muñoz11-Oct-01 7:58
Joaquín M López Muñoz11-Oct-01 7:58 
GeneralRe: Try and catch but there is debug Pin
Christian Graus11-Oct-01 12:06
protectorChristian Graus11-Oct-01 12:06 
GeneralPerformance Pin
11-Oct-01 6:52
suss11-Oct-01 6:52 
GeneralRe: Performance Pin
Carlos Antollini11-Oct-01 7:17
Carlos Antollini11-Oct-01 7:17 
GeneralRe: Performance Pin
sardinka11-Oct-01 9:18
sardinka11-Oct-01 9:18 
GeneralRe: Performance Pin
Carlos Antollini11-Oct-01 9:34
Carlos Antollini11-Oct-01 9:34 
GeneralRe: Performance Pin
sardinka11-Oct-01 10:11
sardinka11-Oct-01 10:11 
GeneralRe: Performance Pin
Carlos Antollini11-Oct-01 10:32
Carlos Antollini11-Oct-01 10:32 

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.