GramDlg.cpp
资源名称:PicItem.rar [点击查看]
上传用户:zhaisir71
上传日期:2022-07-10
资源大小:3208k
文件大小:1k
源码类别:
图形图象
开发平台:
Visual C++
- // GramDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "PicItem.h"
- #include "GramDlg.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CGramDlg dialog
- CGramDlg::CGramDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CGramDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CGramDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CGramDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CGramDlg)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CGramDlg, CDialog)
- //{{AFX_MSG_MAP(CGramDlg)
- ON_BN_CLICKED(IDC_GRAM, OnGram)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CGramDlg message handlers
- void CGramDlg::OnGram()
- {
- // TODO: Add your control notification handler code here
- HBITMAP hbitmap=::LoadBitmap(::AfxGetInstanceHandle(),MAKEINTRESOURCE(IDB_BITMAP1));
- CClientDC show(this);
- CDC pdc;
- pdc.CreateCompatibleDC(&show);
- pdc.SelectObject(hbitmap);
- show.BitBlt(0,0,100,100,&pdc,0,0,SRCCOPY);
- DeleteDC(pdc);
- }
English
