updatelayeredwindow not working
===

i tried to use UpdateLayeredWindow for all day, but it failed to work :(, i put the code in OnCreate and load a png file (created by photoshop) with CImage.

    int CMainWindow::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
    	SetWindowLong(this->m_hWnd, GWL_STYLE, 0);
    	SetWindowLong(this->m_hWnd, GWL_EXSTYLE, 0);
    	SetWindowLong(this->m_hWnd, GWL_EXSTYLE, GetWindowLong(this->m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
    	this->SetMenu(NULL);
    	::SetWindowPos(this->m_hWnd, HWND_TOP, 50, 50, 652, 492, SWP_SHOWWINDOW);
    
    	CBitmap imageBitmap, *oldBitmap;
    	CDC *dcWindow, dcMem;
    	CRect wRect;
    	CPoint wPos;
    	CSize wSize;
    	HBITMAP hbmp;
    	BLENDFUNCTION bFunc;
    
    	m_Image.Load(_T("Img/BG_Blue.png"));
    	GetWindowRect(&wRect);
    	dcWindow = GetWindowDC();
    	imageBitmap.CreateCompatibleBitmap(dcWindow, wRect.Width(), wRect.Height());
    	dcMem.CreateCompatibleDC(dcWindow);
    	oldBitmap = dcMem.SelectObject(&imageBitmap);
    	m_Image.Draw(dcMem.m_hDC, 0, 0, wRect.Width(), wRect.Height(), 0, 0, wRect.Width(), wRect.Height());
    	wPos.x = 0; wPos.y = 0;
    	wSize.cx = wRect.left; wSize.cy = wRect.bottom;
    	bFunc.SourceConstantAlpha = 125;
    	bFunc.BlendFlags = 0;
    	bFunc.BlendOp = AC_SRC_OVER;
    	bFunc.AlphaFormat = AC_SRC_ALPHA;
    	UpdateLayeredWindow(dcWindow, &wPos, &wSize, &dcMem, &wPos, 0, &bFunc, ULW_ALPHA);
    	//BitBlt(dcWindow->m_hDC, 0, 0, wRect.Width(), wRect.Height(), dcMem.m_hDC, 0, 0, SRCCOPY);
    	DWORD error = GetLastError();
    	dcMem.SelectObject(oldBitmap);
    	return 0;
    }

the function returned with 1 , but nothing appeared on the screen, only an icon on the starup menu indicating the program is running. I am wondering if there is something wrong with the png file ... can anyone help ?