title: HBITMAP adding transparency / alpha channel
body: <p>I'm trying to add transparency to a hbitmap object but it never draw anything :/</p>
  
  <p>this is the code i use to draw the handle</p>
  
  <pre><code>HDC hdcMem = CreateCompatibleDC(hDC);
      HBITMAP hbmOld = (HBITMAP) SelectObject(hdcMem, m_hBitmap);
  
      BLENDFUNCTION blender = {AC_SRC_OVER, 0, (int) (2.55 * 100), AC_SRC_ALPHA}; // blend function combines opacity and pixel based transparency
      AlphaBlend(hDC, x, y, rect.right - rect.left, rect.bottom - rect.top, hdcMem, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, blender);
  
      SelectObject(hdcMem, hbmOld);
      DeleteDC(hdcMem);
  </code></pre>
  
  <p>and this is the code which should add a alpha channel to the hbitmap</p>
  
  <pre><code>BITMAPINFOHEADER bminfoheader;
      ::ZeroMemory(&amp;bminfoheader, sizeof(BITMAPINFOHEADER));
      bminfoheader.biSize        = sizeof(BITMAPINFOHEADER);
      bminfoheader.biWidth       = m_ResX;
      bminfoheader.biHeight      = m_ResY;
      bminfoheader.biPlanes      = 1;
      bminfoheader.biBitCount    = 32;
      bminfoheader.biCompression = BI_RGB;
  
      HDC windowDC = CreateCompatibleDC(0);
      unsigned char* pPixels = new unsigned char[m_ResX * m_ResY * 4];
  
      GetDIBits(windowDC, m_hBitmap, 0, m_ResY, pPixels, (BITMAPINFO*) &amp;bminfoheader, DIB_RGB_COLORS); // load pixel info
  
      // add alpha channel values of 255 for every pixel if bmp
      for (int count = 0; count &lt; m_ResX * m_ResY; count++)
      {
          pPixels[count * 4 + 3] = 255; &lt;----  here i've tried to change the value to test different transparency, but it doesn't change anything
      }
      SetDIBits(windowDC, m_hBitmap, 0, GetHeight(), pPixels, (BITMAPINFO*) &amp;bminfoheader, DIB_RGB_COLORS); // save the pixel info for later manipulation
  
      DeleteDC(windowDC);
  </code></pre>
  
  <p>edit:</p>
  
  <p>this is the code how I create the bitmap
  I fill the pixeldata in later in some code</p>
  
  <pre><code>m_hBuffer = CreateBitmap( m_ResX, m_ResY, 1, 32, nullptr );
  </code></pre>