Niestety zastosowanie powyższych rad nie wystarczyło do rozwiązania ogólnego problemu. Udało się (nie bez trudu) z #include <Windows.h>. Teraz mam coś takiego:
{ShellExecute(NULL, L"open", L"C://szyfr.pdf", L"", L"", SW_SHOWNORMAL);}
Ale wyrzuca to dwa następujące błędy:
Error 5 error LNK2028: unresolved token (0A000011) "extern "C" struct HINSTANCE__ * __stdcall ShellExecuteW(struct HWND__ *,wchar_t const *,wchar_t const *,wchar_t const *,wchar_t const *,int)" (?ShellExecuteW@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PB_W111H@Z) referenced in function "private: void __clrcall Szyfrant12::Form1::button7_Click(class System::Object ^,class System::EventArgs ^)" (?button7_Click@Form1@Szyfrant12@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) C:\Documents and Settings\Piotr\moje dokumenty\visual studio 2010\Projects\Szyfrant12\Szyfrant12\Szyfrant12.obj
Error 6 error LNK2019: unresolved external symbol "extern "C" struct HINSTANCE__ * __stdcall ShellExecuteW(struct HWND__ *,wchar_t const *,wchar_t const *,wchar_t const *,wchar_t const *,int)" (?ShellExecuteW@@$$J224YGPAUHINSTANCE__@@PAUHWND__@@PB_W111H@Z) referenced in function "private: void __clrcall Szyfrant12::Form1::button7_Click(class System::Object ^,class System::EventArgs ^)" (?button7_Click@Form1@Szyfrant12@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) C:\Documents and Settings\Piotr\moje dokumenty\visual studio 2010\Projects\Szyfrant12\Szyfrant12\Szyfrant12.obj
Znalazłem opisy w msdn tych błędów, ale nie rozjaśniło mi to sprawy.