b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

cdc createcompatibledc_create有道_createthread

电脑杂谈  发布时间:2017-02-16 15:41:17  来源:网络整理
cdc createcompatibledccdc createcompatibledc

bi.biClrUsed = 0;

bi.biClrImportant = 0;

BYTE * lpbuffer;

hBitmap = CreateDIBSection(

NULL, //HDC hdc, // handle to device context

(BITMAPINFO *)&bi, //CONST BITMAPINFO *pbmi,

// pointer to structure containing bitmap size,

// format, and color data

DIB_RGB_COLORS, //UINT iUsage, // color data type indicator: RGBvalues or

// palette indexes

(void **)&lpbuffer, //VOID *ppvBits, // pointer to variable toreceive a pointer to

// the bitmap's bit values

NULL, //HANDLE hSection, // optional handle to a file mappingobject

0 //DWORD dwOffset // offset to the bitmap bit values withinthe

// file mapping object

);

lpcFileBuffer = m_pCircularBuffer + m_nFrameSize * wparam;

for (int i=0;i<iHeight/2;i++) {

for(int j=0;j<iWidth/2;j++) {

iB = lpcFileBuffer[i*2*iWidth+j*2];

iG1 = lpcFileBuffer[i*2*iWidth+j*2+1];

iG2 = lpcFileBuffer[(i*2+1)*iWidth+j*2];

iR = lpcFileBuffer[(i*2+1)*iWidth+j*2+1];

iG = (iG1+iG2)/2;

lpcBMPBuffer[(iHeight/2-1-i)*iLineBytes+j*3] = iG;

lpcBMPBuffer[(iHeight/2-1-i)*iLineBytes+j*3+1] = iR;

lpcBMPBuffer[(iHeight/2-1-i)*iLineBytes+j*3+2] = iB;

}

}

CWnd *pWin = GetDlgItem(IDC_STATICMAP);

HDC hDesDC = pWin->GetDC()->m_hDC;

HDC hSrcDC = CreateCompatibleDC(hDesDC);

SelectObject(hSrcDC, hBitmap);

BitBlt(hDesDC,0,0,m_nWidth/2,m_nHeight/2,hSrcDC,0,0,SRCCOPY);

DeleteObject(hBitmap);

DeleteDC(hSrcDC);

DeleteDC(hDesDC);

g_cLock.Unlock();


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-32780-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      热点图片
      拼命载入中...