Click here to Skip to main content
15,921,941 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting key presses from MFC Pin
Anonymous6-Jan-04 7:10
Anonymous6-Jan-04 7:10 
GeneralHelp in MDI / VC++ needed Pin
Ruchit Sharma5-Jan-04 23:27
Ruchit Sharma5-Jan-04 23:27 
GeneralRe: Help in MDI / VC++ needed Pin
2249176-Jan-04 1:50
2249176-Jan-04 1:50 
GeneralCFont class Pin
TolTol5-Jan-04 23:26
TolTol5-Jan-04 23:26 
GeneralRe: CFont class Pin
Monty26-Jan-04 1:11
Monty26-Jan-04 1:11 
GeneralRe: CFont class Pin
TolTol6-Jan-04 4:02
TolTol6-Jan-04 4:02 
GeneralProgress control using GDI+ Pin
Steve Messer5-Jan-04 21:31
Steve Messer5-Jan-04 21:31 
Generalaquiring the size of a dialog resource Pin
luddet5-Jan-04 18:59
luddet5-Jan-04 18:59 
GeneralRe: aquiring the size of a dialog resource Pin
abc8765-Jan-04 20:30
abc8765-Jan-04 20:30 
GeneralRe: aquiring the size of a dialog resource Pin
Monty25-Jan-04 20:50
Monty25-Jan-04 20:50 
GeneralRe: aquiring the size of a dialog resource Pin
luddet6-Jan-04 6:32
luddet6-Jan-04 6:32 
GeneralSMS through my app Pin
parths5-Jan-04 17:56
parths5-Jan-04 17:56 
GeneralRe: SMS through my app Pin
misha_grewal5-Jan-04 21:14
misha_grewal5-Jan-04 21:14 
GeneralRe: SMS through my app Pin
parths5-Jan-04 21:28
parths5-Jan-04 21:28 
QuestionHow do I get my IP address when I am on line? Pin
Anonymous5-Jan-04 16:52
Anonymous5-Jan-04 16:52 
AnswerRe: How do I get my IP address when I am on line? Pin
Roger Wright5-Jan-04 17:47
professionalRoger Wright5-Jan-04 17:47 
AnswerRe: How do I get my IP address when I am on line? Pin
kvenkat5-Jan-04 18:21
kvenkat5-Jan-04 18:21 
GeneralTask Bar Icons Pin
User 5838525-Jan-04 16:50
User 5838525-Jan-04 16:50 
GeneralRe: Task Bar Icons Pin
Monty25-Jan-04 21:57
Monty25-Jan-04 21:57 
GeneralLittle Help please Pin
ViTToRi05-Jan-04 15:45
ViTToRi05-Jan-04 15:45 
GeneralRe: Little Help please Pin
Christian Graus5-Jan-04 16:08
protectorChristian Graus5-Jan-04 16:08 
You want to put the time that the update happened ? This from the MSDN


#include <stdio.h>
#include <string.h>
#include <time.h>

void main( void )
{
struct tm *newtime;
char am_pm[] = "AM";
__time64_t long_time;

_time64( &long_time ); /* Get time as long integer. */
newtime = _localtime64( &long_time ); /* Convert to local time. */

if( newtime->tm_hour > 12 ) /* Set up extension. */
strcpy( am_pm, "PM" );
if( newtime->tm_hour > 12 ) /* Convert from 24-hour */
newtime->tm_hour -= 12; /* to 12-hour clock. */
if( newtime->tm_hour == 0 ) /*Set hour to 12 if midnight. */
newtime->tm_hour = 12;

printf( "%.19s %s\n", asctime( newtime ), am_pm );
}


Output
Fri Jan 22 10:03:48 AM


I don't recall if it's ctime or time, but you should not include time.h as it is deprecated. This will mean that the methods you want will be in namespace std.

Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
QuestionHow to enumerate all the files in a directory? Pin
George25-Jan-04 15:12
George25-Jan-04 15:12 
AnswerRe: How to enumerate all the files in a directory? Pin
Prakash Nadar5-Jan-04 16:02
Prakash Nadar5-Jan-04 16:02 
GeneralRe: How to enumerate all the files in a directory? Pin
George25-Jan-04 17:30
George25-Jan-04 17:30 
QuestionHow to use! Pin
skylonely5-Jan-04 15:04
skylonely5-Jan-04 15:04 

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.