🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2249

MFC Question: can I get a DC from a CDC?

#2249
From: John K Bunk
Date: Thu, 21 Jan 1993 17:30
26 lines
1728 bytes
I'm currently learing C++ and MFC by creating a
Device Independant Bitmap (DIB) object which reads
a .BMP file and displays the bitmap via a CDC
object.

The problem:  SetDIBitsToDevice needs a DC for
it's first argument.  SetDIBitsToDevice is not
a member of the CDC class.  The DC attribute
within the CDC class is probably a private item
(can't find it in the Class Libraries Reference
manual).  I cannot find any CDC member which gives
me a DC.  So, how can I get a DC from the CDC 
passed to my DIB paint routine to give to the
SetDIBitsToDevice call?

Thanks in advance for all responses!
John Bunk

P.S.  If someone has already written a DIB object
which can read .BMP files, please let me know!

-- 
                      John Bunk, Code 4G13, NSWC-PHD 
                       jkb@suned1.nswses.navy.mil
    Any statements / opinions made here are mine, alone, not the Navy's.
              But that's OK, the Navy is usually wrong anyhow.
Technical Details
Message-ID: <9301211730.AA22170@suned1.Nswses.Navy.Mil>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!decuac!pa.dec.com!suned1.Nswses.Navy.Mil!jkb

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!decuac!pa.dec.com!suned1.Nswses.Navy.Mil!jkb
From: jkb@suned1.Nswses.Navy.Mil (John K Bunk)
Message-ID: <9301211730.AA22170@suned1.Nswses.Navy.Mil>
Organization: NSWSES Code 4g13 - Opinions: Are Mine Alone
Subject: MFC Question:  can I get a DC from a CDC?
Date: Thu, 21 Jan 1993 09:30:43 -0800
X-Received: by usenet.pa.dec.com; id AA16499; Thu, 21 Jan 93 11:47:40 -0800
X-Received: by inet-gw-1.pa.dec.com; id AA00724; Thu, 21 Jan 93 09:56:50 -0800
X-Received: by suned1.Nswses.Navy.Mil (4.1/Nswses4.1.2_920723eb)
 id AA22170; Thu, 21 Jan 93 09:30:44 PST
X-Mailer: Mail User's Shell (7.2.3 5/22/91)
X-To: comp.os.ms-windows.programmer.misc.usenet
Lines: 26