VC6.0关闭程序后任务管理器里还有进程没有杀死,怎么办? 我运行程序后,按正常模式退出,结果在任务管理器里还有进程存在,也就是说我的主程序进程不能正常退出,怎么解决呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ////////////////////////////////这是在View里加的一个菜单响应功能void CTextureView::OnEnhanceGabor() { // TODO: Add your command handler code here CTextureDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); CGaborDlg dlg; dlg.m_strTempFile=pDoc->m_strFilePath; if (IDOK==dlg.DoModal()) { //dlg.DestroyWindow(); } }/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// CGaborDlg message handlers TCHAR BitmapFilename[256]; TCHAR outputFilename[256];void CGaborDlg::OnGabor() { // TODO: Add your control notification handler code here sprintf(outputFilename,"Temp.bmp"); // 两种获取文件路径的方法// int i = 0;// int j = 0;// while (BitmapFilename[i] != '\0')// {// if (BitmapFilename[i] == '\\')// j = i;// i++;// }// m_strTempFile=CString(BitmapFilename);// m_inputfile=m_strTempFile.Left(j)+"\\Temp.bmp"; enhancement *enh = new enhancement();// ::SetTimer(this->GetSafeHwnd(),1,4000,NULL); enh->Create(IDD_DIALOG_enhance,this); enh->ShowWindow(SW_SHOW); enh->m_prog.SetRange32(0,100); // enh->m_prog.SetPos(20);// enh->m_text = " Determining the ridge direction ";// enh->m_prog.SetPos(66);// enh->UpdateData(false); strcpy(BitmapFilename,m_inputfile); enhance(enh,BitmapFilename,outputFilename); enh->DestroyWindow(); HBITMAP newBmp; newBmp = (HBITMAP) LoadImage(NULL,outputFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); m_bmp2.SetBitmap(newBmp);}void CGaborDlg::Onbrowse() { // TODO: Add your control notification handler code here GetBitmapFileName(BitmapFilename,sizeof(BitmapFilename) / sizeof(TCHAR), NULL); m_inputfile = CString(BitmapFilename); UpdateData(false); HBITMAP newBmp; newBmp = (HBITMAP) LoadImage(NULL,BitmapFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); m_bmp1.SetBitmap(newBmp);}BOOL CGaborDlg::GetBitmapFileName(TCHAR *filename, int len, HWND hWnd){ OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(OPENFILENAME)); ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = hWnd; ofn.lpstrFilter = _T("Bitmap Files (*.bmp)\0*.bmp\0All Files (*.*)\0*.*\0\0"); ofn.lpstrFile = filename; ofn.nMaxFile = len; ofn.lpstrTitle = _T("Browse"); ofn.Flags = /*OFN_FILEMUSTEXIST |*/ OFN_HIDEREADONLY; return GetOpenFileName(&ofn);}BOOL CGaborDlg::OnInitDialog() { CDialog::OnInitDialog();// GetBitmapFileName(BitmapFilename,sizeof(BitmapFilename) / sizeof(TCHAR), NULL); strcpy(BitmapFilename,m_strTempFile); m_inputfile = CString(BitmapFilename);// UpdateData(false); // TODO: Add extra initialization here // 两种获取文件路径的方法 int i = 0; int j = 0; while (BitmapFilename[i] != '\0') { if (BitmapFilename[i] == '\\') j = i; i++; } // int a=m_strTempFile.ReverseFind('\\'); m_strTempFile=CString(BitmapFilename); m_inputfile=m_strTempFile.Left(j)+"\\Temp.bmp"; UpdateData(FALSE); HBITMAP newBmp; newBmp = (HBITMAP) LoadImage(NULL,m_inputfile, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); m_bmp1.SetBitmap(newBmp); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE} 其他线程中没有没GetMessage循环? 调用DLL不解之处????? CString类的Format函数问题 懂C++的进,有偿 在使用WebBrowser控件时,怎样得到被点击的页面元素的指针? 如何实现ListCtrl行选择时的效果为渐变色? 有没有窗体显示后就直接能执行的函数啊 一个框架问题 请教诸位高手 学过VC++和MATLAB接口的请进来!(灌水也有分) 接口对象查询 用onpaint在对话框中显示图片的时候怎么定图片的位置呢? c/c++ 底层开发的内容
//这是在View里加的一个菜单响应功能void CTextureView::OnEnhanceGabor()
{
// TODO: Add your command handler code here
CTextureDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CGaborDlg dlg;
dlg.m_strTempFile=pDoc->m_strFilePath;
if (IDOK==dlg.DoModal())
{
//dlg.DestroyWindow();
}
}
////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CGaborDlg message handlers
TCHAR BitmapFilename[256];
TCHAR outputFilename[256];
void CGaborDlg::OnGabor()
{
// TODO: Add your control notification handler code here
sprintf(outputFilename,"Temp.bmp");
// 两种获取文件路径的方法
// int i = 0;
// int j = 0;
// while (BitmapFilename[i] != '\0')
// {
// if (BitmapFilename[i] == '\\')
// j = i;
// i++;
// }
// m_strTempFile=CString(BitmapFilename);
// m_inputfile=m_strTempFile.Left(j)+"\\Temp.bmp";
enhancement *enh = new enhancement();
// ::SetTimer(this->GetSafeHwnd(),1,4000,NULL);
enh->Create(IDD_DIALOG_enhance,this);
enh->ShowWindow(SW_SHOW);
enh->m_prog.SetRange32(0,100);
// enh->m_prog.SetPos(20);// enh->m_text = " Determining the ridge direction ";
// enh->m_prog.SetPos(66);
// enh->UpdateData(false);
strcpy(BitmapFilename,m_inputfile);
enhance(enh,BitmapFilename,outputFilename);
enh->DestroyWindow(); HBITMAP newBmp;
newBmp = (HBITMAP) LoadImage(NULL,outputFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
m_bmp2.SetBitmap(newBmp);
}void CGaborDlg::Onbrowse()
{
// TODO: Add your control notification handler code here
GetBitmapFileName(BitmapFilename,sizeof(BitmapFilename) / sizeof(TCHAR), NULL);
m_inputfile = CString(BitmapFilename);
UpdateData(false); HBITMAP newBmp;
newBmp = (HBITMAP) LoadImage(NULL,BitmapFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
m_bmp1.SetBitmap(newBmp);
}BOOL CGaborDlg::GetBitmapFileName(TCHAR *filename, int len, HWND hWnd)
{
OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(OPENFILENAME));
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.hwndOwner = hWnd;
ofn.lpstrFilter = _T("Bitmap Files (*.bmp)\0*.bmp\0All Files (*.*)\0*.*\0\0");
ofn.lpstrFile = filename;
ofn.nMaxFile = len;
ofn.lpstrTitle = _T("Browse");
ofn.Flags = /*OFN_FILEMUSTEXIST |*/ OFN_HIDEREADONLY;
return GetOpenFileName(&ofn);
}BOOL CGaborDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// GetBitmapFileName(BitmapFilename,sizeof(BitmapFilename) / sizeof(TCHAR), NULL);
strcpy(BitmapFilename,m_strTempFile);
m_inputfile = CString(BitmapFilename);
// UpdateData(false); // TODO: Add extra initialization here
// 两种获取文件路径的方法
int i = 0;
int j = 0;
while (BitmapFilename[i] != '\0')
{
if (BitmapFilename[i] == '\\')
j = i;
i++;
}
// int a=m_strTempFile.ReverseFind('\\');
m_strTempFile=CString(BitmapFilename);
m_inputfile=m_strTempFile.Left(j)+"\\Temp.bmp";
UpdateData(FALSE);
HBITMAP newBmp;
newBmp = (HBITMAP) LoadImage(NULL,m_inputfile, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
m_bmp1.SetBitmap(newBmp);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}