WindowsXP/windows/advcore/duser/docs/api/setgadgetstyle.htm
2025-04-27 07:49:33 -04:00

127 lines
7.1 KiB
HTML
Raw Blame History

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" type="text/css" href="api.css">
<title></title>
<meta name="Microsoft Theme" content="glacier 111, default"><meta name="Microsoft Border" content="tb, default"></head>
<body leftmargin="44" background="../_themes/glacier/glabkgnd.jpg" bgcolor="#CCFFFF" text="#000000" link="#339999" vlink="#999999" alink="#406666"><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><!--mstheme--><font face="arial, arial, helvetica">
<!--mstheme--></font></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><!--msnavigation--><td valign="top"><!--mstheme--><font face="arial, arial, helvetica"><!--mstheme--></font><table border="0" width="700" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" valign="middle"><!--mstheme--><font face="arial, arial, helvetica"><img border="0" src="../images/Core.gif" width="32" height="32"><!--mstheme--></font></td>
<td width="95%" valign="middle"><!--mstheme--><font face="arial, arial, helvetica">
<h1><!--mstheme--><font face="verdana, arial, helvetica" color="#006666">SetGadgetStyle<!--mstheme--></font></h1>
<h2><!--mstheme--><font face="verdana, arial, helvetica" color="#006666">Core<!--mstheme--></font></h2>
<!--mstheme--></font></td>
</tr>
</table><!--mstheme--><font face="arial, arial, helvetica">
<p><b>SetGadgetStyle</b> changes the current style of the given Gadget. Only the styles specified by nMask are actually changed. If multiple style changes are requested, but any changes fail, the successfully change styles will not be reverted back.</p>
<!--mstheme--></font><pre>BOOL <b>SetGadgetStyle</b>(
<b>HGADGET</b> hgadChange, // Gadget to change
<b>UINT</b> nNewStyle, // New style
<b>UINT</b> nMask // Style bits to change
);</pre><!--mstheme--><font face="arial, arial, helvetica">
<h4><!--mstheme--><font face="verdana, arial, helvetica" color="#006666">Parameters<!--mstheme--></font></h4>
<dl>
<dt><i>hgadChange</i></dt>
<dd>[in] Gadget to change
</dd>
<dt><i>nNewStyle</i></dt>
<dd>[in] nNewStyle can be a combination of the following flags:<br>
<br>
<!--mstheme--></font><table border="2" width="700" cellspacing="0" cellpadding="5" bordercolordark="#006666" bordercolorlight="#99CCCC">
<tr>
<td width="33%" bgcolor="#C0C0C0"><!--mstheme--><font face="arial, arial, helvetica"><b>Value</b><!--mstheme--></font></td>
<td width="66%" bgcolor="#C0C0C0"><!--mstheme--><font face="arial, arial, helvetica"><b>Meaning</b><!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_RELATIVE<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">The position of the Gadget is internally stored relative to parent. This is the preferred style if the Gadget will be moved more frequently, such as when scrolling.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_VISIBLE<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">The Gadget is visible.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_ENABLED<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">The Gadget can receive input.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_BUFFERED<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Drawing of the Gadget is double-buffered.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_ALLOWSUBCLASS<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Gadget supports being subclassed.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_WANTFOCUS<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Gadget can receive keyboard focus.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_BUFFERED<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Drawing of the Gadget is double-buffered.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_CLIPINSIDE<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Drawing of this Gadget will be clipped inside the Gadget.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_CLIPSIBLINGS<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">Drawing of this Gadget will exclude any area of overlapping siblings that are higher in z-order.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_OPAQUE<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">HINT: Support for composited drawing is unnecessary.<!--mstheme--></font></td>
</tr>
<tr>
<td width="33%"><!--mstheme--><font face="arial, arial, helvetica">GS_NOZEROORIGIN<!--mstheme--></font></td>
<td width="66%"><!--mstheme--><font face="arial, arial, helvetica">HINT: Setting the origin to (0,0) is unnecessary.<!--mstheme--></font></td>
</tr>
</table><!--mstheme--><font face="arial, arial, helvetica">
</dd>
</dl>
<dl>
<dt><i>nMask</i></dt>
<dd>[in] Style bits to change
</dd>
</dl>
<h4><!--mstheme--><font face="verdana, arial, helvetica" color="#006666">
Return Values<!--mstheme--></font></h4>
<dl>
<p>All style changes were successful.</p>
</dl>
<h4><!--mstheme--><font face="verdana, arial, helvetica" color="#006666">See Also<!--mstheme--></font></h4>
<p> <b><a href="GetGadgetStyle.htm">GetGadgetStyle</a></b>, <a href="GM_CHANGESTATE.htm"> GM_CHANGESTATE</a>,
Gadget Styles</p>
<!--mstheme--></font><!--msnavigation--></td></tr><!--msnavigation--></table><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><!--mstheme--><font face="arial, arial, helvetica">
<p align="center">&nbsp;
<p align="center" style="border-top-style: solid; border-top-width: 2"><b><font color="#FF0000" size="3"><br>
Internal Only</font></b><p align="center">Build on Friday, March 17, 2000
<br>
Copyright <20> 2000 by Microsoft Corporation.&nbsp; All rights reserved<br>
<a href="mailto:jstall">Send feedback </a>to Jeff Stall
<!--mstheme--></font></td></tr><!--msnavigation--></table></body>
</html>