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
GetDiBitscircumvents this? Can I just use an unselected, newly created bitmap as argument to this function? GetDiBitsas wellCreateDibSectionreturns 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,
GetDiBitscan 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
CreateDibSectionis truly DIndependent why does it need a hDC? All the needed info is provided through the bitmapinfoheader...