是不是ASSERT内部包含代码了?
解决方案 »
- 请教:对直接接收的邮件附件进行base64解码,为什么出现了数据丢失。
- vista,64位环境下build出来的64位的COM组件无法注册
- 最近登陆不了Google的xdjm,试试这个网站www.baigoogledu.com
- 如何动态的在状态栏添加一个进度条?
- 制作安装文件,知道的请进!!!
- 100 分求解!UpdateData(TRUE)到底是什么时候用在什么地方?[MFC 初学者,希望大家不要BS我]
- 还是关于list ctrl 的问题啊??
- 请问Win98下运用Clipboard在Paste时系统是如何区分是Copy还是Cut?
- 在线散分,求一个简单sql语句.
- 求助:在窗口中播放视频遇到问题
- 快来看看!。。。。。。。。。。。。。。。
- vc菜鸟问题,高手请帮忙!!!!
void CGh2Dlg::OnSave()
{
this->UpdateData(true);
long work;
long pass;
int Line[64];
for (int k=0;k<64;k++)
{
Line[k]=100;
}
if ((m_work==0)||(m_pass==0))
{
MessageBox("请检查您的工号和密码!");
return;
}
work=m_work;
pass=m_pass;
CString str;
str.Format("%d",work);
str+=" "; if (m_bChoiceAll)
{
for (int iii=0;iii<64;iii++)
{
Line[iii]=200;
}
str+="全选";
m_CtrListMessage.AddString(str);
}
else
{
bool is_NotChoice=false;
bool is_allChoice=false;
for (int j=0;j<32;j++)
{
CButton* pButton=(CButton*)GetDlgItem( IDC_CHECK1+j );
if (pButton->GetState())
{
is_NotChoice=true;
break;
}
}
for (int jj=0;jj<32;jj++)
{
CButton* pButton=(CButton*)GetDlgItem( IDC_CHECK33+jj );
if (pButton->GetState())
{
is_NotChoice=true;
break;
}
}
for (int jjj=0;jjj<32;jjj++)
{
CButton* pButton=(CButton*)GetDlgItem( IDC_CHECK1+jjj );
if (!pButton->GetState())
{
is_allChoice=true;
break;
}
}
for (int jjjj=0;jjjj<32;jjjj++)
{
CButton* pButton=(CButton*)GetDlgItem( IDC_CHECK33+jjjj );
if (!pButton->GetState())
{
is_allChoice=true;
break;
}
}
if (!is_NotChoice)
{
MessageBox("请选择线路!");
return;
}
if (!is_allChoice)
{
MessageBox("请您直接选择全选!");
return;
}
for (int i=0;i<32;i++)
{
CButton* pButton=(CButton*)GetDlgItem( IDC_CHECK1+i );
int flag;
flag=pButton->GetState();
if (flag)
{
Line[i]=i;
CString str1;
str1.Format("%d",Line[i]);
str+=" ";
str+=str1;
}
else
Line[i]=100;
}
for (int k=0;k<32;k++)
{
CButton *pButton=(CButton*)this->GetDlgItem(IDC_CHECK33+k);
if (pButton->GetState())
{
Line[32+k]=(32+k);
CString str1;
str1.Format("%d",Line[32+k]);
str+=" ";
str+=str1;
}
else
Line[32+k]=100;
}
m_CtrListMessage.AddString(str);
}
char lpszPathName[20];
sprintf( lpszPathName, "C:\\Program Files\\录音\\telrecord\\f.lll");
if( _access(lpszPathName, 0)!=0 )
_mkdir( lpszPathName );
CFile file;
file.Open(lpszPathName,CFile::modeWrite);
file.SeekToEnd();
file.Write(&work,sizeof(long));
file.Write(&pass,sizeof(long));
for (int l=0;l<64;l++)
{
file.Write(&Line[l],sizeof(int));
}
file.Close();
for (int i=0;i<32;i++)
{
CButton *pButton=(CButton*)this->GetDlgItem(IDC_CHECK1+i);
pButton->SetCheck(0);
}
for (int ii=0;ii<32;ii++)
{
CButton *pButton=(CButton*)this->GetDlgItem(IDC_CHECK33+ii);
pButton->SetCheck(0);
}
}
BOOL CGh2Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
CFile file = NULL;
long work;
long pass;
int linex[64];
char szFileName[20];
sprintf( szFileName, "C:\\Program Files\\录音\\telrecord\\f.lll");
if( !file.Open(szFileName, CFile::modeRead) ){
AfxMessageBox("读文件f.lll!");
return FALSE;
}
int readLength=0;
int stateLength=file.GetLength();
if ((stateLength%264)!= 0 )
{
AfxMessageBox("文件存储出现问题!");
file.Close();
return FALSE;
}
file.SeekToBegin();
while (readLength<stateLength)
{
CString str,str1;
file.Read(&work, sizeof(long));
file.Read(&pass,sizeof(long));
str1.Format("%d",work);
str+=str1;
if (work==0)
{
file.Read(linex,64*sizeof(int));
readLength+=264;
continue;
}
else
{
int is_choice=0;
for (int i=0;i<64;i++)
{
int Line=100;
file.Read(&Line,sizeof(int));
if (Line==200)
{
str+=" 全选";
m_CtrListMessage.AddString(str);
file.Seek(252,CFile::current);
break;
}
else if (Line!=100)
{
CString str2;
str2.Format("%d",Line);
str+=" ";
str+=str2;
is_choice++;
}
}
if(is_choice!=0)
m_CtrListMessage.AddString(str);
readLength+=264;
}
}
file.Close();
return TRUE; // return TRUE unless you set the focus to a control
}
cout<<++c<<++c<<++c;以上的程序在vc里面两种编译的结果都不一样,天知道.