Jun 14 2003 17:41 Written by Ramakrishna Talla (codeguru member)
이 기사는 Codeguru 의 Ramakrishna Talla 님이 작성하신 코드입니다.
제시된 예제 샘플은 비트맵 화일을 읽어들여 MFC 로
어떻게 디스플레이 할수 있는지를 보여줍니다.
이 코드는 아주 간단하며 몇라인이 되지 않습니다.
자 그럼 한번 따라해 보도록 하지요.
Step 1: Load the Image File
Call the following:
Step 2: Create a Bitmap Object and Attach It to the Object
Step 3: Create a Memory DC and Select the BMP to It
You also need to store the old BMP pointer:
Step 4: Get the BMP Height and Width
Obtain this from CBitmap's GetBitmap function.
Step 5: Get the Block of Pixels from memoryDC to the Screen use CClientDC's BitBlt function.
Next, re-select the old BMP.
The complete code is as follows:
자 아주 간단하지요 ?
뭐 크게 어려움이 없으리라 봅니다.
이 기사는 Codeguru 의 Ramakrishna Talla 님이 작성하신 코드입니다.
제시된 예제 샘플은 비트맵 화일을 읽어들여 MFC 로
어떻게 디스플레이 할수 있는지를 보여줍니다.
이 코드는 아주 간단하며 몇라인이 되지 않습니다.
자 그럼 한번 따라해 보도록 하지요.
Step 1: Load the Image File
Call the following:
Step 2: Create a Bitmap Object and Attach It to the Object
Step 3: Create a Memory DC and Select the BMP to It
You also need to store the old BMP pointer:
Step 4: Get the BMP Height and Width
Obtain this from CBitmap's GetBitmap function.
Step 5: Get the Block of Pixels from memoryDC to the Screen use CClientDC's BitBlt function.
Next, re-select the old BMP.
The complete code is as follows:
자 아주 간단하지요 ?
뭐 크게 어려움이 없으리라 봅니다.
"MFC" 카테고리의 다른 글
- CView 에 컨트롤 그리기. (0)2007/05/17
- 실행중 윈도우 스타일 바꾸기 . (0)2007/05/17
- 비트맵화일로부터 비트맵 간단히 출력하기. (0)2007/05/17
- 프린트 다이얼로그를 안 띄우고 인쇄하기 (0)2007/05/16
- 프로그램 내부적으로 해상도 변경하기. (0)2007/05/15

수안이의 컴퓨터 연구실



Leave your greetings.