当我被告知未声明标识符时,我遇到了一些无意义的错误
POINT positionCursor;
HWND handle;
LPWSTR title;
int bufsize;
mousePosition->Text=Cursor->Position.ToString();
positionCursor.x = Cursor->Position.X;
positionCursor.y = Cursor->Position.Y;
handle = WindowFromPhysicalPoint(positionCursor);
bufsize = GetWindowTextLength(handle) + 1;
title = new WCHAR[bufsize];
GetWindowText(handle, title, bufsize);
std::wstring temp = title;
System::String ^str3 = Convert::ToString(temp.c_str());
windowText->Text= str3;
答案 0 :(得分:0)
是否与您提供的代码中未声明的mousePosition
有关?另外,windowText
是什么?似乎我们缺少更多代码...