4 Attachment(s)
A unbelievable breakpoint
env : vs 2005
lan : c++
os : xp
During I using vs2005 to develop a program,I encounter a very strange problem,detail:
when i create a button called "IDC_BTN_LOG",the create action:
//画日志按钮
m_logBtn.Create(NULL,WS_CHILD | WS_VISIBLE ,CRect(560,150,560+65,150+65),this,IDC_BTN_LOG);
m_logBtn.SetImage(IDB_BITMAP_LOGNORMAL,IDB_BITMAP_LOGHOVER,IDB_BITMAP_LOGDOWN,IDB_BITMAP_CLOSENORMAL);
the message map:
ON_BN_CLICKED(IDC_BTN_LOG, &CMarsWatchingDlg::OnBnClickedLog)
the reaction function:
void CMarsWatchingDlg::OnBnClickedLog()
{
// TODO: 在此添加控件通知处理程序代码
CLogDlg dlg1;
dlg1.DoModal();
}
and then I add a breakpoint at here:
void CMarsWatchingDlg::OnBnClickedLog()
{
// TODO: 在此添加控件通知处理程序代码
* CLogDlg dlg1;
dlg1.DoModal();
}
at the position "*",when i click button IDC_BTN_LOG,i want they jump to the function OnBnClickedLog(),but an unbelievable situation occur,the jump to
void CMarsWatchingDlg::OnBnClickedLog()
{
// TODO: 在此添加控件通知处理程序代码
CLogDlg dlg1;
dlg1.DoModal();
}
void CMarsWatchingDlg::OnBnClickedConfig()
{
// TODO: 在此添加控件通知处理程序代码
CConfigDlg dlg1;
dlg1.DoModal();
}
void CMarsWatchingDlg::OnBnClickedUpdate()
{
// TODO: 在此添加控件通知处理程序代码
-> CUpdateDlg dlg1;
dlg1.DoModal();
}
here "->",i have no idea why they jump to there?So i clear the obj,and then recompile,and then this situation occur again,does someone encounter this situation?
I need help,Thanks very much.....
Re: A unbelievable breakpoint
- Check if you have unique (button) resource IDs in resource.h file.
- Be sure you are working with a DEBUG build configuration.
- Be sure you have disabled compiler optimizations (/Od).
1 Attachment(s)
Re: A unbelievable breakpoint
First thank for you attention...
yes,this resource ID is unique in resource.h file.
and I am working in the DEBUG mode,compile optimizations is disable
occasionally i found if i copy this program to another machine,and it works well
.....these two machine have same environment(vs2005)...this situation bother me for
several days ,does somebody can help me..
Re: A unbelievable breakpoint
Try to delete .ncb, .opt, .aps files.
Then try to Rebuild All
Re: A unbelievable breakpoint
Thx,yesterday night,i reinstalled my os,and then the problem disappeared,so i have no idea about whether the .ncb, .opt and .aps files cause this problem
But still thanks all
Re: A unbelievable breakpoint
Quote:
Originally Posted by
charles_ch
Thx,yesterday night,i reinstalled my os,and then the problem disappeared,so i have no idea about whether the .ncb, .opt and .aps files cause this problem
Before blowing up your computer or simply reinstalling everything, it's good to try first less radical solutions like the one suggested by Victor. :)
What about if that will happen again tomorrow?
Re: A unbelievable breakpoint
I know this thread has been pretty out-of-date up to now. But it makes me smile to wonder if the installation of a large application such as Visual Studio can damage the OS itself. What a little surprise! :)
Re: A unbelievable breakpoint
Quote:
Originally Posted by
thefollower
I know this thread has been pretty out-of-date up to now. But it makes me smile to wonder if the installation of a large application such as Visual Studio can damage the OS itself. What a little surprise! :)
No, the instalation or a large application such as Visual Studio CANNOT damage the Windows OS itself.
[ Later edit ]
Smile in your dreams! :)