(I'm using Microsoft Visual C++ .NET BETA)
I have an object, when it's constructed I want it to check if the right data is copied in the clipboard and then put into an array of chars. Here's the constructor:
CTarget::CTarget(void)
{
if ( IsClipboardFormatAvailable(CF_TEXT) )
{
if( IsGTreport( GetClipboardData(CF_TEXT) ) )
{
this->report = GetClipboardData(CF_TEXT);
cout << this->report;
}
else
{
cout << "Paste GT report:" << endl;
cin >> this->report;
}
}
else
{
cout << "Paste GT report:" << endl;
cin >> this->report;
}
}
When compiled:
Target.cpp : error C2065: 'CF_TEXT' : undeclared identifier
Target.cpp : error C3861: 'IsClipboardFormatAvailable': identifier not found, even with argument-dependent lookup
Target.cpp : error C3861: 'IsGTreport': identifier not found, even with argument-dependent lookup
Target.cpp : error C3861: 'GetClipboardData': identifier not found, even with argument-dependent lookup
Target.cpp : error C3861: 'CF_TEXT': identifier not found, even with argument-dependent lookup
Target.cpp : error C3861: 'GetClipboardData': identifier not found, even with argument-dependent lookup
Target.cpp : error C3861: 'CF_TEXT': identifier not found, even with argument-dependent lookup
Obviously missing a header file.
If you "Go to Defenition" it takes you to winuser.h
So I include it... and:
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(42) : error C2146: syntax error : missing ';' before identifier 'HDWP'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(42) : error C2501: 'HDWP' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(43) : error C2146: syntax error : missing ';' before identifier 'MENUTEMPLATEA'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(43) : error C2501: 'MENUTEMPLATEA' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(48) : error C2146: syntax error : missing ';' before identifier 'MENUTEMPLATE'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(48) : error C2378: 'MENUTEMPLATEA' : redefinition; symbol cannot be overloaded with a typedef
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(43) : see declaration of 'MENUTEMPLATEA'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(48) : error C2501: 'MENUTEMPLATE' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(50) : error C2146: syntax error : missing ';' before identifier 'LPMENUTEMPLATEA'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(50) : error C2501: 'LPMENUTEMPLATEA' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(55) : error C2146: syntax error : missing ';' before identifier 'LPMENUTEMPLATE'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(55) : error C2378: 'LPMENUTEMPLATEA' : redefinition; symbol cannot be overloaded with a typedef
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(50) : see declaration of 'LPMENUTEMPLATEA'
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(55) : error C2501: 'LPMENUTEMPLATE' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(58) : error C2065: 'CALLBACK' : undeclared identifier
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(58) : error C2065: 'WNDPROC' : undeclared identifier
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(58) : error C2501: 'LRESULT' : missing storage-class or type specifiers
e:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(58) : fatal error C1903: unable to recover from previous error(s); stopping compilation