SetDIBits and GetDIBits in MFC?
-
Hi everybody ! Can you help me on finding the equivalant of these functions in MFC? Many thanks in advance.
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = dstX; bi.bmiHeader.biHeight = dstY; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = dstX * 4 * dstY; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; **SetDIBits(hdcDst, hBmpDst, 0, dstY, dst, &bi, DIB_RGB_COLORS);**
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = nx; bi.bmiHeader.biHeight = - ny; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = nx * 4 * ny; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; buf = (pBGR) malloc(nx * 4 * ny); **bRes = GetDIBits(cdcSrc, cBmpSrc, 0, ny, buf, &bi, DIB_RGB_COLORS);**
-
Hi everybody ! Can you help me on finding the equivalant of these functions in MFC? Many thanks in advance.
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = dstX; bi.bmiHeader.biHeight = dstY; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = dstX * 4 * dstY; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; **SetDIBits(hdcDst, hBmpDst, 0, dstY, dst, &bi, DIB_RGB_COLORS);**
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = nx; bi.bmiHeader.biHeight = - ny; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = nx * 4 * ny; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; buf = (pBGR) malloc(nx * 4 * ny); **bRes = GetDIBits(cdcSrc, cBmpSrc, 0, ny, buf, &bi, DIB_RGB_COLORS);**
You know,
Win32 API
functions are available toMFC
code... :rolleyes:If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
You know,
Win32 API
functions are available toMFC
code... :rolleyes:If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]Yes.
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
-
Yes.
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
knowing that you know makes me happy :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi everybody ! Can you help me on finding the equivalant of these functions in MFC? Many thanks in advance.
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = dstX; bi.bmiHeader.biHeight = dstY; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = dstX * 4 * dstY; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; **SetDIBits(hdcDst, hBmpDst, 0, dstY, dst, &bi, DIB_RGB_COLORS);**
bi.bmiHeader.biSize = sizeof(bi.bmiHeader); bi.bmiHeader.biWidth = nx; bi.bmiHeader.biHeight = - ny; bi.bmiHeader.biPlanes = 1; bi.bmiHeader.biBitCount = 32; bi.bmiHeader.biCompression = BI_RGB; bi.bmiHeader.biSizeImage = nx * 4 * ny; bi.bmiHeader.biClrUsed = 0; bi.bmiHeader.biClrImportant = 0; buf = (pBGR) malloc(nx * 4 * ny); **bRes = GetDIBits(cdcSrc, cBmpSrc, 0, ny, buf, &bi, DIB_RGB_COLORS);**