⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__icon__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Icon operations</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main&nbsp;Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.htm">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File&nbsp;List</a> | <a class="qindex" href="functions.htm">Data&nbsp;Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related&nbsp;Pages</a></div><h1>Icon operations<br><small>[<a class="el" href="group__gdi__fns.htm">GDI functions</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__icon__fns.htm#ga6">CreateIcon</a>(hdc, w, h, AndBits, XorBits, colornum)&nbsp;&nbsp;&nbsp;CreateIconEx(hdc, w, h, AndBits, XorBits, colornum, NULL)</ul><h2>Functions</h2><ul><li>MG_EXPORT <a class="el" href="group__handles.htm#ga5">HICON</a> GUIAPI <a class="el" href="group__icon__fns.htm#ga0">LoadIconFromFile</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, const char *filename, int which)<dl class="el"><dd class="mdescRight">Loads an icon from a Windows ICO file.  <a href="#ga0"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga5">HICON</a> GUIAPI <a class="el" href="group__icon__fns.htm#ga1">LoadIconFromMem</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, const void *area, int which)<dl class="el"><dd class="mdescRight">Loads an icon from a memory area.  <a href="#ga1"></a><br></dl><li>MG_EXPORT <a class="el" href="group__handles.htm#ga5">HICON</a> GUIAPI <a class="el" href="group__icon__fns.htm#ga2">CreateIconEx</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, int w, int h, const <a class="el" href="group__win32__types.htm#ga0">BYTE</a> *AndBits, const <a class="el" href="group__win32__types.htm#ga0">BYTE</a> *XorBits, int colornum, const <a class="el" href="struct__RGB.htm">RGB</a> *pal)<dl class="el"><dd class="mdescRight">Creates an icon object from the memory.  <a href="#ga2"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__icon__fns.htm#ga3">DestroyIcon</a> (<a class="el" href="group__handles.htm#ga5">HICON</a> hicon)<dl class="el"><dd class="mdescRight">Destroys an icon object.  <a href="#ga3"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__icon__fns.htm#ga4">GetIconSize</a> (<a class="el" href="group__handles.htm#ga5">HICON</a> hicon, int *w, int *h)<dl class="el"><dd class="mdescRight">Gets the size of an icon object.  <a href="#ga4"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__icon__fns.htm#ga5">DrawIcon</a> (<a class="el" href="group__handles.htm#ga2">HDC</a> hdc, int x, int y, int w, int h, <a class="el" href="group__handles.htm#ga5">HICON</a> hicon)<dl class="el"><dd class="mdescRight">Draws an icon into a box.  <a href="#ga5"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga6" doxytag="gdi.h::CreateIcon"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define CreateIcon          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">hdc,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>w,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>h,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>AndBits,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>XorBits,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>colornum&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;CreateIconEx(hdc, w, h, AndBits, XorBits, colornum, NULL)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__icon__fns.htm#ga2">CreateIconEx</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l04788">4788</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="ga2" doxytag="gdi.h::CreateIconEx"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga5">HICON</a> GUIAPI CreateIconEx           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a>&nbsp;</td>          <td class="mdname" nowrap> <em>hdc</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>w</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>h</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__win32__types.htm#ga0">BYTE</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>AndBits</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="group__win32__types.htm#ga0">BYTE</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>XorBits</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>colornum</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RGB.htm">RGB</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pal</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Creates an icon object from the memory. <p>This function creates an icon from memory data rather than icon file. <em>w</em> and <em>h</em> are the width and the height of the icon respectively. <em>pANDBits</em> and <em>pXORBits</em> are AND bitmask and XOR bitmask of the icon. MiniGUI currently support mono-color cursor 256-color icon and 16-color icon, <em>colornum</em> specifies the cursor's color depth. For mono-color, it should be 1, and for 16-color cursor, it should be 4.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>hdc</em>&nbsp;</td><td>The device context. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>w</em>&nbsp;</td><td>The width of the icon. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>h</em>&nbsp;</td><td>The height of the icon. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>AndBits</em>&nbsp;</td><td>The pointer to the AND bits of the icon. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>XorBits</em>&nbsp;</td><td>The pointer to the XOR bits of the icon. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>colornum</em>&nbsp;</td><td>The bit-per-pixel of XOR bits. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pal</em>&nbsp;</td><td>The palette of icon. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the icon object, zero means error occurred.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__icon__fns.htm#ga0">LoadIconFromFile</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga3" doxytag="gdi.h::DestroyIcon"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI DestroyIcon           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga5">HICON</a>&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>hicon</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Destroys an icon object. <p>This function destroys the icon object <em>hicon</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>hicon</em>&nbsp;</td><td>The icon object. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__icon__fns.htm#ga2">CreateIconEx</a>, <a class="el" href="group__icon__fns.htm#ga0">LoadIconFromFile</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga5" doxytag="gdi.h::DrawIcon"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void GUIAPI DrawIcon           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a>&nbsp;</td>          <td class="mdname" nowrap> <em>hdc</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>x</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>y</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -