0

I need to send pressing a key "TAB" in simple note.txt.
this is code:
MyForm.cpp is unchanged and created automatically

MyForm.h
... bla-bla-bla, default unchanged code ...

#include <Windows.h>

... bla-bla-bla, default unchanged code ...
my button method ->

private: System::Void Tab_Button_Click(System::Object^ sender, System::EventArgs^ e) {
        HWND h = FindWindow(TEXT("note.txt"), NULL);
        PostMessage(h, WM_KEYDOWN, VK_TAB, 0);
    }

... bla-bla-bla, default unchanged code ...

And with that code, i get this errors:

error LNK2028: unresolved token (0A000034) "extern "C" int __stdcall PostMessageW(struct HWND__ *,unsigned int,unsigned int,long)" (?PostMessageW@@$$J216YGHPAUHWND__@@IIJ@Z) referenced in function "private: void __clrcall myHandler::MyForm::Tab_Button_Click(class System::Object ^,class System::EventArgs ^)" (?Tab_Button_Click@MyForm@myHandler@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)

+ one almost the same error

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 myHandler::MyForm::Tab_Button_Click(class System::Object ^,class System::EventArgs ^)" (?Tab_Button_Click@MyForm@myHandler@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z)

+ one almost the same error

Just in case, MyForm.h [Design]
enter image description here

What exactly do these errors mean and how to fix them?

0 Answers0