工具:vs ,必須安裝flash控件
1:随便建個MFC空項目,項目->添加類->activeX控件中的MFC類,點添加->下拉控件列表,選擇shoc控件是什麽意思k wave object OK 完成.
2:打完資源對話框簡單愛,工具箱,右點對話編輯器-&控件是什麽gt;選擇項,com控件,選擇shockwave flash object。
3:在工具箱拖個flash控件簡單頭像随便什麽位置,綁定控件變量m_flashplayer;随便
4:在CXXXDlg::OnInitDialog函數中完成flash的調用,代碼工具箱下載如下:
ShowWindow(SW_SHOWMAXIMIZED);
CRect rect;
GetWindowRect(rect); //先最大顯示模式
m_FlashPlayer.MoveWindow(rect,true);
SetWindowLong(this->m_hWnd, GWL_STYLE, GetWindowLong(this->m_hWnd, GWL_控件是什麽STYLE) & WS_CAPTION);//去掉标題欄
CClientDC dc(this);
int horzres = dc.GetDeviceCaps(HORZ例子開頭的成語RES);//獲得象素長度
int vertre簡單結個婚s = dc.GetDeviceCaps(控件怎麽安裝VERTRES);//寬度
//this->MoveWindow(0, 0, horzres, vertres);
m_FlashPlayer.SetWindowP工具箱殺手2004os(&CWnd::wndTop,工具箱圖片大全 0, 0, horzres, ve控件報文錯誤rtres, SWP_SHOWWINDOW);
//讓flash全屏顯示
TC工具箱軟件HAR strCurDrt控件數組[500];
int nLen = ::GetCurrentDirectory(500,strCurDrt);
if( strCurDrt[nLen]!=&#工具箱品牌排行榜039;' )
{
strCur工具箱軟件Drt[nLen++] = '';
strCurDrt[nLen] = '';
}
CString strFileName = strCurDrt;
str簡單的英文Fi例子的縮寫leName += "103x.swf"; //以上爲獲的絕對路徑
m_FlashPlayer.LoadMovie(0, strFileName);//加載flash
//m_FlashPlayer.put_WMode(L"transparent");
//m_FlashPlayer.put_BackgroundColor(50);
m_Flas随便果真的能減肥嗎hPlayer.Play(); //播放
MFC中播放flash簡單例子原文鏈接:https://qipaiyuanmaxiazai.com/12435.html,轉載請注明出處~~~
評論0