m_ctlFlash.SetBackgroundColor( RGB(255,0,255) ); //flash控件设置背景色
SetWindowLong( GetSafeHwnd() ,
GWL_EXSTYLE,
GetWindowLong( GetSafeHwnd() , GWL_EXSTYLE) | WS_EX_LAYERED );/修改窗体属性
HINSTANCE hInst=LoadLibrary(_T("User32.DLL"));
if(hInst)
{
typedef BOOL (WINAPI * MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun=NULL;
//取得SetLayeredWindowAttributes函数指针
fun=(MYFUNC)GetProcAddress(hInst,"SetLayeredWindowAttributes");
if(fun)
{
// fun(this->GetSafeHwnd(),0,128,2);
fun( this->GetSafeHwnd(), RGB(255,0,255) , 0 , LWA_COLORKEY );
::RedrawWindow(GetSafeHwnd(), NULL, NULL, RDW_ERASE | RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN);
}
FreeLibrary(hInst);
}
m_ctlFlash.LoadMovie( 0 , _T("D:\\*.swf"));//播放flash文件