debug assertion failure

This is a discussion on debug assertion failure within the Windows Programming forums, part of the Platform Specific Boards category; i finally got my program up and running, but i get a debug assertion failure in one of my functions: ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    69

    debug assertion failure

    i finally got my program up and running, but i get a debug assertion failure in one of my functions:

    Code:
    void CSignGUIDlg::OnSign() 
    {
    	m_Edit.GetWindowText(m_Get);          //fails on this line
    	m_Size = m_Edit.GetWindowTextLength();
    	m_Data = new BYTE[m_Size];
    	
    	for (int i = 0; i<m_Size; i++)
    	{
    		m_Data[i] = m_Get[i];
    	}
    }
    it fails when it makes the call to
    Code:
    ASSERT(::IsWindow(m_hWnd));
    in wincore.cpp

    i take it there's something that i'm doing wrong? m_Edit is defined as a CEdit type, and m_Get is a CString type. it fails all the time, whether i have text in my box or not.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    59
    change DDX_Control(pDX, IDC_EDIT1, m_string);

    to

    DDX_Control(pDX, IDC_EDIT1, m_Edit);

    in

    signGUIDlg.cpp

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    69
    great! thanks!

    i suppose that's what i get for building my program using the class wizard and not keeping track of things like that

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File I/O Assertion Failure in VS2008
    By clegs in forum C Programming
    Replies: 5
    Last Post: 12-25-2008, 04:47 AM
  2. Debug Assertion failure problem
    By uldaman in forum C++ Programming
    Replies: 8
    Last Post: 01-21-2008, 02:22 AM
  3. Debug Assertion Failure - bad pointer
    By ventolin in forum C++ Programming
    Replies: 5
    Last Post: 05-24-2004, 11:10 AM
  4. Debug Assertion Failure
    By gozlan in forum C Programming
    Replies: 2
    Last Post: 09-08-2002, 12:10 PM
  5. How to tackle a debug assertion failure?
    By juhigarg in forum C++ Programming
    Replies: 2
    Last Post: 11-12-2001, 12:59 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21