关键色透明 vc++ 图片处理

	HMODULE hUser32 = GetModuleHandle(_T("USER32.DLL"));
	g_pSetLayeredWindowAttributes = (lpfn)GetProcAddress(hUser32, "SetLayeredWindowAttributes");
	if (g_pSetLayeredWindowAttributes == NULL)
		::PostQuitMessage(0);



	//HWND hWnd = GetSafeHwnd();
	CWnd* hnd=GetDlgItem(IDC_STATICfffff);
	HWND hWnd=hnd->m_hWnd;
	//HWND hWnd = (HWND)GetDlgItem(IDB_FOOTBALLBMP);
	LONG lWindowLong = GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED;
	::SetWindowLong(hWnd, GWL_EXSTYLE, lWindowLong);
	g_pSetLayeredWindowAttributes(hWnd, RGB(255, 255, 255), 0, 1);
	::RedrawWindow(hWnd, NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);


评论

  1. 1

    他方 2017-12-07 18:21

    vc实现大头贴类: http://www.tblnk.com/index.php/home/Softwareinfo/index/softwareid/27.html

  2. 2

    他方 2017-12-07 18:21

    vc实现大头贴 点击下载

  3. 3