未声明Visual c ++标识符

时间:2018-12-14 12:36:37

标签: c++ visual-c++

当我被告知未声明标识符时,我遇到了一些无意义的错误

    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;

1 个答案:

答案 0 :(得分:0)

是否与您提供的代码中未声明的mousePosition有关?另外,windowText是什么?似乎我们缺少更多代码...