Hi!
I'm trying to use the FindWindow() function, but it doesn't seem to work properly.My whole program works just fine, but as soon as i add this piece of code, iget these weird compiler errors. code: static char* fWndSTATIC = "FLYFF";HWND fWindow = FindWindow(NULL, LPCWSTR(fWndSTATIC));
returning error when compiling:Error 1 error LNK2028: unresolved token (0A000013) "extern "C" struct HWND__ * __stdcall FindWindowW(wchar_t const *,wchar_t const *)" ( FindWindowW@@$$J18YGPAUHWND__@@PB_W0@Z) referenced in function "private: void __clrcall FlyFFINCAPro::Form1::activateINCAToolStripMenuItem_Click(class System::Object ^,class System::EventArgs ^)" ( activateINCAToolStripMenuItem_Click@Form1@FlyFFINCAPro@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) FlyFF INCA Pro.obj Error 2 error LNK2019: unresolved external symbol "extern "C" struct HWND__ * __stdcall FindWindowW(wchar_t const *,wchar_t const *)" ( FindWindowW@@$$J18YGPAUHWND__@@PB_W0@Z) referenced in function "private: void __clrcall FlyFFINCAPro::Form1::activateINCAToolStripMenuItem_Click(class System::Object ^,class System::EventArgs ^)" ( activateINCAToolStripMenuItem_Click@Form1@FlyFFINCAPro@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) FlyFF INCA Pro.obj Error 3 fatal error LNK1120: 2 unresolved externals
I'm using Visual Studio 2005. Standard IDE.
Fixed.
I added: #pragma comment(lib, "User32.lib")under:#include <windows.h>
But now, the program doesn't find the FLYFF window even while its running.