how to solve the following problem?
-
dear all any problem? i couldn't find. thanks a lot
void CMeiTengDlg::OnPause()
{
// TODO: Add your control notification handler code here
if(Pause)
{
m_Pause.SetWindowText("Pause");
MCIWndResume(m_Video);
Pause = FALSE;
}
else
{
m_Pause.SetWindowText("UnPause");
MCIWndPause(m_Video);
Pause = TRUE;
}
}void CMeiTengDlg::OnBrowse()
{
// TODO: Add your control notification handler code here
m_Video = NULL;
if(m_Video == NULL)
{
CFileDialog avi(TRUE,NULL,NULL,OFN_HIDEREADONLY,"MP3 Files (*.mp3)|*.mp3|AVI Files(*.avi)|*.avi|");
if(avi.DoModal() == IDOK)
{
m_Path = avi.GetPathName();
UpdateData(FALSE);} }
}
the resilt of compiling:
MeiTengDLg.cpp
.\MeiTengDLg.cpp(235) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\MeiTengDLg.cpp(241) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [8]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\MeiTengDLg.cpp(277) : error C2664: 'CFileDialog::CFileDialog(BOOL,LPCTSTR,LPCTSTR,DWORD,LPCTSTR,CWnd *,DWORD,BOOL)' : cannot convert parameter 5 from 'const char [48]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\ZhiYuan Li\Desktop\MeiTeng\MeiTeng\Release\BuildLog.htm"
MeiTeng - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== -
dear all any problem? i couldn't find. thanks a lot
void CMeiTengDlg::OnPause()
{
// TODO: Add your control notification handler code here
if(Pause)
{
m_Pause.SetWindowText("Pause");
MCIWndResume(m_Video);
Pause = FALSE;
}
else
{
m_Pause.SetWindowText("UnPause");
MCIWndPause(m_Video);
Pause = TRUE;
}
}void CMeiTengDlg::OnBrowse()
{
// TODO: Add your control notification handler code here
m_Video = NULL;
if(m_Video == NULL)
{
CFileDialog avi(TRUE,NULL,NULL,OFN_HIDEREADONLY,"MP3 Files (*.mp3)|*.mp3|AVI Files(*.avi)|*.avi|");
if(avi.DoModal() == IDOK)
{
m_Path = avi.GetPathName();
UpdateData(FALSE);} }
}
the resilt of compiling:
MeiTengDLg.cpp
.\MeiTengDLg.cpp(235) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [6]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\MeiTengDLg.cpp(241) : error C2664: 'CWnd::SetWindowTextW' : cannot convert parameter 1 from 'const char [8]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
.\MeiTengDLg.cpp(277) : error C2664: 'CFileDialog::CFileDialog(BOOL,LPCTSTR,LPCTSTR,DWORD,LPCTSTR,CWnd *,DWORD,BOOL)' : cannot convert parameter 5 from 'const char [48]' to 'LPCTSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\ZhiYuan Li\Desktop\MeiTeng\MeiTeng\Release\BuildLog.htm"
MeiTeng - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========I think you've enabled
unicode
in your project settings. Enclose all your strings inside_T()
macro like as follows, so that they will switch accordingly to eitheransi
orunicode
strings.m_Pause.SetWindowText( _T("Pause") );
Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.