media-程序编译出错 missing ';' before identifier 'm_ActiveMovie'

问题描述

程序编译出错 missing ';' before identifier 'm_ActiveMovie'

错误:
c:usersadministrator.win-42esb6vovundesktoplilymplilympdlg.h(40) : error C2146: syntax error : missing ';' before identifier 'm_ActiveMovie'
c:usersadministrator.win-42esb6vovundesktoplilymplilympdlg.h(40) : error C2501: 'CWMPPlayer4' : missing storage-class or type specifiers
c:usersadministrator.win-42esb6vovundesktoplilymplilympdlg.h(40) : error C2501: 'm_ActiveMovie' : missing storage-class or type specifiers
C:UsersAdministrator.WIN-42ESB6VOVUNDesktopLilyMPLilyMPDlg.cpp(7) : fatal error C1083: Cannot open include file: 'activemovie3.h': No such file or directory

代码:

// LilyMPDlg.cpp : implementation file
//
#pragma once
#include "stdafx.h"
#include "LilyMP.h"
#include "LilyMPDlg.h"
#include "activemovie3.h"

#ifdef DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE
_;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
CAboutDlg();

// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLilyMPDlg dialog

CLilyMPDlg::CLilyMPDlg(CWnd* pParent /*=NULL*/)
: CDialog(CLilyMPDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CLilyMPDlg)
m_pathname = _T("");
m_player = 0;
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CLilyMPDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLilyMPDlg)
DDX_Control(pDX, IDC_BUTTON9, m_delvol);
DDX_Control(pDX, IDC_LIST2, m_list);
DDX_Control(pDX, IDC_BUTTON8, m_addvol);
DDX_Control(pDX, IDC_BUTTON6, m_next);
DDX_Control(pDX, IDC_BUTTON5, m_circle);
DDX_Control(pDX, IDC_BUTTON4, m_pause);
DDX_Control(pDX, IDC_BUTTON3, m_upper);
DDX_Control(pDX, IDC_BUTTON2, m_play);
DDX_Control(pDX, IDC_BUTTON10, m_mute);
DDX_Control(pDX, IDC_BUTTON1, m_open);
DDX_LBString(pDX, IDC_LIST2, m_pathname);
DDX_Slider(pDX, IDC_SLIDER1, m_player);
DDX_Control(pDX, IDC_OCX6, m_ActiveMovie);
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CLilyMPDlg, CDialog)
//{{AFX_MSG_MAP(CLilyMPDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON1, OnOpen)
ON_BN_CLICKED(IDC_BUTTON2, OnPlay)
ON_BN_CLICKED(IDC_BUTTON3, OnUpper)
ON_BN_CLICKED(IDC_BUTTON4, OnPause)
ON_BN_CLICKED(IDC_BUTTON6, OnNext)
ON_BN_CLICKED(IDC_BUTTON5, OnCircle)
ON_BN_CLICKED(IDC_BUTTON8, OnAddvol)
ON_BN_CLICKED(IDC_BUTTON9, OnDelvol)
ON_BN_CLICKED(IDC_BUTTON10, OnMute)
ON_NOTIFY(NM_OUTOFMEMORY, IDC_SLIDER1, OnOutofmemorySlider1)
ON_LBN_SELCHANGE(IDC_LIST2, OnSelchangeList2)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLilyMPDlg message handlers

BOOL CLilyMPDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
    CString strAboutMenu;
    strAboutMenu.LoadString(IDS_ABOUTBOX);
    if (!strAboutMenu.IsEmpty())
    {
        pSysMenu->AppendMenu(MF_SEPARATOR);
        pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
    }
}

// Set the icon for this dialog.  The framework does this automatically
//  when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE);         // Set big icon
SetIcon(m_hIcon, FALSE);        // Set small icon

// TODO: Add extra initialization here
/*this->m_pause.EnableWindow(FALSE);
this->m_play.EnableWindow(FALSE);
this->m_next.EnableWindow(FALSE);
this->m_circle.EnableWindow(FALSE);*/
return TRUE;  // return TRUE  unless you set the focus to a control

}

void CLilyMPDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CLilyMPDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

    SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

    // Center icon in client rectangle
    int cxIcon = GetSystemMetrics(SM_CXICON);
    int cyIcon = GetSystemMetrics(SM_CYICON);
    CRect rect;
    GetClientRect(&rect);
    int x = (rect.Width() - cxIcon + 1) / 2;
    int y = (rect.Height() - cyIcon + 1) / 2;

    // Draw the icon
    dc.DrawIcon(x, y, m_hIcon);
}
else
{
    CDialog::OnPaint();
}

}

// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CLilyMPDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

void CLilyMPDlg::OnOpen() //添加文件到列表
{
char szFileFilter[]=
"所有文件(*.*)|*.*|" //可选择所有格式的媒体文件
"avi FILE(*.avi)|*.avi|"
"mp3 FILE(*.mp3)|*.mp3|"
"mpeg FILE(*.mpeg)|*.mpeg|"
"mpga FILE(*.mpga)|*.mpga|"
"wave FILE(*.wav)|*.wav|"
"movie FILE(*.mov)|*.mov|"
"mid FILE(*.mid;*.rmi)|*.mid;*.rmi|"
"wma FILE(*.wma)|*.wma|"
"media FILE(*.asf)|*.asf|";
CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY,szFileFilter);
POSITION pos=dlg.GetStartPosition();
if(dlg.DoModal()==IDOK) //消息响应
{while(pos!=NULL)
{m_pathname=dlg.GetNextPathName(pos);
m_list.AddString(m_pathname);} //将选中的文件加入到播放列表中
}

}

void CLilyMPDlg::OnPlay() //播放媒体文件
{ CString str;
if(m_list.GetCount()<=0)MessageBox("请先打开最少一个媒体文件!","Warning",MB_OK);
else
{if(m_list.GetCurSel()<0){m_list.SetCurSel(0);}
int index=m_list.GetCurSel();
m_list.GetText(index,str);//获取当前选中文件信息
m_ActiveMovie.Run();//播放当前选中文件
SetTimer(0,50,0);
}

}

void CLilyMPDlg::OnCircle()
{
int i;
for(i=0;i<50;i++)
OnNext();

}

void CLilyMPDlg::OnUpper()//上一曲
{CString str;
int index=m_list.GetCurSel();
if (index==0)index=m_list.GetCount();
m_list.GetText(index-1,str);
m_ActiveMovie.SetUrl(str);
m_list.SetCurSel(index-1);
}

void CLilyMPDlg::OnPause() //暂停/继续
{CString strtemp;
if((m_player.GetPlayState()==2)|| (m_player.GetPlayState()==3))
{
GetDlgItemText(IDC_BUTTON4,strtemp);//获取按钮上的字符
if(strtemp.Compare("暂停")==0)//若显示“暂停”,点击暂停,并显示 “继续”
{m_ActiveMovie.Pause();
SetDlgItemText(IDC_BUTTON4,"继续");}
if(strtemp.Compare("继续")==0)//实现从暂停点继续播放,并显示 “暂停”
{m_ActiveMovie.Run();
SetDlgItemText(IDC_BUTTON4,"暂停");}

}
else;
}

void CLilyMPDlg::OnNext() //下一曲

{CString str;
int index=m_List.GetCurSel();
if (index==m_List.GetCount()-1)index=-1;

m_List.GetText(index+1,str);
m_ActiveMovie.SetUrl(str);
m_list.SetCurSel(index+1);

}

void CLilyMPDlg::OnAddvol() //增大音量
{long Volume=m_ActiveMovie.Getvolme();
m_ActiveMovie.Pause;
m_ActiveMovie.SetVolume(Volume+5);
m_ActiveMovie.Run;
}
void CLilyMPDlg::OnDelvol() //减小音量
{long Volume=m_ActiveMovie.Getvolme();
m_ActiveMovie.Pause;
m_ActiveMovie.SetVolume(Volume-5);
m_ActiveMovie.Run;

}

void CLilyMPDlg::OnMute() //静音
{
m_ActiveMovie.Pause;
m_ActiveMovie.SetVolume(0);
m_ActiveMovie.Run;
}

void CLilyMPDlg::OnSelchangeList2()
{
// TODO: Add your control notification handler code here

}

BEGIN_EVENTSINK_MAP(CLilyMPDlg, CDialog)
//{{AFX_EVENTSINK_MAP(CLilyMPDlg)
ON_EVENT(CLilyMPDlg, IDC_OCX6, 5001 /* OpenStateChange */, OnOpenStateChangeOcx6, VTS_I4)
//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

