Click here to Skip to main content
15,888,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Parameter to hide textbox/label at runtime through SendMessage() [modified] Pin
Code-o-mat1-Dec-09 8:22
Code-o-mat1-Dec-09 8:22 
GeneralRe: Parameter to hide textbox/label at runtime through SendMessage() Pin
Supriya Tonape1-Dec-09 20:13
Supriya Tonape1-Dec-09 20:13 
GeneralRe: Parameter to hide textbox/label at runtime through SendMessage() Pin
Code-o-mat1-Dec-09 20:30
Code-o-mat1-Dec-09 20:30 
GeneralRe: Parameter to hide textbox/label at runtime through SendMessage() Pin
Richard MacCutchan1-Dec-09 21:37
mveRichard MacCutchan1-Dec-09 21:37 
GeneralRe: Parameter to hide textbox/label at runtime through SendMessage() Pin
Supriya Tonape2-Dec-09 22:43
Supriya Tonape2-Dec-09 22:43 
QuestionProgrammatically deleting old files with a C program Pin
ChemmieBro1-Dec-09 3:46
ChemmieBro1-Dec-09 3:46 
QuestionRe: Programmatically deleting old files with a C program Pin
David Crow1-Dec-09 3:51
David Crow1-Dec-09 3:51 
AnswerRe: Programmatically deleting old files with a C program Pin
loyal ginger1-Dec-09 6:28
loyal ginger1-Dec-09 6:28 
Your program has to check all the log files to find which 20 files are the latest. Then the program can delete all the old ones.

The program can get file times using CFileFind::GetLastWriteTime() (if you are using MFC). You said the filenames contain the time also. In that case you can also parse the filenames to get the times.

You can load the file times (together with the pathnames) into an array and sort them to find out the files that should be deleted. Sorting can be done easily by STL utilities.

Seems to be a hassle, but it's done by your program. The only hassle to you will be to write this program, just once. By using MFC and STL to implement this, it's not a big deal at all.

Good luck!
GeneralRe: Programmatically deleting old files with a C program Pin
ChemmieBro1-Dec-09 6:55
ChemmieBro1-Dec-09 6:55 
AnswerRe: Programmatically deleting old files with a C program Pin
Patcher321-Dec-09 17:53
Patcher321-Dec-09 17:53 
GeneralRe: Programmatically deleting old files with a C program Pin
vasu_sri2-Dec-09 0:33
vasu_sri2-Dec-09 0:33 
Questionproblem in hyphen character in string search in SQL server Pin
hvgyufg28fh38tyr78hf1-Dec-09 1:54
hvgyufg28fh38tyr78hf1-Dec-09 1:54 
AnswerRe: problem in hyphen character in string search in SQL server Pin
Richard MacCutchan1-Dec-09 2:06
mveRichard MacCutchan1-Dec-09 2:06 
GeneralRe: problem in hyphen character in string search in SQL server Pin
hvgyufg28fh38tyr78hf1-Dec-09 2:31
hvgyufg28fh38tyr78hf1-Dec-09 2:31 
AnswerRe: problem in hyphen character in string search in SQL server Pin
CPallini1-Dec-09 3:28
mveCPallini1-Dec-09 3:28 
Questionconsole application AND ActiveX Pin
zon_cpp30-Nov-09 23:45
zon_cpp30-Nov-09 23:45 
AnswerRe: console application AND ActiveX Pin
Richard MacCutchan1-Dec-09 2:10
mveRichard MacCutchan1-Dec-09 2:10 
GeneralRe: console application AND ActiveX Pin
zon_cpp1-Dec-09 18:39
zon_cpp1-Dec-09 18:39 
GeneralRe: console application AND ActiveX Pin
Richard MacCutchan1-Dec-09 21:21
mveRichard MacCutchan1-Dec-09 21:21 
QuestionHow to convert a XML to string Pin
mailgirish99@yahoo.com30-Nov-09 22:51
mailgirish99@yahoo.com30-Nov-09 22:51 
AnswerRe: How to convert a XML to string Pin
Cedric Moonen30-Nov-09 22:59
Cedric Moonen30-Nov-09 22:59 
GeneralRe: How to convert a XML to string Pin
mailgirish99@yahoo.com30-Nov-09 23:05
mailgirish99@yahoo.com30-Nov-09 23:05 
GeneralRe: How to convert a XML to string Pin
Richard MacCutchan1-Dec-09 0:06
mveRichard MacCutchan1-Dec-09 0:06 
AnswerRe: How to convert a XML to string Pin
Maximilien1-Dec-09 2:47
Maximilien1-Dec-09 2:47 
Questionproblem in printing factorial............. Pin
chaudhari.hemant130-Nov-09 21:48
chaudhari.hemant130-Nov-09 21:48 

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.