CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 1999
    Posts
    30

    SDI-Formview-EditBox-Controlvariable

    Hi all,
    Can anyone tell me why I get a "Debug Assurtion Failure" when I make a Control-Variable of an editbox???? I doesn't make any sense.

    Student Flanders Language Valley
    Programmer

  2. #2
    Join Date
    Jul 1999
    Location
    India
    Posts
    51

    Re: SDI-Formview-EditBox-Controlvariable

    Debug assertion failures can occur for several reasons. The assertion failures only mean that some pre-requisite condition had been "asserted" which failed the test. But in your case of a control variable, the most common times when an assertion failure occurs is that the control variable's window has not been attached. That is, you're trying to use the control variable before MFC code attaches the actual window handle to the variable (m_hWnd). Try this out: Run the program (don't execute it - press F5) at the time of the assertion failure, select "retry" again. Check the value of your edit control's m_hWnd variable. If it is 0 then you're using the control variable before MFC can attach the handle.

    Hope you found this helpful :-)


    Cheers!
    DP

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