I decided to post this as a new solution, so it would be easier to find if anyone looks.
By looking at your error messages, the first this is _WIN32_WINNT not defined. In this case VS2010 will use the latest definition, which (IIRC) means it will use Windows 7 items, and therefore might not run on XP. To resolve this go to the solution explorer and right click on the solution name and select "Properties". Under the "Configuration Properties/C/C++ tab, select Preprocessor. In the right box you'll see Preprocessor Definitions that will look something like
WIN32;_DEBUG;_WINDOWS;(PreprocessorDefinitions)
Change it to add WINVER=0x0501. It should now look like
WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;%(PreprocessorDefinitions)
This allows it to use XP features, which will also work on Windows 7.
Next, you have a warning about CDaoDatabase being deprecated - this is true, it's no longer supported on Windows 7, but if you install the MDAC redistributable, it will still work. Eventually this should be changed to stop using DAO and start using ADO or some other database technology.
The next batch of warnings are the pow function. You probably have something like
float x;
x = pow(2, 12);
in your code. I this case, you're passing two ints to the pow function, but the pow funtion does not have a signature that accepts two ints (see
MSDN[
^]), so the ints need to be promoted to something else. For instance, the first argument could be promoted to a float or a double, but the compiler doesn't know which one - so you need to tell it by casting:
x = pow((double)2, 12);
Next, there are several warnings about "unsafe" functions. These are typically functions that tend to cause buffer overflow errors, so Microsoft provides a "safe" replacement... such as:
instead of fopen, use fopen_s
instead of strcpy, use strcpy_s
and so on. You can find the documentation for these also on MSDN>
The older functions (fopen, strcpy) will still work, you'll just receive these warnings. If you don't want the warnings (and I don't like any warnings) you can (as mentioned in the warning message) define _CRT_SECURE_NO_WARNINGS in the preprocessor definitions (where we added the WINVER earlier). So your Preprocessor definitions might look like:
WIN32;_DEBUG;_WINDOWS;WINVER=0x0501;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
The warning about conversion from double to int is most likely from code such as
double dVal = 2.5;
int iMyVal = dVal;
And last (of the messages you posted) the warning about signed/unsigned mismatch means you're comparing a signed value to an unsigned value, such as:
unsigned long ul_Val1 = 25499;
ing iOtherVal = 2944;
if (ul_Val1 < iOtherVal)...
When you correct these items, you'll probably see the number of errors/warning drop drastically.
Hope that helps.
[NEW STUFF HERE]
OK... now that you're down to 7 problems, they should be relatively easy. The first (5 problems) give the soltuion in the error message
1>ScanAcq.cpp(2336): error C3867: 'CDlg_ScanAcq::InitScan': function call missing argument list; use '&CDlg_ScanAcq::InitScan' to create a pointer to member
As it says, you need to use the & to create a pointer to this function. This should solve those 5 problems.
ScanFunction = &CDlg_ScanAcq::InitScan;
ScanFunction = &CDlg_ScanAcq::InitLineScan;
ScanFunction = &CDlg_ScanAcq::InitPointSpecScan;
ScanFunction = &CDlg_ScanAcq::InitMultiGapScan;
ScanFunction = &CDlg_ScanAcq::InitCITSScan;
The final two errors
1>graph\sizecbar.cpp(109): error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CSizingControlBar::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)'
1> Cast from base to derived requires dynamic_cast or static_cast
1>graph\sizecbar.cpp(593): error C2065: 'i' : undeclared identifier
are also relatively easy. The first of this says basically that it can't convert from UINT.... to LRESULT... which means that you have a function (the NCHITTEST) that returns a UINT and needs to return an LRESULT. Look for your OnNcHitTest or whatever it's name really is in both the .cpp and .h files and change the return type from UINT to LRESULT - Microsoft changed the return type on several of the framework methods.
The final error about i being undeclared identifier can be caused by something like this:
for (int i=0; i< 1000; i++)
{
}
if (i == 1000)
This was OK in prior versions of VS, but is now properly scoped. To solve it, move the declaration of i ouside the loop:
int i = 0;
for (i=0; i< 1000; i++)
{
}
if (i == 1000)
Hope this resolves your issues - but you still must test throroughly - just because it all compiles and links doesn't mean it will work correctly.
Good luck.