1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<HTML>
<head><title>GDI functions</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="gdifunctions"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx264.htm#functions"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx267.htm#dialogfunctions"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx269.htm#printersettings"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>GDI functions</H2>
<P>
The following are relevant to the GDI (Graphics Device Interface).<P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/gdicmn.h><P>
<A HREF="#topic1063">::wxColourDisplay</A><BR>
<A HREF="#topic1064">::wxDisplayDepth</A><BR>
<A HREF="#wxmakemetafileplaceable">::wxMakeMetafilePlaceable</A><BR>
<A HREF="#wxsetcursor">::wxSetCursor</A><BR>
<P>
<HR>
<A NAME="topic1063"></A>
<H3>::wxColourDisplay</H3>
<P>
<B>bool</B> <B>wxColourDisplay</B>()<P>
Returns TRUE if the display is colour, FALSE otherwise.<P>
<HR>
<A NAME="topic1064"></A>
<H3>::wxDisplayDepth</H3>
<P>
<B>int</B> <B>wxDisplayDepth</B>()<P>
Returns the depth of the display (a value of 1 denotes a monochrome display).<P>
<HR>
<A NAME="wxmakemetafileplaceable"></A>
<H3>::wxMakeMetafilePlaceable</H3>
<P>
<B>bool</B> <B>wxMakeMetafilePlaceable</B>(<B>const wxString& </B><I>filename</I>, <B>int </B><I>minX</I>, <B>int </B><I>minY</I>,
<B>int </B><I>maxX</I>, <B>int </B><I>maxY</I>, <B>float </B><I>scale=1.0</I>)<P>
Given a filename for an existing, valid metafile (as constructed using <A HREF="wx146.htm#wxmetafiledc">wxMetafileDC</A>)
makes it into a placeable metafile by prepending a header containing the given
bounding box. The bounding box may be obtained from a device context after drawing
into it, using the functions wxDC::MinX, wxDC::MinY, wxDC::MaxX and wxDC::MaxY.<P>
In addition to adding the placeable metafile header, this function adds
the equivalent of the following code to the start of the metafile data:<P>
<PRE>
SetMapMode(dc, MM_ANISOTROPIC);
SetWindowOrg(dc, minX, minY);
SetWindowExt(dc, maxX - minX, maxY - minY);
</PRE>
This simulates the wxMM_TEXT mapping mode, which wxWindows assumes.<P>
Placeable metafiles may be imported by many Windows applications, and can be
used in RTF (Rich Text Format) files.<P>
<I>scale</I> allows the specification of scale for the metafile.<P>
This function is only available under Windows.<P>
<HR>
<A NAME="wxsetcursor"></A>
<H3>::wxSetCursor</H3>
<P>
<B>void</B> <B>wxSetCursor</B>(<B>wxCursor *</B><I>cursor</I>)<P>
Globally sets the cursor; only has an effect in MS Windows.
See also <A HREF="wx59.htm#wxcursor">wxCursor</A>, <A HREF="wx260.htm#wxwindowsetcursor">wxWindow::SetCursor</A>.<P>
</BODY></HTML>
|