Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

boost 2: shared_ptr wraps resource handles

, 16 Nov 2004
Using boost, we can write "almost perfect" wrappers for GDI and other resource handles, in a few lines of code.
handleref.zip
handleref_2.zip
handleref_project.zip
HandleRef
default.doxygen
doxydoc
doxygen.png
ftv2blank.png
ftv2doc.png
ftv2folderclosed.png
ftv2folderopen.png
ftv2lastnode.png
ftv2link.png
ftv2mlastnode.png
ftv2mnode.png
ftv2node.png
ftv2plastnode.png
ftv2pnode.png
ftv2vertline.png
ResHandle.dsp
ResHandle.dsw
handleref_project_2.zip
default.doxygen
doxygen.png
ftv2blank.png
ftv2doc.png
ftv2folderclosed.png
ftv2folderopen.png
ftv2lastnode.png
ftv2link.png
ftv2mlastnode.png
ftv2mnode.png
ftv2node.png
ftv2plastnode.png
ftv2pnode.png
ftv2vertline.png
ResHandle.dsp
ResHandle.dsw
<!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>HandleRef: CDCRef class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.5 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>CDCRef Class Reference</h1><code>#include &lt;<a class="el" href="handleref_8h-source.html">handleref.h</a>&gt;</code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
HDC needs special handling, since there are two valid cleanups - DeleteDC - ReleaseDC. 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00198">198</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#a0">CDCRef</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">creates a null handle  <a href="#a0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#a1">operator HDC</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">retrieve a device context handle  <a href="#a1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#a2">CDCRef</a> (HDC dc, bool deleteOnRelease)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">initializes the handler For the second parameter, you can specify: - <a class="el" href="classCDCRef.html#x1">CDCRef::Null</a> for a null deleter (handle is not destroyed) - <a class="el" href="classCDCRef.html#x2">CDCRef::Delete</a> to call DeleteDC (when the handle was acquired by CreateDC) - <a class="el" href="classCDCRef.html#x3">CDCRef::Release</a> to call ReleaseDC (when the handle was acquired by GetDC)  <a href="#a2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#a3">CDCRef</a> (HWND wnd, HDC dc, bool releaseOnRelease)</td></tr>

<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html">CDCRef</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#e0">GetDC</a> (HWND wnd)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">implements GetDC, returning a valid CDCRef for more information, see MSDN: GetDC  <a href="#e0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html">CDCRef</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#e1">GetDCEx</a> (HWND wnd, HRGN rgnClip, DWORD flags)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">implements GetDC, returning a valid CDCRef for more information, see MSDN: GetDCEx  <a href="#e1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html">CDCRef</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#e2">GetWindowDC</a> (HWND wnd)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html">CDCRef</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#e3">CreateDC</a> (LPCTSTR lpszDriver, LPCTSTR lpszDevice, LPCTSTR lpszOutput, CONST DEVMODE *lpInitData, bool infoDCOnly=false)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">implements CreateDC / CreateIC, returning a valid CDCRef for more information, see MSDN: CreateDC specify idonDCOnly=true to call CreateIC instead of CreateDC.  <a href="#e3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html">CDCRef</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#e4">CreateCompatibleDC</a> (HDC dc)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">implements CreateCompatibleDC, returning a valid CDCRef for more information, see MSDN: CreateCompatibleDC  <a href="#e4"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>typedef boost::shared_ptr&lt;<br>
 void &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#x0">tBoostSP</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterVoid.html">nsHandleRefDetail::CDeleterVoid</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#x1">Null</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterDeleteDC.html">nsHandleRefDetail::CDeleterDeleteDC</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#x2">Delete</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterReleaseDC.html">nsHandleRefDetail::CDeleterReleaseDC</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#x3">Release</a></td></tr>

<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="classCDCRef.html#x0">tBoostSP</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classCDCRef.html#p0">m_ptr</a></td></tr>

</table>
<hr><h2>Member Typedef Documentation</h2>
<a class="anchor" name="x0" doxytag="CDCRef::tBoostSP" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef boost::shared_ptr&lt;void&gt; <a class="el" href="classCDCRef.html#x0">CDCRef::tBoostSP</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00201">201</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="x1" doxytag="CDCRef::Null" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterVoid.html">nsHandleRefDetail::CDeleterVoid</a> <a class="el" href="structnsHandleRefDetail_1_1CDeleterVoid.html">CDCRef::Null</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00204">204</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="x2" doxytag="CDCRef::Delete" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterDeleteDC.html">nsHandleRefDetail::CDeleterDeleteDC</a> <a class="el" href="structnsHandleRefDetail_1_1CDeleterDeleteDC.html">CDCRef::Delete</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00205">205</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="x3" doxytag="CDCRef::Release" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef <a class="el" href="structnsHandleRefDetail_1_1CDeleterReleaseDC.html">nsHandleRefDetail::CDeleterReleaseDC</a> <a class="el" href="structnsHandleRefDetail_1_1CDeleterReleaseDC.html">CDCRef::Release</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00206">206</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="a0" doxytag="CDCRef::CDCRef" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CDCRef::CDCRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
creates a null handle 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00211">211</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="CDCRef::CDCRef" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CDCRef::CDCRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HDC&nbsp;</td>
          <td class="mdname" nowrap> <em>dc</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>deleteOnRelease</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
