C++ restrict the cursor movement in rectangle
#include <iostream>
#include <Windows.h>
int main()
{
// Create a rectangle to restrict the cursor movement
RECT clipRect = {50, 50, 200, 200};
ClipCursor(&clipRect);
std::cout << "Cursor movement restricted to (50, 50) - (200, 200)" << std::endl;
return 0;
}
Comments
Post a Comment