#include <windows.h>
#include <stdio.h>
void main()
{
POINT p;
int sx=10,sy=10;
HWND h;
RECT r;
::system("title H");
system("color 2a");
while(1)
{
::GetCursorPos(&p);
h = ::FindWindow(NULL, "H");
::GetWindowRect(h, &r);
if(r.top<=0)
if(p.x>r.left && p.x<r.right && p.y < 30)
::SetWindowPos(h, HWND_BOTTOM, r.left, 0, r.right-r.left, r.bottom-r.top, SWP_SHOWWINDOW);
else
::SetWindowPos(h, HWND_BOTTOM, r.left, -(r.bottom-r.top)+10, r.right-r.left, r.bottom-r.top, SWP_SHOWWINDOW);
Sleep(100);
}
}
#include <stdio.h>
void main()
{
POINT p;
int sx=10,sy=10;
HWND h;
RECT r;
::system("title H");
system("color 2a");
while(1)
{
::GetCursorPos(&p);
h = ::FindWindow(NULL, "H");
::GetWindowRect(h, &r);
if(r.top<=0)
if(p.x>r.left && p.x<r.right && p.y < 30)
::SetWindowPos(h, HWND_BOTTOM, r.left, 0, r.right-r.left, r.bottom-r.top, SWP_SHOWWINDOW);
else
::SetWindowPos(h, HWND_BOTTOM, r.left, -(r.bottom-r.top)+10, r.right-r.left, r.bottom-r.top, SWP_SHOWWINDOW);
Sleep(100);
}
}