Click here to Skip to main content
15,887,242 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to change day with button click. Pin
Rajesh R Subramanian10-Mar-08 23:23
professionalRajesh R Subramanian10-Mar-08 23:23 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan10-Mar-08 23:24
Ashish Chauhan10-Mar-08 23:24 
QuestionRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 0:09
professionalRajesh R Subramanian11-Mar-08 0:09 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan11-Mar-08 1:38
Ashish Chauhan11-Mar-08 1:38 
GeneralRe: How to change day with button click. [modified] Pin
Ashish Chauhan11-Mar-08 2:38
Ashish Chauhan11-Mar-08 2:38 
AnswerRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 9:57
professionalRajesh R Subramanian11-Mar-08 9:57 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan11-Mar-08 21:09
Ashish Chauhan11-Mar-08 21:09 
AnswerRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 21:55
professionalRajesh R Subramanian11-Mar-08 21:55 
To manipulate time as a long integer, we need to convert it to FILETIME. ULARGE_INTEGER[^] is an union, defined in Winnt.h. This data structure can store a 64 bit unsigned integer. This data structure has a Low part (the low order 32 bits) and a High part (the high order 32 bits), whereas the Quadpart will be the unsigned 64 bit integer itself. I take up the high and low order bits from the SYSTEMTIME variable passed on to this function and assign it to the ULARGE_INTEGER variable. And then I calculate the no. of nano seconds in a day (24 hours, 60 minutes, 60 seconds, 1000 milliseconds, 10000 nanoseconds). Then, I add it up to the Quadpart of the ULARGE_INTEGER variable, nenoSeconds. This way, we've incremented one day of the week. Assign it back to SYSTEMTIME variable, and convert it back to SYSTEMTIME from FILETIME. Look at the code simultaneously and you will understand it.

Original idea - Credits to Rehan Nadeem[^]
MSDN - FILETIME[^]


Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP

GeneralRe: How to change day with button click. Pin
Ashish Chauhan11-Mar-08 22:43
Ashish Chauhan11-Mar-08 22:43 
GeneralRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 23:21
professionalRajesh R Subramanian11-Mar-08 23:21 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan11-Mar-08 23:30
Ashish Chauhan11-Mar-08 23:30 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan11-Mar-08 23:33
Ashish Chauhan11-Mar-08 23:33 
GeneralRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 23:41
professionalRajesh R Subramanian11-Mar-08 23:41 
AnswerRe: How to change day with button click. Pin
Rajesh R Subramanian12-Mar-08 0:05
professionalRajesh R Subramanian12-Mar-08 0:05 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan12-Mar-08 0:58
Ashish Chauhan12-Mar-08 0:58 
GeneralRe: How to change day with button click. Pin
Rajesh R Subramanian11-Mar-08 4:31
professionalRajesh R Subramanian11-Mar-08 4:31 
QuestionQuestion about how to kill thread that i create with _beginthreadex ? Pin
Yanshof10-Mar-08 20:35
Yanshof10-Mar-08 20:35 
AnswerRe: Question about how to kill thread that i create with _beginthreadex ? Pin
Maxwell Chen10-Mar-08 20:40
Maxwell Chen10-Mar-08 20:40 
AnswerRe: Question about how to kill thread that i create with _beginthreadex ? Pin
Peter Weyzen10-Mar-08 20:41
Peter Weyzen10-Mar-08 20:41 
GeneralRe: Question about how to kill thread that i create with _beginthreadex ? [modified] Pin
Yanshof10-Mar-08 21:15
Yanshof10-Mar-08 21:15 
GeneralRe: Question about how to kill thread that i create with _beginthreadex ? Pin
Cedric Moonen10-Mar-08 21:33
Cedric Moonen10-Mar-08 21:33 
GeneralRe: Question about how to kill thread that i create with _beginthreadex ? Pin
Yanshof10-Mar-08 21:39
Yanshof10-Mar-08 21:39 
GeneralRe: Question about how to kill thread that i create with _beginthreadex ? Pin
Peter Weyzen10-Mar-08 21:54
Peter Weyzen10-Mar-08 21:54 
QuestionHow virtual destructor works under the hood? Pin
abhijitr10-Mar-08 19:41
abhijitr10-Mar-08 19:41 
AnswerRe: How virtual destructor works under the hood? Pin
Peter Weyzen10-Mar-08 19:47
Peter Weyzen10-Mar-08 19: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.