|
|
do you have any other error before this one ?
moreover, what compiler do you use exactly ?
|
|
|
|
|
|
then, as CPallini suggested, haven't youremoved a #include <windows.h> directive in your stdafx.h header ?
|
|
|
|
|
|
Your test code compiles fine on my system (VS 2003).
Have you involuntarily modified any standard header file?
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.
|
|
|
|
|
No....
I have no idea whats going on ...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Try to send me (cpallini@tiscalinet.it) your headers...
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.
|
|
|
|
|
Thanks Pallini,
I'm just busy with the VS2005 repair wizard. So I'll test it again, and let you know whether I got it working or not.
Thank you very much.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Email has been sent.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
toxcct wrote: what compiler do you use exactly ?
Visual Studio 2005 Professional Edition.
But I'm going to try a repair installation, maybe it will work.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
In fact winuser.h contains protoypes of functions using LPSECURITY_ATTRIBUTES as parameter, hence it as to be defined.
Maybe you're including (either directly or indirectly) winuser.h without prior to including windows.h .
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.
|
|
|
|
|
|
So, after a uninstall - install everything seems to be working again ....
Sometimes I hate computers ...
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Hi All
I am customizing ToolTip control for single document application. I want to show ToolTip control whenever user move mouse over Icons on ToolBar,so for this I want to know Handle of Each icons on ToolBar.
So if anybody have some hint to get handle of icons on ToolBar then plz forward me.
Thanks in Advance
Atul
|
|
|
|
|
Hi,
I have to port a few (old) applications written in C++ with VS6 and MFC to VS2005 under Vista.
Have anybody done that already?
Is it just rebuilding everything without any problems? What can I expect?
Are there any advantages with VS2005 compared to VS6?
Thanks
|
|
|
|
|
VC6 is a terrible C++ implimentation, there are many improvements which could cause problems with your code, depending on how standards complaint it is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Terrible it is. Unfortunately I still have to use it at work
Steve
|
|
|
|
|
This is Christian's standard response when a discussion of VC6 vs VS2005 is concerned. I'm pretty sure he's bound a macro to a key so he doesn't actually have to type it out every time - he hits one key and it automatically fills in the text for him. (I'm sure he's concerned that he wasn't able to create the macro with VS2005, though.)
A good programmer knows about the limitations of his tools and takes precautions against poor coding practices when using said tools. Christian is a good programmer, but he's a little hung up on this VC6 thing.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Rene D wrote: Are there any advantages with VS2005 compared to VS6?
sure... compiler standard compliance ^^
|
|
|
|
|
There is a service pack available, and the comments below concerning COledateTime are no longer completely correct, but there are issues that we encountered that everyone should be aware of.
If you use any CRT functions, be prepared to see dozens - if not hundreds or thousands - of warnings regarding deprecated code. The easy fix is to add a compiler definition (_CRT_SECURE_NO_DEPRECATE) to your project settings, and that will address almost all of those. The hard fix is to actually replace all of those deprecated function calls to the secure versions. This will take a lot longer than a simple compiler directive.
VS2005 also flags other things that VC6 ignores, such as const definitions that don't have a specified type. VC65 defaulted such items to int , but VS2005 throws up a warning about it.
Another bugaboo is handling of for loops. The loop control variable is scoped more tightly (and according to the ANSII standard) so that you are required to re-declare the variable for each for loop. So, this:
for (int i = 0; i < 5; i++)
{
}
for (i = 0; i < 5; i++)
{
}
will generate and compile error. You need to do it this way:
for (int i = 0; i < 5; i++)
{
}
for (int i = 0; i < 5; i++)
{
}
or this way:
int i;
for (i = 0; i < 5; i++)
{
}
for (i = 0; i < 5; i++)
{
}
There are MANY changes to MFC. The most damaging involves COleDateTime. It seems MS decided that a m_dt value of 0.0 (12/31/1899) is now COleDateTime::invalid, despite the fact that COleDateTime supports dates all the way back to 12/31/100 (generates a negative value for m_dt). What a pain in the ass.
There are also many deprecated functions, and the compiler doesn't like some ported message handling code due to its more strict type compliance.
The IDE is NOT friendly to unmanaged C++/MFC programmers. In a word, it SUCKS.
In closing, I think the compiler helps you to fix things in your code that would never have been found with VC6. There are now "secure" versions of most of the CRT string-related functions that help to prevent buffer overflows. I think it's a good idea to port to VS2005 because you should always use the latest tools when developing apps. Make double-damn sure you regression test EVERYTHING, *especially* if it involves date handling, and before porting, install the service pack so you only have to deal with date problems one time.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
John Simmons / outlaw programmer wrote: There are MANY changes to MFC. The most damaging involves COleDateTime. It seems MS decided that a m_dt value of 0.0 (12/31/1899) is now COleDateTime::invalid, despite the fact that COleDateTime supports dates all the way back to 12/31/100 (generates a negative value for m_dt). What a pain in the ass.
This has been fixed.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
As noted at the very top of my original post.
BTW, directly setting the member variables in COleDateTime can really hose up your code. Unfortunately, the guy that wrote our code didn't realize it, so now we have dates that have a valid m_dt value, but the status is sometimes null, or invalid. This will throw asserts in the COleDateTime class every time you try to use a date that is null or invalid (because instead of setting/getting the value through the accessor functions, he checked the value of m_dt to indicate validity. I'm in the process of evaluating each date reference in a 300,000 line project (and there's a LOT of date references) because of this issue.
This is my hell.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: This is my hell.
Still there. huh?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|