📄 sdlwmseticon.html
字号:
<HTML><HEAD><TITLE>SDL_WM_SetIcon</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="SDL Library Documentation"HREF="index.html"><LINKREL="UP"TITLE="Window Management"HREF="wm.html"><LINKREL="PREVIOUS"TITLE="SDL_WM_GetCaption"HREF="sdlwmgetcaption.html"><LINKREL="NEXT"TITLE="SDL_WM_IconifyWindow"HREF="sdlwmiconifywindow.html"></HEAD><BODYCLASS="REFENTRY"BGCOLOR="#FFF8DC"TEXT="#000000"LINK="#0000ee"VLINK="#551a8b"ALINK="#ff0000"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">SDL Library Documentation</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="sdlwmgetcaption.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="sdlwmiconifywindow.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><H1><ANAME="SDLWMSETICON"></A>SDL_WM_SetIcon</H1><DIVCLASS="REFNAMEDIV"><ANAME="AEN3582"></A><H2>Name</H2>SDL_WM_SetIcon -- Sets the icon for the display window.</DIV><DIVCLASS="REFSYNOPSISDIV"><ANAME="AEN3585"></A><H2>Synopsis</H2><DIVCLASS="FUNCSYNOPSIS"><ANAME="AEN3586"></A><P></P><PRECLASS="FUNCSYNOPSISINFO">#include "SDL.h"</PRE><P><CODE><CODECLASS="FUNCDEF">void <BCLASS="FSFUNC">SDL_WM_SetIcon</B></CODE>(SDL_Surface *icon, Uint8 *mask);</CODE></P><P></P></DIV></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3592"></A><H2>Description</H2><P>Sets the icon for the display window. Win32 icons must be 32x32.</P><P>This function must be called before the first call to <AHREF="sdlsetvideomode.html">SDL_SetVideoMode</A>.</P><P>The <TTCLASS="PARAMETER"><I>mask</I></TT> is a bitmask that describes the shape of theicon. If <TTCLASS="PARAMETER"><I>mask</I></TT> is NULL, then the shape is determined bythe colorkey of <TTCLASS="PARAMETER"><I>icon</I></TT>, if any, or makes the iconrectangular (no transparency) otherwise.</P><P>If <TTCLASS="PARAMETER"><I>mask</I></TT> is non-NULL, it points to a bitmap with bits setwhere the corresponding pixel should be visible. The format of the bitmap is asfollows: Scanlines come in the usual top-down order. Each scanline consists of(width / 8) bytes, rounded up. The most significant bit of each byte representsthe leftmost pixel.</P></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3603"></A><H2>Example</H2><PRECLASS="PROGRAMLISTING">SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"), NULL);</PRE></DIV><DIVCLASS="REFSECT1"><ANAME="AEN3606"></A><H2>See Also</H2><P><AHREF="sdlsetvideomode.html"><TTCLASS="FUNCTION">SDL_SetVideoMode</TT></A>,<AHREF="sdlwmsetcaption.html"><TTCLASS="FUNCTION">SDL_WM_SetCaption</TT></A></P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="sdlwmgetcaption.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="index.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="sdlwmiconifywindow.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">SDL_WM_GetCaption</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="wm.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">SDL_WM_IconifyWindow</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -