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

Popular posts from this blog

Node Js Terminal Password Input

Express Production Setup - 5 | Handle Invaild Json

Express Production Setup - 2 | Rate Limiting | DDOS