那图鲁扮演者:Getting a CF_DIB or CF_METAFILEPICT from the ...
来源:百度文库 编辑:九乡新闻网 时间:2024/04/30 19:46:24
CRect metafile(0, 0, 100, 100); // example location
if (IsClipboardFormatAvailable(CF_METAFILEPICT))
{
// play a metafile from the clipboard if available
GLOBALHANDLE hGMem ;
LPMETAFILEPICT lpMFP ;
OpenClipboard() ;
hGMem = GetClipboardData(CF_METAFILEPICT) ;
lpMFP = (LPMETAFILEPICT)GlobalLock(hGMem) ;
pDC->SaveDC() ;
pDC->SetMapMode(lpMFP->mm) ;
pDC->SetViewportExt(metafile.Width(), metafile.Height()) ;
pDC->SetViewportOrg(metafile.left, metafile.top) ;
pDC->PlayMetaFile(lpMFP->hMF) ;
VERIFY(pDC->RestoreDC(-1)) ;
GlobalUnlock(hGMem) ;
CloseClipboard() ;
}
if (IsClipboardFormatAvailable(CF_DIB))
{
// a DIB is in the clipboard, draw it out
GLOBALHANDLE hGMem ;
LPBITMAPINFO lpBI ;
void* pDIBBits;
OpenClipboard() ;
hGMem = GetClipboardData(CF_DIB) ;
lpBI = (LPBITMAPINFO)GlobalLock(hGMem) ;
// point to DIB bits after BITMAPINFO object
pDIBBits = (void*)(lpBI + 1);
::StretchDIBits(pDC->m_hDC,
metafile.left, metafile.top,
metafile.Width(), metafile.Height(),
0, 0, lpBI->bmiHeader.biWidth,
lpBI->bmiHeader.biHeight,
pDIBBits, lpBI, DIB_RGB_COLORS, SRCCOPY);
GlobalUnlock(hGMem) ;
CloseClipboard() ;
}
if (IsClipboardFormatAvailable(CF_METAFILEPICT))
{
// play a metafile from the clipboard if available
GLOBALHANDLE hGMem ;
LPMETAFILEPICT lpMFP ;
OpenClipboard() ;
hGMem = GetClipboardData(CF_METAFILEPICT) ;
lpMFP = (LPMETAFILEPICT)GlobalLock(hGMem) ;
pDC->SaveDC() ;
pDC->SetMapMode(lpMFP->mm) ;
pDC->SetViewportExt(metafile.Width(), metafile.Height()) ;
pDC->SetViewportOrg(metafile.left, metafile.top) ;
pDC->PlayMetaFile(lpMFP->hMF) ;
VERIFY(pDC->RestoreDC(-1)) ;
GlobalUnlock(hGMem) ;
CloseClipboard() ;
}
if (IsClipboardFormatAvailable(CF_DIB))
{
// a DIB is in the clipboard, draw it out
GLOBALHANDLE hGMem ;
LPBITMAPINFO lpBI ;
void* pDIBBits;
OpenClipboard() ;
hGMem = GetClipboardData(CF_DIB) ;
lpBI = (LPBITMAPINFO)GlobalLock(hGMem) ;
// point to DIB bits after BITMAPINFO object
pDIBBits = (void*)(lpBI + 1);
::StretchDIBits(pDC->m_hDC,
metafile.left, metafile.top,
metafile.Width(), metafile.Height(),
0, 0, lpBI->bmiHeader.biWidth,
lpBI->bmiHeader.biHeight,
pDIBBits, lpBI, DIB_RGB_COLORS, SRCCOPY);
GlobalUnlock(hGMem) ;
CloseClipboard() ;
}
Getting a CF_DIB or CF_METAFILEPICT from the ...
The Process (or undertaking) of Getting Started with OFBiz
How To Export Data from a DLL or an Application
Getting fort in the frame
a bad way simply solve the uncatched exception throw from a thread
Is Libya the end of NATO, or a test of a new ...
From 1500m to the Marathon - a look back at Andrew Lloyd
Meissen figure of the 'Sense of Smell' from a series of the five Senses. First modelled by Sch?nheit
The Japanese Could Teach Us a Thing or Two - NYTimes.com
Boriska - The boy from Mars.
听力:Getting to Know the New First Family
[环球趣闻视听精选] Getting Back on the Horse
Meissen 'Sense of Smell' from a series of the five Senses. First modelled by J.J.Schoenheit in 1772.
Madagascar Script - transcript from the scree...
Chapter three: The Letters From No one
different from 与 the same as
The 5 worst inventions from brilliant invento...
Tales from the Script - October 2002
The following files from Microsoft's WAIK
Arahantavagga: The Arahant or Perfected One
Relationship between employees from the enterprise value of the expression
from the formal preparation in accordance with the unified arrangements
The evolution of language: Babel or babble? | The Economist
Osama bin Laden - the isolated man or the Al-...