void CLilyMPDlg::OnOpenStateChangeOcx6(long NewState)
{
// TODO: Add your control notification handler code here

}

时间: 2024-08-21 07:10:09

media-程序编译出错 missing &amp;#39;;&amp;#39; before identifier &amp;#39;m_ActiveMovie&amp;#39;的相关文章

测试-c语言程序编译出错error: syntax error before &amp;amp;quot;typedef&amp;amp;quot;

问题描述 c语言程序编译出错error: syntax error before "typedef" 设计的一个顺序循环队列和测试函数,结果编译的时候就有好多error: syntax error before ""不知道要怎么改,求帮助~ 这是我的代码: 头文件: #include typedef struct SeqCQueue { DataType queue[MaxQueueSize]; int MaxQueueSize; int rear; int fro

c++-C++程序编译出错,帮忙修改,可以的话,把修改后的完整程序发上来

问题描述 C++程序编译出错,帮忙修改,可以的话,把修改后的完整程序发上来 #include #include #include #define max 5 typedef struct{ char b;//存储商品名 //商品日期年.月.日 int year; int month; int day; }Data; typedef struct{ Data a[max];//0为栈底位置 int top;//栈顶 }Stack; //初始化空栈 Stack *initstack(){ Stack

C++控制台程序编译出错

问题描述 C++控制台程序编译出错 编译程序时出现错误: f:练习raceracerace.cpp(1): fatal error C1083: 无法打开包括文件:"stdafx.h": No such file or directory 网上的方法都用过了,结果都还是生成失败,请问怎么解决. 解决方案 方案一:可以不使用预编译头,将include "stdafx.h"注释掉,然后直接在文件中直接包含你所需的标准库文件 方案二:可以新建一个工程,然后从解决方案资源管

linux 并行-Linux下MPI+OpenMP程序编译运行出错

问题描述 Linux下MPI+OpenMP程序编译运行出错 如题,错误提示如下: [node65:03787] *** Process received signal *** [node65:03787] Signal: Segmentation fault (11) [node65:03787] Signal code: Address not mapped (1) [node65:03787] Failing at address: 0x44000098 [node65:03787] [ 0

cocos2d-x-小白求救,Cocos2dx代码编译成android程序时出错!

问题描述 小白求救,Cocos2dx代码编译成android程序时出错! 当我使用eclipse去编译Cocos2dx里的proj.android工程时下面的控制台报错:cc1plus.exe: error: unrecognized command line option ""-std=c++11""cc1plus.exe: warning: unrecognized command line option ""-Wno-extern-c-co

c++-这程序编译无报错,运行时出错

问题描述 这程序编译无报错,运行时出错 #include<iostream> int Two(int a, const int* c) { if(a >= *c) return a; else return *c; } int main() { std::cout << "请输入两个数:" ; int a, b, *c; std::cin >> a >> b; *c = b; std::cout << "二者中

visual studio-VS2015编译C++程序总是出错

问题描述 VS2015编译C++程序总是出错 最近新下了个VS2015,编写任何程序生成时总是下图相似的错误,不知道是下载时漏下了什么还是其他什么原因,求指点. 解决方案 vs2015默认不安装windows桌面支持,你重新运行安装程序,选择自定义,勾选C++下所有的选项 解决方案二: vs2015编译gdal出错及解决方案 解决方案三: 你在安装VS有没勾选安装C++插件什么的.

交叉编译-rtems编译出错recipe for &amp;amp;#39;libcrypt_a-crypt.o&amp;amp;#39; failed

问题描述 rtems编译出错recipe for 'libcrypt_a-crypt.o' failed windows:64bit vmware上安装fedora21,64位 参考csdn各种大神们的成功经验,安装好ARM的交叉编译工具,又通过git://git.rtems.org/rtems.git得到最新的源码,编译时突然出现以下问题,请教各位高手该如何解决? Making all in libcrypt gmake[5]: Entering directory '/root/rtemsP

winuser h-vc++ 引入winuser.h编译出错

问题描述 vc++ 引入winuser.h编译出错 源代码:#include #include #include int main(){ return 0 } 编译错误:hotkey.cd:vc6vc6vc98includewinuser.h(39) : error C2061: syntax error : identifier 'HDWP'd:vc6vc6vc98includewinuser.h(39) : error C2059: syntax error : ';'d:vc6vc6vc9