尝试Stack around the variable "rc" was corrupted
测试此代码时出错(使用返回的坐标将鼠标移动到那里)
请参见下面的代码:
int TestPluginAPI::getmidX()
{
//RECT rect;
HWND hWnd;
hWnd = getBrowserHwnd();
RECT rc;
if(GetClientRect(hWnd, &rc)) // get client coords
{
MapWindowPoints(hWnd, NULL, reinterpret_cast<POINT*>(&rc.left), 2); // convert top-left x
MapWindowPoints(hWnd, NULL, reinterpret_cast<POINT*>(&rc.right), 2); // convert bottom-right x
MapWindowPoints(hWnd, NULL, reinterpret_cast<POINT*>(&rc.top), 2); // convert top-left y
MapWindowPoints(hWnd, NULL, reinterpret_cast<POINT*>(&rc.bottom), 2); // convert bottom-right y
return rc.left;
}
else {return 0;}
}
你能告诉我,有什么问题吗?