Created
June 1, 2012 22:12
-
-
Save morr/2855443 to your computer and use it in GitHub Desktop.
cross point
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------------- | |
#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