title: how to obtain alphablending in wince 6.0? and how to erase background image in wince 6.0?
body: <p>How to obtain a alphablend image in wince 6.0 for a particular child window for n number of times?
  for example if i have a vol bar graph window which is for volume increase &amp; decrease which is changed on click of vol+ or Vol- button so if i want to keep vol bar graph window as an alphablend image in wince 6.0 then how shall i obtain? Because i have tried in win32 application and i was able to do but i was not able to perform the same in wince 6.0 ?</p>
  
  <h2>I have used the below function for painting image for volBarGraph in wince 6.0</h2>
  
  <p><strong>void AdjustAlphablendImage(int imgId, char axis_id)</strong></p>
  
  <p>{</p>
  
  <pre><code>LogEntry(L"Entered in AdjustAlphablendImage Function");
  BLENDFUNCTION bf;
  bf.BlendOp=AC_SRC_OVER;
  bf.BlendFlags=0;
  bf.SourceConstantAlpha=55;
  bf.AlphaFormat=0;
  HBITMAP bmp = LoadBitmap(handles.hInstance, 
      MAKEINTRESOURCE(imgId));
  HDC wdc = GetWindowDC(handles.parent);
  HDC tdc = CreateCompatibleDC(wdc);
  SelectObject(tdc,bmp);
  AlphaBlend(wdc ,
      imgs[axis_id].x,
      imgs[axis_id].y,
      imgs[axis_id].width ,
      imgs[axis_id].height,
          tdc ,0 ,0 ,
      imgs[axis_id].widthSrc, 
      imgs[axis_id].heightSrc,
              bf);
  DeleteDC(wdc);
  DeleteDC(tdc);
  DeleteObject(bmp);
  ReleaseDC(handles.parent,wdc);
  LogEntry(L"Exited from AdjustAlphablendImage Function");
  </code></pre>
  
  <p>}</p>
  
  <p>here 'handles' is an object of type 'HANDLES' and 'parent' is a data member of 'HANDLES' of type 'HWND'.</p>
  
  <h2>My structure 'HANDLES' is mentioned below</h2>
  
  <p><strong>struct HANDLES</strong></p>
  
  <p>{</p>
  
  <pre><code>    HINSTANCE hInstance;
  HWND parent;
  HWND volUp;
  HWND volDown;
  HWND volOnOff;
  HWND chUp;
  HWND chDown;
  HWND tvOnOff;
  HWND tvTitle;
  HWND volBarGraph; // I am doing alphablending on this...................
  HWND chNo;
  HWND chNoBcg;
  HWND audioStatus;
  HWND subTitleStatus;
  HWND message;
  HWND prevHandle;
  WNDPROC oldButtonWndProc;
  HWND pressedButton;
  int prevButtonId;
  char prevButtonAxis;
  char screenMode;
  </code></pre>
  
  <p>};</p>
  
  <h2>//The below function is used for calling AdjustAlphablendImage function for volBarGraph.</h2>
  
  <p>AdjustAlphablendImage( </p>
  
  <pre><code>                   volumeStatus.volume + volumeStatus.status + INITIAL_VOLUME,  // This is used for taking proper image on particular click of vol+ or vol- Button.
                     AXIS_VOL_BAR_GRAPH                     
                    );
  </code></pre>
  
  <p><strong>Also how to erase background image in wince 6.0?</strong></p>
  
  <p>Please Reply </p>
  
  <p>Thanks</p>