#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#include <math.h>

void draw_file(void);
void draw_file(void){}

int PASCAL WinMain(HANDLE hInstance, HANDLE hPrevInstance,
	LPSTR  lpszCmdLine,int nCmdShow)
{
	HBRUSH hbrush = CreateSolidBrush(RGB(0,0,255));
	HDC hdc = CreateMetaFile("test.wmf");
	if (hdc==0) printf("hdc is null\n");
	if (hbrush==0)  printf("hdc is null\n");

	Rectangle(hdc,0,0,100,100);
	MoveTo(hdc,0,0);
   LineTo(hdc,100,100);
	SelectObject(hdc,hbrush);
	Ellipse(hdc,20,20,80,80);
	DeleteMetaFile(CloseMetaFile(hdc));
	DeleteObject(hbrush);
	printf("done \n");
	MessageBeep(0);
}

