Click here to Skip to main content
15,947,612 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MFC - Setting the custom color for the text selection in CRichEditCtrl Pin
Mark Salsbery14-Oct-08 3:59
Mark Salsbery14-Oct-08 3:59 
GeneralRe: MFC - Setting the custom color for the text selection in CRichEditCtrl Pin
led mike14-Oct-08 4:41
led mike14-Oct-08 4:41 
GeneralRe: MFC - Setting the custom color for the text selection in CRichEditCtrl Pin
Mark Salsbery14-Oct-08 5:33
Mark Salsbery14-Oct-08 5:33 
QuestionSetting minimum size of a dockable view? Pin
Redeye9213-Oct-08 23:11
Redeye9213-Oct-08 23:11 
QuestionHow to calculate a date one moth before from Current date? Pin
megha_gharote13-Oct-08 23:08
megha_gharote13-Oct-08 23:08 
AnswerRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian13-Oct-08 23:26
professionalRajesh R Subramanian13-Oct-08 23:26 
GeneralRe: How to calculate a date one moth before from Current date? Pin
megha_gharote13-Oct-08 23:30
megha_gharote13-Oct-08 23:30 
GeneralRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian13-Oct-08 23:42
professionalRajesh R Subramanian13-Oct-08 23:42 
Try this instead:
SYSTEMTIME varTime;
GetSystemTime(&varTime);
varTime.wMonth--;

After the third statement, the month would be decremented by one. Kinda obvious, but you asked for it.

Add: Oops! I haven't taken account of the year January. But I think that you must be able to do it yourself now. Shucks | :-\

Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche

.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]

GeneralRe: How to calculate a date one moth before from Current date? Pin
Nelek14-Oct-08 0:47
protectorNelek14-Oct-08 0:47 
GeneralRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian14-Oct-08 0:50
professionalRajesh R Subramanian14-Oct-08 0:50 
GeneralRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian14-Oct-08 0:58
professionalRajesh R Subramanian14-Oct-08 0:58 
AnswerRe: How to calculate a date one moth before from Current date? [fixed] Pin
CPallini13-Oct-08 23:37
mveCPallini13-Oct-08 23:37 
AnswerRe: How to calculate a date one moth before from Current date? Pin
enhzflep13-Oct-08 23:46
enhzflep13-Oct-08 23:46 
GeneralRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian13-Oct-08 23:49
professionalRajesh R Subramanian13-Oct-08 23:49 
GeneralRe: How to calculate a date one moth before from Current date? Pin
enhzflep13-Oct-08 23:57
enhzflep13-Oct-08 23:57 
GeneralRe: How to calculate a date one moth before from Current date? Pin
CPallini14-Oct-08 0:31
mveCPallini14-Oct-08 0:31 
GeneralRe: How to calculate a date one moth before from Current date? Pin
Rajesh R Subramanian14-Oct-08 0:39
professionalRajesh R Subramanian14-Oct-08 0:39 
AnswerRe: How to calculate a date one moth before from Current date? Pin
David Crow14-Oct-08 3:23
David Crow14-Oct-08 3:23 
QuestionSpeed problem in Excel sheet generation Pin
ilgale13-Oct-08 22:36
ilgale13-Oct-08 22:36 
AnswerRe: Speed problem in Excel sheet generation Pin
Roger Stoltz13-Oct-08 22:40
Roger Stoltz13-Oct-08 22:40 
GeneralRe: Speed problem in Excel sheet generation Pin
ilgale13-Oct-08 22:49
ilgale13-Oct-08 22:49 
GeneralRe: Speed problem in Excel sheet generation Pin
Rajesh R Subramanian13-Oct-08 23:16
professionalRajesh R Subramanian13-Oct-08 23:16 
GeneralRe: Speed problem in Excel sheet generation Pin
Roger Stoltz13-Oct-08 23:39
Roger Stoltz13-Oct-08 23:39 
JokeRe: Speed problem in Excel sheet generation Pin
CPallini13-Oct-08 22:47
mveCPallini13-Oct-08 22:47 
QuestionCompilation Error!!! undeclared variable :-( Pin
param_joshi13-Oct-08 22:10
param_joshi13-Oct-08 22:10 

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.