Click here to Skip to main content
15,909,373 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: hai Pin
Cedric Moonen10-Mar-08 22:03
Cedric Moonen10-Mar-08 22:03 
GeneralRe: hai Pin
Rajkumar R10-Mar-08 23:41
Rajkumar R10-Mar-08 23:41 
GeneralRe: hai Pin
Rajesh R Subramanian11-Mar-08 0:26
professionalRajesh R Subramanian11-Mar-08 0:26 
GeneralRe: hai Pin
Rajkumar R11-Mar-08 1:51
Rajkumar R11-Mar-08 1:51 
GeneralRe: hai Pin
Hamid_RT10-Mar-08 22:34
Hamid_RT10-Mar-08 22:34 
GeneralRe: hai Pin
CPallini10-Mar-08 22:35
mveCPallini10-Mar-08 22:35 
QuestionHow to change day with button click. Pin
Ashish Chauhan10-Mar-08 20:56
Ashish Chauhan10-Mar-08 20:56 
AnswerRe: How to change day with button click. Pin
Rajesh R Subramanian10-Mar-08 22:53
professionalRajesh R Subramanian10-Mar-08 22:53 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan10-Mar-08 22:55
Ashish Chauhan10-Mar-08 22:55 
QuestionRe: How to change day with button click. Pin
Rajesh R Subramanian10-Mar-08 22:58
professionalRajesh R Subramanian10-Mar-08 22:58 
GeneralRe: How to change day with button click. Pin
Ashish Chauhan10-Mar-08 23:09
Ashish Chauhan10-Mar-08 23:09 
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 

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.