April 27, 2024, 04:00:56 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Draw RECT to specific size

Started by Brian, January 19, 2007, 09:18:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi,

How can I draw a rectangle to a specific size - I want to draw one 350mm x 450mm, irrespective
of what the Logpixels are

Any ideas?

Brian

Ionic Wind Support Team

There are a number of ways to approach this. 

1) You could use logpixels to create a conversion from disply dpi to mm.  Which would be compatible with the autodrawn windows.
2) You can change the mapping mode of the window to MM_LOMETRIC then any drawing command coordinates are in .1 mm instead of 1 pixel.  To do this you'll need a non autodrawn window by specifying @NOAUTODRAW as a window creation flag and draw everything in response to @IDPAINT.

Microsoft describes the mapping modes here:

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnargdi/html/msdn_mapping.asp

Paul.
Ionic Wind Support Team

Brian

Thanks, Paul - just seen your reply . . .

Brian