CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Feb 2012
    Location
    chinese
    Posts
    9

    Unhappy 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.....
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured