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

📄 group__dc__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
    </td>    <td><p>Converts a memory DC to have a same format as a reference DC. <p>This function converts a memory DC <em>mem_dc</em> in order to let it have the same pixel format as the reference DC <em>ref_dc</em>. This function will try to create a new surface for <em>mem_dc</em>, and then copies and maps the surface of <em>ref_dc</em> to it so the blit of the converted memory DC will be as fast as possible.<p>The <em>flags</em> parameter has the same semantics as <em>CreateMemDC</em>. You can also pass MEMDC_FLAG_RLEACCEL in the flags parameter and MiniGUI will try to RLE accelerate colorkey and alpha blits in the resulting memory DC.<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>mem_dc</em>&nbsp;</td><td>The device context to be converted. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>ref_dc</em>&nbsp;</td><td>The reference device context. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>The memory DC flags, has the same semantics as <em>CreateMemDC</em>.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>Only defined for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga12">CreateMemDC</a>, <a class="el" href="group__dc__fns.htm#ga19">DeleteMemDC</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga11" doxytag="gdi.h::CreateCompatibleDCEx"></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#ga2">HDC</a> GUIAPI CreateCompatibleDCEx           </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>width</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>height</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 a memory DC which is compatible with the specified reference DC. <p>This function creates a memory DC which have the same pixel format as the specified reference DC <em>hdc</em>. The same pixel format means that the memory DC will have the same pixel depth, the same RGB composition, or the same palette as the reference DC. Note that the memdc will have the same DC attributes as the reference DC.<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 handle to the reference DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>The expected width of the result memory DC. If it is zero, the width will be equal to the width of the reference DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The expected height of the result memory DC. If it is zero, the height will be equal to the height of the reference DC. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the memory DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>Only defined for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga41">CreateCompatibleDC</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga12" doxytag="gdi.h::CreateMemDC"></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#ga2">HDC</a> GUIAPI CreateMemDC           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname" nowrap> <em>width</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>height</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>depth</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__win32__types.htm#ga4">DWORD</a>&nbsp;</td>          <td class="mdname" nowrap> <em>flags</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__basic__types.htm#ga4">Uint32</a>&nbsp;</td>          <td class="mdname" nowrap> <em>Rmask</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__basic__types.htm#ga4">Uint32</a>&nbsp;</td>          <td class="mdname" nowrap> <em>Gmask</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__basic__types.htm#ga4">Uint32</a>&nbsp;</td>          <td class="mdname" nowrap> <em>Bmask</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__basic__types.htm#ga4">Uint32</a>&nbsp;</td>          <td class="mdname" nowrap> <em>Amask</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 a memory DC. <p>This function creates a memory DC which have the specified flags and pixel format.<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>width</em>&nbsp;</td><td>The expected width of the result memory DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The expected height of the result memory DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>depth</em>&nbsp;</td><td>The expected color depth of the memory DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>The memory DC flags, can be or'ed values of the following flags:</td></tr>  </table></dl><ul><li>MEMDC_FLAG_SWSURFACE<br> Creates the surface of memory DC in the system memory.</li><li>MEMDC_FLAG_HWSURFACE<br> Creates the surface of memory DC in the video memory.</li><li>MEMDC_FLAG_SRCCOLORKEY<br> The created memory DC will use a source color key to blit to other DC.</li><li>MEMDC_FLAG_SRCALPHA<br> The created memory DC will use a source alpha blending to blit to other DC.</li><li>MEMDC_FLAG_RLEACCEL<br> The memory DC will be RLE encoded</li></ul><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>Rmask</em>&nbsp;</td><td>The bit-masks of the red components in a pixel value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>Gmask</em>&nbsp;</td><td>The bit-masks of the green components in a pixel value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>Bmask</em>&nbsp;</td><td>The bit-masks of the blue components in a pixel value. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>Amask</em>&nbsp;</td><td>The bit-masks of the alpha components in a pixel value. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the memory DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>Only defined for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga14">CreateMemDCFromBitmap</a>, <a class="el" href="group__dc__fns.htm#ga15">CreateMemDCFromMyBitmap</a>, <a class="el" href="group__dc__fns.htm#ga11">CreateCompatibleDCEx</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga14" doxytag="gdi.h::CreateMemDCFromBitmap"></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#ga2">HDC</a> GUIAPI CreateMemDCFromBitmap           </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><a class="el" href="struct__BITMAP.htm">BITMAP</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>bmp</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 a memory DC from a reference DC and a BITMAP object. <p>This function creates a memory DC compatible with the specified DC, and use the bits of the BITMAP object as the surface of the memory DC. The created memory DC will have the same geometry as the BITMAP object.<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 reference DC. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>bmp</em>&nbsp;</td><td>The BITMAP object.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the memory DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>Only defined for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga15">CreateMemDCFromMyBitmap</a>, <a class="el" href="group__dc__fns.htm#ga19">DeleteMemDC</a>, <a class="el" href="group__gdi__fns.htm#ga0">BITMAP</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga15" doxytag="gdi.h::CreateMemDCFromMyBitmap"></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#ga2">HDC</a> GUIAPI CreateMemDCFromMyBitmap           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="struct__MYBITMAP.htm">MYBITMAP</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>my_bmp</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>

⌨️ 快捷键说明

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