|
"_$h@nky_" wrote: i want to increase a date by one day,is it possible.
If yes please tell me .
Yes. Use a COleDateTimeSpan object.
"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
|
|
|
|
|
Here onle addition,subtraction or other rational operator are persent .
there is no increment type operator.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
"_$h@nky_" wrote: Here onle addition,subtraction or other rational operator are persent .
Which is all you need when operating on dates and times.
"_$h@nky_" wrote: there is no increment type operator.
Last time I checked, adding 1 is also known as incrementing.
"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
|
|
|
|
|
"_$h@nky_" wrote: there is no increment type operator.
"_$h@nky_" wrote: Here onle addition
"_$h@nky_" wrote: operator are persent
Do you mean increment is not addition
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: Do you mean increment is not addition
thx sir, plz, if they r same why 2 namez, plz?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Regards,
Sandip.
|
|
|
|
|
I guess David meant something like this:
COleDateTimeSpan dtSpan(1, 0, 0, 0);
dt += dtSpan;
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks Sir.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You may:
(1) use CDateTimeCtrl::GetTime method to initialize a COleDateTime object.
(2) use COleDateTime::+= operator to add a day, for instance
myDateTime += COleDateTimeSpan(1,0,0,0);
(3) pass the updated COleDateTime object to CDateTimeCtrl::SetTime method.
(4) cross you fingers.
[added]
I missed 'OleDate' on the Span temporary...
[/added]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
modified on Monday, October 20, 2008 9:11 AM
|
|
|
|
|
Hi,
why two snmp agent processes can not be run on same machine ?
rgds,
Sakthi
Nice things do nice works
|
|
|
|
|
|
Which part of developing this application do you need help with? How are you connecting to the DB?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
anna mathew wrote: on authentication i must get connected to access database...how do i do it?
One such way is via ODBC. Have you created a DSN? If so, just derive a class from CRecordset . You can also have a DSN-less connection.
"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 guys,
I hope my question will be peace of cake for you. Here it is:
CmyClass cl;
<br />
How to define it, so I can create it in a function Init() and destroy it in function FreeAll()?
If I declare it in a function it will be created and destroyed within it.
If I declare it as a global variable, it will create it in the declaration (wherever this take place in the program).
Well, I can use 'CmyClass *cl', but in the code I will have to use '->' instead of '.', which ... makes me angry.
Is there another approach?
|
|
|
|
|
Technically (AFAIK) you can't.
You may however use
- a wrapper of the class providing access to (something similar to lazy initialization or singleton patterns)
or
- use, whenever needed, a reference as alias to the dereferenced pointer to avoid pointer syntax.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
use, whenever needed, a reference as alias to the dereferenced pointer to avoid pointer syntax.
Could you give me an example?
Sorry I'm new in C++ but I'm learning very fast when I see a piece of code.
|
|
|
|
|
for instance, suppose your class having 2 methods DoSomething , JustDoAnotherThing :
CmyClass & myObj = *_pcl;
myObj.DoSomething();
myObj.JustDoAnotherThing()
...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thank you very much!!!
You saved my day, I really, really hate '->'.
|
|
|
|
|
wait, friend, wait: you're going to discover some interesting issues using references.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
oh, I think I already did ...
I tried (global variables):
CakRadioBox *prb = NULL;
CakRadioBox & rb;
well ... it doesn't work, it require initialization
I changed it to:
CakRadioBox *prb = NULL;
CakRadioBox & rb = *prb;
so far so good, but when in Init() I wrire:
prb = new CakRadioBox(10, 134, 44, 24);
rb = *prb
I receive exception
|
|
|
|
|
Hi,
I have a tree control and i want to know the index of the tree item selected.
Thanks In Advance.
Dhiraj
|
|
|
|
|
Use CTreeCtrl::GetSelectedItem() .
"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
|
|
|
|
|
I want to load a bitmap from the resource file it is like
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP);
m_staticBitmap.SetBitmap(bitmap);//m_staticBitmap control variable
but this is not working, bitmap is not getting displayed.
thanks in adv
|
|
|
|
|
Have your static box the SS_BITMAP style set?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All
How to get fixed hard drive name?There is any function for get fixed hard drive?Plz help me
|
|
|
|