CreateDIBSection创建32*32的32位位图的代码段

    技术2022-05-20  79

    DWORD nWidth = 32;DWORD nHeight = 32;PVOIL pBits = NULL;BITMAPINFO bi;bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);bi.bmiHeader.biWidth = nWidth;bi.bmiHeader.biHeight = nHeight;bi.bmiHeader.biPlanes = 1;bi.bmiHeader.biBitCount = 32;bi.bmiHeader.biCompression = BI_RGB;bi.bmiHeader.biSizeImage = nHeight * nWidth * 4;CreateDIBSection(NULL, &bi, DIB_RGB_COLORS, &pBits, NULL, NULL);


    最新回复(0)