|
Thanks for suggestion.Can you give me tips for do that task?
|
|
|
|
|
I think this site is a good starting point (frequently recommended by Hamid):
http://www.cplusplus.com[^]
You should also consider getting some books.
|
|
|
|
|
What a mess. Are you trying to copy the folders every 10 seconds?
|
|
|
|
|
I agree with Michael Schubert: what you are doing is, at least, very strange.
But if you are sure you do need to periodically copy your folder(s), then call KillTimer before calling FolderCopy and then reset the timer ( call SetTimer) after FolderCopy returns.
|
|
|
|
|
Try:
void CAbc::FolderCopy()
{
if (! m_bBusy)
{
m_bBusy = true;
for (...)
{
}
m_bBusy = false;
}
}
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
After read artical i am useing this code.Can any one tell me i am wrong or right.
void CTestingDemoDlg::OnBnClickedButton1()
{
running = TRUE;
AfxBeginThread(sun, this);
AfxBeginThread(sun1, this);
}
void CTestingDemoDlg::sun()
{
OnStartTimer();
}
void CTestingDemoDlg::sun1()
{
AfxMessageBox(_T("Hello"));
}
UINT CTestingDemoDlg::sun(LPVOID p)
{
CTestingDemoDlg * me = (CTestingDemoDlg *)p;
me->sun();
return 0;
}
void CTestingDemoDlg::OnStop()
{
running = FALSE;
}
UINT CTestingDemoDlg::sun1(LPVOID p)
{
CTestingDemoDlg * me = (CTestingDemoDlg *)p;
me->sun1();
return 0;
}
void CTestingDemoDlg::OnTimer(UINT_PTR nIDEvent)
{
m_test.SetWindowTextW(_T("Sun"));
CDialog::OnTimer(nIDEvent);
}
void CTestingDemoDlg::OnStartTimer()
{
SetTimer(1, 5000, 0);
}
Plz help me
|
|
|
|
|
MsmVc wrote: Can any one tell me i am wrong or right.
What's wrong or right is ultimately up to you (since you are the only one that knows if your code produces the desired result). That said, what is your code (not) doing?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks for help.It's working
|
|
|
|
|
Hi all,
PLease tell me how can i get Total days of a Year.(wheter 365 or 366)
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If the year is a multiple of 4, it's a leap year, i.e. there are 366 days.
Exception #1:
If the year is dividable by 100 it's not a leap year.
Exception #2:
If the year is dividable by 400 it's a leap year anyway.
Hint: use the modulus operator.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Wow, I didn't know about exception #2, I always thought scientists decide after a few centuries whether this century year will be a leap year or not.
Thanks.
It's better to know some of the questions than all of the answers.
Pravin.
|
|
|
|
|
You could use COleDateTime() or COleDateTimeSpan()
|
|
|
|
|
|
bool isLeapYear(int year )
{
return year % 400 ? year % 100 ? year % 4 ? false : true : false : true;
}
There should be a forum for really cool code snippets like this! Nicely done Carlo!
|
|
|
|
|
Michael Schubert wrote: There should be a forum for really cool code snippets like this! Nicely done Carlo!
Quote Selected Text
No worries!! We have the magic site of carlo..
Regards,
Sandip.
|
|
|
|
|
|
On a serious note, I completely agree with you. We need a "Cool Code" forum.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Yes I agree with you
May be you can add a suggestion in the suggestion forum..
Regards,
Sandip.
|
|
|
|
|
|
Michael Schubert wrote: There should be a forum for really cool code snippets like this!
There is an entire website for this. Haven't you seen:
http://www.cpallini.freeproductz.com[^]
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
URLz iz givez me errorz. plz helpzz.. urgentzzzz!! wherez da codez???
|
|
|
|
|
How to scan or identify a physical damage (like scratch or spot) in a blank writable CD?
Thanks
|
|
|
|
|
NS17 wrote: How to identify a physical damage (like scratch or spot) in a blank writable CD?
You will need a small cotton ball, a mild liquid soap, clean water and a table lamp.
Add a few drops of the liquid soap in water, soak the cotton in the soapy solution and wipe the surface of the disc gently, rubbing the cotton back and forth against it in a rocking motion.
Switch on the table lamp and let the light lit the surface of the CD. You will be able to spot scratches and physical damages on it easily now.
BTW, this forum is for Visual C++ questions.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
bro your a comedian.
he wants to know how to check for physical damage when the cdrom is reading the cd.. software-wise i think
search for
damaged sectors checking source code
doubt u'll find any.. but there must be a way to check it. how do CDR programs know the CD is blank when you enter it.. oh thats easy.. check the size of the cd.. but when its already full.. I guess you have to check every byte.. written to CD and see if it is changed? if it is.. then return damaged.
|
|
|
|