MSDN says that the bitmap used in GetDiBits
should not be selected into a DC before calling this function. But from my experience(with BitBlt
) I know that I cannot draw an a bitmap unless it is selected.
- How does
GetDiBits
circumvents this? Can I just use an unselected, newly created bitmap as argument to this function? GetDiBits
as wellCreateDibSection
returns an array. But MSDN says about the first function:"bits of the specified compatible bitmap"
I thought DI stands for DeviceIndependent. Why is there a contradiction? This means that, according to MSDN,
GetDiBits
can be used only withCreateCompatibleBitmap
(which is DD)? Then I can't send this array to another machine to display it,right?- Both functions use a hDC. If
CreateDibSection
is truly DIndependent why does it need a hDC? All the needed info is provided through the bitmapinfoheader...