📄 group__dc__fns.htm
字号:
</table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Deletes the DC returned by <em>CreatePrivateDC</em> or <em>CreatePrivateClientDC</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>hdc</em> </td><td>The handle to the DC.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga4">CreatePrivateDC</a>, <a class="el" href="group__dc__fns.htm#ga5">CreatePrivateClientDC</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga2" doxytag="gdi.h::GetClientDC"></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 GetClientDC </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hwnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets a client DC of a window. <p>This function gets a client DC of the specified <em>hwnd</em>, and returns the handle to the DC. MiniGUI will try to return an unused DC from the internal DC pool, rather than allocate a new one from the system heap. Thus, you should release the DC when you finish drawing as soon as possible.<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>hwnd</em> </td><td>The handle to the window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>You should call <em>ReleaseDC</em> to release the DC when you are done.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga1">GetDC</a>, <a class="el" href="group__dc__fns.htm#ga3">ReleaseDC</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga1" doxytag="gdi.h::GetDC"></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 GetDC </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hwnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets a window DC of a window. <p>This function gets a window DC of the specified <em>hwnd</em>, and returns the handle to the DC. MiniGUI will try to return an unused DC from the internal DC pool, rather than allocate a new one from the system heap. Thus, you should release the DC when you finish drawing as soon as possible.<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>hwnd</em> </td><td>The handle to the window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>You should call <em>ReleaseDC</em> to release the DC when you are done.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga2">GetClientDC</a>, <a class="el" href="group__dc__fns.htm#ga3">ReleaseDC</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga0" doxytag="gdi.h::GetGDCapability"></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">unsigned int GUIAPI GetGDCapability </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>iItem</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>Returns a capability of a DC. <p>This function returns the capability of the specified item <em>iItem</em> of the DC <em>hdc</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>hdc</em> </td><td>The handle to the DC. </td></tr> <tr><td valign="top"></td><td valign="top"><em>iItem</em> </td><td>An integer presents the capablity, can be one of the following values:</td></tr> </table></dl><ul><li>GDCAP_COLORNUM<br> Tell <em>GetGDCapability</em> to return the colors number of the DC. Note the for a DC with 32-bit depth, the function will return 0xFFFFFFFF, not 0x100000000.</li><li>GDCAP_HPIXEL<br> Tell <em>GetGCapability</em> to return the horizontal resolution of the DC.</li><li>GDCAP_VPIXEL<br> Tell <em>GetGDCapability</em> to return the vertical resolution of the DC.</li><li>GDCAP_MAXX<br> Tell <em>GetGDCapability</em> to return the maximal visible x value of the DC.</li><li>GDCAP_MAXY<br> Tell <em>GetGDCapability</em> to return the maximal visible y value of the DC.</li><li>GDCAP_DEPTH<br> Tell <em>GetGDCapability</em> to return the color depth of the DC. The returned value can be 1, 4, 8, 15, 16, 24, or 32.</li><li>GDCAP_BITSPP<br> Tell <em>GetGDCapability</em> to return the bits number for storing a pixle in the DC.</li><li>GDCAP_BPP<br> Tell <em>GetGDCapability</em> to return the bytes number for storing a pixle in the DC.</li><li>GDCAP_RMASK<br> Tell <em>GetGDCapability</em> to return the pixel red color mask for the DC.</li><li>GDCAP_GMASK<br> Tell <em>GetGDCapability</em> to return the pixel green color mask for the DC.</li><li>GDCAP_BMASK<br> Tell <em>GetGDCapability</em> to return the pixel blue color mask for the DC.</li></ul><p><dl compact><dt><b>Returns:</b></dt><dd>The capbility. </dd></dl> </td> </tr></table><a class="anchor" name="ga6" doxytag="gdi.h::GetPrivateClientDC"></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 GetPrivateClientDC </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hwnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Returns the private client DC of a window. <p>This function returns the private client DC of the window <em>hwnd</em> which have extended style <em>WS_EX_USEPRIVATECDC</em>.<p>When a main window have the extended style <em>WS_EX_USEPRIVATECDC</em>, or a control class have the style <em>CS_OWNDC</em>, MiniGUI will create a private client DC for this window in the creation progress of the window, and destroy the DC when you destroy the window, and use this private client DC in default message handlers. So there will be some improvments on drawing/repaint performance. You can alos call this function to get the private client DC, and use it to draw anything in your window.<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>hwnd</em> </td><td>The handle to the window.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the private client DC, HDC_INVALID indicates an error.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__dc__fns.htm#ga5">CreatePrivateClientDC</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga20" doxytag="gdi.h::LockDC"></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__basic__types.htm#ga0">Uint8</a> *GUIAPI LockDC </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>const <a class="el" href="struct__RECT.htm">RECT</a> * </td> <td class="mdname" nowrap> <em>rw_rc</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>width</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>height</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>pitch</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -