Skip to content

Instantly share code, notes, and snippets.

@morr
Created June 1, 2012 22:12
Show Gist options
  • Save morr/2855443 to your computer and use it in GitHub Desktop.
Save morr/2855443 to your computer and use it in GitHub Desktop.
cross point
//-----------------------------------------------------------------------------
#include <windows.h>
//-----------------------------------------------------------------------------
//#define __TEST__
//-----------------------------------------------------------------------------
#ifndef __TEST__
#pragma comment(linker,"/MERGE:.rdata=.text")
//#pragma comment(linker,"/FILEALIGN:512 /SECTION:.text,EWRX /IGNORE:4078")
#pragma comment(linker,"/ENTRY:WinMain")
#endif
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Name: WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
//-----------------------------------------------------------------------------
int WINAPI WinMain(HINSTANCE hInstance_,
HINSTANCE hPrevInstance_,
LPSTR pCmdLine_,
int nCmdShow_)
{
while( 1 )
{
HDC hDC = GetDC(NULL);
HBRUSH hBrush = CreateSolidBrush(RGB(255, 255, 255));
HBRUSH hOldBrush = (HBRUSH)SelectObject(hDC, hBrush);
HPEN hPen = CreatePen(PS_SOLID, 0, RGB(0, 0, 0));
HPEN hOldPen = (HPEN)SelectObject(hDC, hPen);
//Ellipse(hDC, 958, 602, 962, 598); // 960x600
Ellipse(hDC, 638, 510, 642, 514); // 1280x1024
hOldBrush = (HBRUSH)SelectObject(hDC, hOldBrush);
hOldPen = (HPEN)SelectObject(hDC, hOldPen);
DeleteObject(hOldBrush);
DeleteObject(hPen);
ReleaseDC(NULL, hDC);
Sleep(1);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment