📄 group__bmp__fns.htm
字号:
<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 FillBoxWithBitmap </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </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 </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 </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 </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 </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="struct__BITMAP.htm">BITMAP</a> * </td> <td class="mdname" nowrap> <em>bmp</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Fills a box with a BITMAP object. <p>This function fills a box with a BITMAP object pointed to by <em>bmp</em>. <em></em>(x,y) is the upper-left corner of the box, and <em>w</em>, <em>h</em> are the width and the height of the box respectively.<p>This function will scale the bitmap when necessary; that is, when the width or the height of the box is not equal to the with or the height of 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> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>The x coordinate of the upper-left corner of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>The y coordinate of the upper-left corner of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>The width of the box. Can be zero, means the width or the height will be equal to the width or the height of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>h</em> </td><td>The height of the box. Can be zero, means the width or the height will be equal to the width or the height of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bmp</em> </td><td>The pointer to the BITMAP object. </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>You can specify the alpha value or the color key of the BITMAP object if _USE_NEWGAL defined, and the current raster operation was set by <em>SetRasterOperation</em> for the DC will override the alpha value of color key if ROP is not ROP_SET. If _USE_NEWGAL is not defined, this function will not return anything, and you can not specify the alpha value and the color key of the BITMAP object.<p>If the bitmap has BMP_TYPE_RLE, the target <em>w</em> and <em>h</em> will be ignored. That is, the scale of the bitmap is not supported for RLE encoded bitmap.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__bmp__fns.htm#ga2">FillBoxWithBitmapPart</a>, <a class="el" href="group__bmp__fns.htm#ga0">GetBitmapFromDC</a>, <a class="el" href="group__bmp__load__fns.htm">Bitmap file load/save operations</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga2" doxytag="gdi.h::FillBoxWithBitmapPart"></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 FillBoxWithBitmapPart </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </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 </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 </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 </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 </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>int </td> <td class="mdname" nowrap> <em>bw</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>bh</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__BITMAP.htm">BITMAP</a> * </td> <td class="mdname" nowrap> <em>bmp</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>xo</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>yo</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Fills a box with a part of a bitmap oject. <p>This function fills a box with a part of a bitmap object pointed to by <em>bmp</em>. <em></em>(x,y) is the upper-left corner of the box, and <em>w</em>, <em>h</em> are the width and the height of the box respectively. <em></em>(xo, yo) is the start position of the part box in the bitmap relative to upper-left corner of the bitmap, and <em>bw</em>, <em>bh</em> are the width and the height of the full bitmap expected.<p>If <em>bw</em> or <em>bh</em> is less than or equal to zero, this function will use the original width and height of the bitmap, else it will scale the BITMAP object when necessary; that is, when the width or the height of the box is not equal to the with or the height of 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> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>The x coordinate of the upper-left corner of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>The y coordinate of the upper-left corner of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>w</em> </td><td>The width of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>h</em> </td><td>The height of the box. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bw</em> </td><td>The width of the full bitmap expected. Can be zero, means the width or the height will be equal to the width or the height of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bh</em> </td><td>The height of the full bitmap expected. Can be zero, means the width or the height will be equal to the width or the height of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>xo</em> </td><td>xo,yo: The start position of the part box in the bitmap relative to upper-left corner of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>yo</em> </td><td>xo,yo: The start position of the part box in the bitmap relative to upper-left corner of the BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bmp</em> </td><td>The pointer to the BITMAP object. </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>You can specify the alpha value or the color key of the BITMAP object if _USE_NEWGAL defined, and the current raster operation was set by <em>SetRasterOperation</em> for the DC will override the alpha value or the color key if ROP is not ROP_SET. If _USE_NEWGAL not defined, this function will not return anything, and you can not specify the alpha value and the color key of the BITMAP object.<p>The RLE encoded bitmap is not supported by this function so far.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__bmp__fns.htm#ga1">FillBoxWithBitmap</a>, <a class="el" href="group__bmp__fns.htm#ga0">GetBitmapFromDC</a>, <a class="el" href="group__bmp__struct.htm">Bitmap structure</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga0" doxytag="gdi.h::GetBitmapFromDC"></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 GetBitmapFromDC </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </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 </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 </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 </td> <td class="mdname" nowrap> <em>w</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -