You are on page 1of 1

#include <graphics.

h>
#include <windows.h>
int main()
{
DWORD screenWidth = GetSystemMetrics (SM_CXSCREEN);
DWORD screenHeight = GetSystemMetrics (SM_CYSCREEN);
initwindow(screenWidth, screenHeight, "", -3,-3);
POINT cursorPosition;
int mx, my;
while(1)
{
GetCursorPos(&cursorPosition);
mx= cursorPosition.x;
my= cursorPosition.

y;

if(GetAsyncKeyState(VK_LBUTTON))
{
bar(mx, my, mx+100, my+100);
delay(100);
}
}
getch();
closegraph();
}

You might also like