🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.misc
1 messages
1 total messages Started by Eilef Hellem Thu, 28 Jan 1993 07:37
Creating Metafiles
#2439
Author: Eilef Hellem
Date: Thu, 28 Jan 1993 07:37
57 lines
2426 bytes
	I'm trying to create a metafile from my simple application
	but i have a quite serious problem. When i use the following 
	code :

	brush=CreateSolidBrush(....);
	pen=CreateSolidPen(....);
	hcdMeta=CreateMetaFile("metafile.wmf");
		SetMapMode(hdcMeta,MM_ANISOTROPIC);  	// 1
		SetWindowOrg(hdcMeta,...);		// 2
		SetWindowExt(hdcMeta,...);		// 3
		SelectObject(hdcMeta,brush);		// 4
		SelectObject(hdcMeta,pen);		// 5
		Rectangle(hcdMeta,...);			// 6
			.
			.
		// GDI-calls supported by metafiles
			.
			.
	DeleteMetaFile(CloseMetaFile(hdcMeta));
	DeleteObject(brush);
	DeleteObject(pen);
		.
		.

	...nothing happens in my application when i try to draw it
	nor in the sample 'wmfdcode' that follows Microsoft's SDK 3.1.	
	It seems however that if i remove 1 ( // 1 ), everything works ok,
	though my intension of it all is also removed. I want to scale
	the darn thing, without having to set the mapping mode in
	my application.
	
	Well i looked in microsoft's guidelines to create a metafile
	and it says that you should set a mapping mode in any metafile
	so that they are device independent....
	Howcome my code doesn't work.
	Can anybody help me please!!!

thanx in advance 

Eilef	

 +-----------------+-----------------------+--------------------------+
 |                 | E-Mail:               |                          |
 |  Eilef Hellem   |                       |   /|/ /  /  / / _  _/  / |
 |  MRIH           |  eh@mrih.no           | _/  _/  /__/ /_  _/  _/  |
 |  AAlesund       |                       |                          |
 |  Norway         |     or                |                          |
 |                 |                       |                          |
 |                 |  eilef.hellem@mrih.no | Information at your      |
 |                 |                       | fingertips..,I'm in!     |
 +-----------------+-----------------------+--------------------------+




	
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads