From: Arny on 18 Apr 2010 20:08
On 13.04.2010 19:26, John Smith wrote:
> "ScottMcP [MVP]"<scottmcp(a)mvps.org> wrote:
>> On Apr 12, 3:47 am, John Smith<do_not_...(a)invalid.address.com> wrote:
>>> What about a situation like this
>>> ..blah blah couple of lines of code for example
>>> Do I have to select back the oldhdc before releasing the hdc?
>> Yes. Always. As stated in the SelectObject function description.
> I would think that no memory is lost if in above example. Am I correct?
Correct. Stock objects are maintained by the system. Calling
DeleteObject() is unnecessary for stock objects, but it will not do any
harm (ref. SDK).