Article View: cn.bbs.comp.program
Article #648Re: hDC Problem
From: Jia H
Date: Fri, 24 Jul 1998 00:00
Date: Fri, 24 Jul 1998 00:00
26 lines
1444 bytes
1444 bytes
For 1: You create a new bitmap (bmpX) and connect it with the hdcX, after use it you need disconnect it and release the object. For 2: You connect an exist bitmap (p) with the hdcX, after use it you only need disconnect it. haihandsome@my-dejanews.com wrote in message <6p5bb8$8a7$1@nnrp1.dejanews.com>... >I Want to know a difference between type 1 & 2 ?? Why it difference ?? >(I want to load bmp file to DC without load it to picture box) > >Type 1 ... >Set picTemp.Picture = LoadPicture(FileName) >hdcX = CreateCompatibleDC(0&) >bmpX = CreateBitmap(Width, Height, cPlanes, cPixelBits, 0) >oldX = SelectObject(hdcX, bmpX) >BitBlt hdcX, 0, 0, Width, Height, picTemp.hdc, 0, 0, vbSrcCopy >Type 2 ... >Dim p As New StdPicture >Set p = LoadPicture(FileName) >hdcX = CreateCompatibleDC(0&) >oldX = SelectObject(hdcX, p.Handle) > > > >-----== Posted via Deja News, The Leader in Internet Discussion ==----- >http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Technical Details
Message-ID:
<6p9428$1s2$1@clinux.ml.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6p5bb8$8a7$1@nnrp1.dejanews.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc86e,cd6c7aa98dbd32f4 X-Google-Attributes: gidfc86e,public From: "Jia H" <jiah@usa.net> Subject: Re: hDC Problem Date: 1998/07/24 Message-ID: <6p9428$1s2$1@clinux.ml.org> X-Deja-AN: 374411627 References: <6p5bb8$8a7$1@nnrp1.dejanews.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Chinese Linux User Group Newsgroups: cn.bbs.comp.program