Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Assertion failed

Assertion failed

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mosali satish
    wrote on last edited by
    #1

    hi i have developed a GUI in which i have used static LED which is provided by Digistatic .h.i have added a combo box to it , created a member for it and executed the application.when iam closing the application assertion failed message is being displayed. this message is being display only when i try to create an object of the class to which the control belongs to ( for ex CComboBox m_cmbBaudrate).when i create a member as (string m_cmbBaudrate ) it is not giving any message. so please can anyone help me to sort out this issue.

    sathish

    H N D 3 Replies Last reply
    0
    • M mosali satish

      hi i have developed a GUI in which i have used static LED which is provided by Digistatic .h.i have added a combo box to it , created a member for it and executed the application.when iam closing the application assertion failed message is being displayed. this message is being display only when i try to create an object of the class to which the control belongs to ( for ex CComboBox m_cmbBaudrate).when i create a member as (string m_cmbBaudrate ) it is not giving any message. so please can anyone help me to sort out this issue.

      sathish

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #2

      Did you use of breakpoints and debugger for see error?

      1 Reply Last reply
      0
      • M mosali satish

        hi i have developed a GUI in which i have used static LED which is provided by Digistatic .h.i have added a combo box to it , created a member for it and executed the application.when iam closing the application assertion failed message is being displayed. this message is being display only when i try to create an object of the class to which the control belongs to ( for ex CComboBox m_cmbBaudrate).when i create a member as (string m_cmbBaudrate ) it is not giving any message. so please can anyone help me to sort out this issue.

        sathish

        N Offline
        N Offline
        Nelek
        wrote on last edited by
        #3

        Most probably will be a failure with your destructor. The controls need a handler to the parent window. and when you close, and the destructor o the window try to call the destructor of the control. The control has no owner and he asserts. Is the same as if u want to load some strings in the CComboBox inside the constructor of the dialog, you will have the same assertion. You have to load the datas in OnInitDialog or OnInitialUpdate, insteads of in the constructor. With the CString you dont have any problem because they are not having such issues. Take a look where you use the CComboBox and try debugging step by step to find out the secuence o opening/ closing a dialog. I did that using all the messages in relation with creating/destroying a Dialog and just putting an AfxMessageBox with the name of the message calling it and some text inside

        Greetings. -------- M.D.V. If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you ;)

        1 Reply Last reply
        0
        • M mosali satish

          hi i have developed a GUI in which i have used static LED which is provided by Digistatic .h.i have added a combo box to it , created a member for it and executed the application.when iam closing the application assertion failed message is being displayed. this message is being display only when i try to create an object of the class to which the control belongs to ( for ex CComboBox m_cmbBaudrate).when i create a member as (string m_cmbBaudrate ) it is not giving any message. so please can anyone help me to sort out this issue.

          sathish

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          mosali satish wrote:

          i have developed a GUI in which i have used static LED which is provided by Digistatic .h.

          I did this once here.

          mosali satish wrote:

          when iam closing the application assertion failed message...

          What line of what file is asserting?


          "Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

          "To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups