1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#include <windows.h>
unsigned long color = RGB(255,0,0);
int x=505,
y=712;
LRESULT WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
if (Msg==WM_DESTROY) PostQuitMessage(0);
return DefWindowProcA(hWnd,Msg,wParam,lParam);
}
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevious, char* Cmd, int Show)
{
WNDCLASSA wcl = { CS_VREDRAW|CS_HREDRAW,(WNDPROC)WndProc,0,0,hInstance,0,0,CreateSolidBrush(color),0,"win"};
RegisterClassA(&wcl);
HWND wind = CreateWindowExA(WS_EX_TOPMOST,"win","Pixel",WS_POPUP|WS_VISIBLE|WS_SYSMENU,x,y,1,1,0,0,hInstance,0);
MSG Msg;
while (GetMessageA(&Msg,0,0,0))
{
TranslateMessage(&Msg);
DispatchMessageA(&Msg);
}
return 0;
}
|