如何防止vc程序弹出"确定" "取消"对话框 如何防止vc程序弹出"确定" "取消"对话框 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Hook MessageBox等相关函数,屏蔽其功能即可. 是这样的,我的程序有时会报错误。弹出一个对话框,上面有两个按钮,一个时“确定”一个时“取消”如果想退出程序点击“确定”,如果想调试点击“取消”。#include <WINDOWS.H>#include <LIST>#include <string>#include <IOSTREAM>using namespace std;int main(int argc, char* argv[]){ SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); char *p = NULL; *p = '1'; // pop up a dialog box ,how can i avoid this?? printf("%s",p); return 0;}上面程序中我故意造了一个内存访问出错,现在我不想让客户看见那个对话框,请问怎么做??SetErrorMode行不行? 你的程序应该是资源引用出错,比如说引用了没有赋初值的NULL指针,你想让客户不看到那个“退出和调试”程序的对话框,解决你程序的问题是本质。你好好找找吧,程序肯定有BUG! try{ char *p = NULL; *p = '1'; // pop up a dialog box ,how can i avoid this?? printf("%s",p);}catch(...){ return 0;} 加一个ASSERT() 可以看起来也许好一点 查一下SEH的资料,这个好象的处理错误的,不懂 int main(int argc, char* argv[]){ SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); char *p = NULL; __try{ *p = '1'; }__except(0, 1){ // }// pop up a dialog box ,how can i avoid this?? printf("%s",p); return 0;} GetWindowText和SetWindowTextW以及SetWindowText ocx与web的交互 mfc编译报错,求解释~~o(>_<)o ~~ ado 插入重复数据出错,如何处理,急急急~~~ 用LoadImage() 方法加载bmp图像有大小限制吗? 关于窗口子类化 菜鸟级小问题 怎么判断CAsyncSocket::send是否发送成功? 北京4年工作经验程序员,欲寻求软件兼职工作! 马上给分:ISDN上网的机子有没有IP??? 对一个大文件当中的数据做大量的移动操作,有什么高效的办法? ParseCommandLine(cmdInfo)的错误,高手快来看看啊
#include <LIST>
#include <string>
#include <IOSTREAM>
using namespace std;
int main(int argc, char* argv[])
{
SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
char *p = NULL;
*p = '1'; // pop up a dialog box ,how can i avoid this??
printf("%s",p);
return 0;
}
上面程序中我故意造了一个内存访问出错,现在我不想让客户看见那个对话框,请问怎么做??
SetErrorMode行不行?
你好好找找吧,程序肯定有BUG!
char *p = NULL;
*p = '1'; // pop up a dialog box ,how can i avoid this??
printf("%s",p);
}catch(...){
return 0;
}
{
SetErrorMode(SetErrorMode(0) | SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); char *p = NULL;
__try{
*p = '1';
}__except(0, 1){
//
}// pop up a dialog box ,how can i avoid this??
printf("%s",p);
return 0;
}