initializes the handler For the second parameter, you can specify: - <a class="el" href="classCDCRef.html#x1">CDCRef::Null</a> for a null deleter (handle is not destroyed) - <a class="el" href="classCDCRef.html#x2">CDCRef::Delete</a> to call DeleteDC (when the handle was acquired by CreateDC) - <a class="el" href="classCDCRef.html#x3">CDCRef::Release</a> to call ReleaseDC (when the handle was acquired by GetDC) 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00223">223</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="CDCRef::CDCRef" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CDCRef::CDCRef </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HWND&nbsp;</td>
          <td class="mdname" nowrap> <em>wnd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>HDC&nbsp;</td>
          <td class="mdname" nowrap> <em>dc</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>releaseOnRelease</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00229">229</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a1" doxytag="CDCRef::operator HDC" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> CDCRef::operator HDC </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap> const<code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
retrieve a device context handle 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00214">214</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0" doxytag="CDCRef::GetDC" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html">CDCRef</a> CDCRef::GetDC </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HWND&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>wnd</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
implements GetDC, returning a valid CDCRef for more information, see MSDN: GetDC 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00237">237</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e1" doxytag="CDCRef::GetDCEx" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html">CDCRef</a> CDCRef::GetDCEx </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HWND&nbsp;</td>
          <td class="mdname" nowrap> <em>wnd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>HRGN&nbsp;</td>
          <td class="mdname" nowrap> <em>rgnClip</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DWORD&nbsp;</td>
          <td class="mdname" nowrap> <em>flags</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
implements GetDC, returning a valid CDCRef for more information, see MSDN: GetDCEx 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00244">244</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e2" doxytag="CDCRef::GetWindowDC" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html">CDCRef</a> CDCRef::GetWindowDC </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HWND&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>wnd</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00249">249</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e3" doxytag="CDCRef::CreateDC" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html">CDCRef</a> CDCRef::CreateDC </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">LPCTSTR&nbsp;</td>
          <td class="mdname" nowrap> <em>lpszDriver</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>LPCTSTR&nbsp;</td>
          <td class="mdname" nowrap> <em>lpszDevice</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>LPCTSTR&nbsp;</td>
          <td class="mdname" nowrap> <em>lpszOutput</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>CONST DEVMODE *&nbsp;</td>
          <td class="mdname" nowrap> <em>lpInitData</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>infoDCOnly</em> = false</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
implements CreateDC / CreateIC, returning a valid CDCRef for more information, see MSDN: CreateDC specify idonDCOnly=true to call CreateIC instead of CreateDC. 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00259">259</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e4" doxytag="CDCRef::CreateCompatibleDC" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html">CDCRef</a> CDCRef::CreateCompatibleDC </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">HDC&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>dc</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline, static]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
implements CreateCompatibleDC, returning a valid CDCRef for more information, see MSDN: CreateCompatibleDC 
<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00272">272</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="p0" doxytag="CDCRef::m_ptr" ></a><p>
<table class="mdTable" width="100%" 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="classCDCRef.html#x0">tBoostSP</a> <a class="el" href="classCDCRef.html#p0">CDCRef::m_ptr</a><code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="handleref_8h-source.html#l00202">202</a> of file <a class="el" href="handleref_8h-source.html">handleref.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="handleref_8h-source.html">handleref.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Nov 16 22:21:51 2004 for HandleRef by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 > 
</a>1.3.5 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

peterchen
Klippel
Germany Germany
Peter is tired of being called "Mr. Chen", even so certain individuals insist on it. No, he's not chinese.
 
Peter has seen lots of boxes you youngsters wouldn't even accept as calculators. He is proud of having visited the insides of a 16 Bit Machine.
 
In his spare time he ponders new ways of turning groceries into biohazards, or tries to coax South American officials to add some stamps to his passport.
 
Beyond these trivialities Peter works for Klippel[^], a small german company that wants to make mankind happier by selling them novel loudspeaker measurement equipment.
 

Where are you from?[^]



Please, if you are using one of my articles for anything, just leave me a comment. Seeing that this stuff is actually useful to someone is what keeps me posting and updating them.
Should you happen to not like it, tell me, too

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411023.1 | Last Updated 16 Nov 2004
Article Copyright 2004 by peterchen
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid