title: (GDI) AlphaBlend
body: <p>This question is follow up <a href="https://stackoverflow.com/questions/9643184/win32-gdi-set-opacity-of-static-control">Win32 (GDI) - Set Opacity of STATIC Control</a></p>
  
  <p>My problem is that my alpha blending function is not working and I was wondering if someone help me out?</p>
  
  <p>Here is the Setup <code>WndProc</code>:</p>
  
  <pre><code>case WM_PAINT:
      OnChildPaint(BeginPaint(hWnd, &amp;ps));
      EndPaint(hWnd, &amp;ps);
      break;
  </code></pre>
  
  <p>My <code>OnChildPaint</code> function:</p>
  
  <pre><code>BOOL
  OnChildPaint(HDC i_hDC)
  {
  
      HDC hMemDC;
      HGDIOBJ hOldObj;
      HBITMAP hBitmap;
  
      BLENDFUNCTION blendFunc_s = {AC_SRC_OVER, 0, 128, AC_SRC_ALPHA};
  
      hMemDC  = CreateCompatibleDC(i_hDC);
      hBitmap = CreateCompatibleBitmap(hMemDC, 100, 100);
      /* hBrush  = CreateSolidBrush(RGB(255, 0, 0)); */
      hOldObj = SelectObject(hMemDC, hBitmap);
  
      BitBlt(i_hDC, 10, 100, 100, 100, hMemDC, 0, 0, SRCCOPY);
  
      AlphaBlend(i_hDC, 10, 100, 100, 100, hMemDC, 10, 100, 100, 100, blendFunc_s);
  
      SelectObject(hMemDC, hOldObj);
      DeleteObject(hMemDC);
      return TRUE;
  }
  </code></pre>
  
  <p>Have that in mind that I'm not working with actual Bitmap Image (There is no Image).</p>
  
  <p>Thanks</p>