|
thanx
allways i got the following message:
(Debug Assertion failed!
program : file.exe
timecor.cpp
line:40)
this file (timecore.cpp)is done with vc6
Best Regards
|
|
|
|
|
So, what's on line 40 of timecor.cpp?
|
|
|
|
|
ASSERT(m_time != -1); // indicates an illegal input time
Best Regards
|
|
|
|
|
Hi,
Your problem is that the MFC CTime class actually uses the mktime() call internally. If you look at the definition of mktime() you'll see that it uses a time_t, which is a floating point value representing the number of seconds since, you guessed it, Jan 1 1970. The problem here is the fact that you're mapping your control to a CTime value. Open the ClassWizard and delete the mapped variable. Add it again, but make sure you select COleDateTime from the Variable Type combo. This should give you a much larger range of values.
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
thanx
it is working now, does it work with date field of a access db?
Best Regards
|
|
|
|
|
Well, assuming that you're using some COM-based technology to access your Access DB (and I would imagine it'd be pretty tough otherwise!) then COleDateTime can easily be converted to a VARIANT of VT_DATE type using COleVariant. This will be exactly the format that Access's automation interface will be expecting.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hi CP adepts,
By using WriteProfileXXX() you can easily save some settings of your app
to the registry OR an INI file.
But if I choose for an INI file it is always created in the %windows% directory.
I'd like to keep it in the same directory as my app.
How can I become such a behaviour?
(without having to move it around myself of course)
Thanks.
|
|
|
|
|
You can use WritePrivateProfileXXX() which allows you to specify the path to the INI file.
|
|
|
|
|
Knew it must be possible.
Thanks.
P.S.: MS doesn't seem to promote the use of it.
"This function is provided only for compatibility with 16-bit versions of Windows."
|
|
|
|
|
Hi !
I want to build a c++ program that can interact with some sort of database! I'm not sure which database engine should i use. It's only a small program. Could anyone give me a hint of how to do it or refer some readings to me??
Thanks in advance
Cheers
|
|
|
|
|
Access is okay for small database applications that doesn't require a lot of users to access it at the same time.
MSDE is also very good for small standalone systems.
ADO is (in my view) the best way to access both of these databases via C++
Michael
|
|
|
|
|
Hi Micheal
Thank you for your response. I just wonder if you know any good tutorial that demonstrate accessing database by C++.
Cheers
|
|
|
|
|
a Multi select tree control that must be fast!
more easy more good!
thanks!
ZHANGYIFEI
|
|
|
|
|
Have a look on this site, I'm sure there's a class that already implements a fast multi select tree ctrl.
Normski. - Professional Windows Programmer
|
|
|
|
|
i have a problem when i'm capturing the whole Client area of a CVIEW... When I'm capturing the client area of CView in a bitmap, the borders and scrollbars are captured too....??
|
|
|
|
|
Hi, I have to used _outp() function to write a byte to an port
address. but program gives error (below) when program runs.
"unknown software exception (0xc0000096) özel durum, 0x00401097
konumundaki uygulamada oluştu."
what can be the problem?
karanba
|
|
|
|
|
Which port are you writing to? Also, could you please translate the error message to English?
If you're in NT/2000/XP, _outp will almost for sure fail, because programs in these OSs are prevented to access HW directly in most cases. In 95/98/ME, you have fewer restrictions of this kind, and some _outp IO is possible.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
what is the best docking toolbar thing available for free? the only articles here on CodeProject and on CodeGuru are inefficient and the toolbars end up looking pretty bad... anyone have any other good ideas? (preferably free)
- Roman -
|
|
|
|
|
What do you want it to do ? MFC has docking toolbars.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
basically, the docking toolbars MFC provides don't look anything like VC++6's own docking toolbars... they're not 3D and only have 1 gripper line
the problem with the ones on CodeProject is that they all have several bugs and they just don't look right in certain cases.
BCGSoft and CodeJock and Dundas all cost way too much (too many other classes in the packages they offer)
anyway, yea im being a pain in the ass but i can't get my own toolbars (extensions of CToolBar) to look right either
- Roman -
|
|
|
|
|
You would do better to copy the CToolbar code from the MFC source and then rename it, and work from there. Then you've got a head start, and you're doing it the right way, deriving from CControlBar to make a new toolbar, instead of starting with CToolbar and trying to bend it to your will.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
|
Sorry, I'm saying deriving from CControlBar ( from memory, if not, whatever CToolbar derives from ), and that this is a LOT of work, but you can get a head start by starting with the CToolbar source, and deleting/changing it to suit yourself.
It's still probably a fair size task, if you undertake it, you would probably be somebodies hero if you went on to post it here.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
I want a multi select tree control that fast ,More easy More
good!
ZHANGYIFEI
|
|
|
|
|
You can download it from http://www.techsoft.no/bendik/TreeCtrlEx.zip.
I'm a pleased user.
Geert.
|
|
|
|