Click here to Skip to main content
15,881,204 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to use MFC class's object in static mehtod of a class Pin
prasad_som18-Feb-07 20:13
prasad_som18-Feb-07 20:13 
Questionhow to know the staus of cyberoam client Pin
sudhir.marni18-Feb-07 19:21
sudhir.marni18-Feb-07 19:21 
QuestionI want to change key into gujarati font can anybody help? [modified] Pin
Ritesh_Promact18-Feb-07 18:33
Ritesh_Promact18-Feb-07 18:33 
QuestionCalculating Age in days Pin
Charles Covington18-Feb-07 14:50
Charles Covington18-Feb-07 14:50 
AnswerRe: Calculating Age in days Pin
Christian Graus18-Feb-07 15:18
protectorChristian Graus18-Feb-07 15:18 
AnswerRe: Calculating Age in days Pin
Waldermort18-Feb-07 15:37
Waldermort18-Feb-07 15:37 
AnswerRe: Calculating Age in days Pin
David Crow18-Feb-07 16:24
David Crow18-Feb-07 16:24 
AnswerRe: Calculating Age in days Pin
#realJSOP19-Feb-07 0:17
mve#realJSOP19-Feb-07 0:17 
If you were using MFC, this would be easy (and only 4 lines of code).

COleDateTime dtDOB(1,1,1960,0,0,0);
COleDateTime dtToday = COleDateTime::GetCurrentTime();
COleDateTimeSpan dtDiff = dtToday - dtDOB;
int nDays = dtDiff.GetDays();


This is typed from memory, so you may have to adjust some stuff, but you get the idea.

---------------------------------------------------------------------

If you absolutely cannot use MFC, look at this article here on CP:

http://www.codeproject.com/datetime/datetimedisc.asp[^]


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


AnswerRe: Calculating Age in days Pin
Charles Covington19-Feb-07 5:44
Charles Covington19-Feb-07 5:44 
AnswerRe: Calculating Age in days Pin
cmk20-Feb-07 8:02
cmk20-Feb-07 8:02 
QuestionBetter HEX to INT conversion Pin
Llasus18-Feb-07 14:33
Llasus18-Feb-07 14:33 
AnswerRe: Better HEX to INT conversion Pin
Chris Losinger18-Feb-07 15:26
professionalChris Losinger18-Feb-07 15:26 
GeneralRe: Better HEX to INT conversion Pin
Llasus18-Feb-07 15:56
Llasus18-Feb-07 15:56 
QuestionWallpaper changer in MFC Pin
kubapl1818-Feb-07 9:07
kubapl1818-Feb-07 9:07 
AnswerRe: Wallpaper changer in MFC Pin
Mark Salsbery18-Feb-07 10:01
Mark Salsbery18-Feb-07 10:01 
AnswerRe: Wallpaper changer in MFC Pin
Rick York18-Feb-07 11:32
mveRick York18-Feb-07 11:32 
QuestionProblem with SetRect Pin
CoffeeAddict1918-Feb-07 8:45
CoffeeAddict1918-Feb-07 8:45 
AnswerRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 8:58
Mark Salsbery18-Feb-07 8:58 
GeneralRe: Problem with SetRect Pin
CoffeeAddict1918-Feb-07 9:11
CoffeeAddict1918-Feb-07 9:11 
GeneralRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 9:22
Mark Salsbery18-Feb-07 9:22 
GeneralRe: Problem with SetRect Pin
CoffeeAddict1918-Feb-07 9:38
CoffeeAddict1918-Feb-07 9:38 
GeneralRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 9:44
Mark Salsbery18-Feb-07 9:44 
QuestionVirtual Midi Output Port... Pin
aquawicket18-Feb-07 3:54
aquawicket18-Feb-07 3:54 
GeneralVC++ linker error Pin
Member 384040618-Feb-07 3:42
Member 384040618-Feb-07 3:42 
GeneralRe: VC++ linker error Pin
Waldermort18-Feb-07 3:47
Waldermort18-Feb-07 3:47 

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.