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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. "Debug Assertion Failed at line: 252 in viewcore.CPP"

"Debug Assertion Failed at line: 252 in viewcore.CPP"

Scheduled Pinned Locked Moved C / C++ / MFC
debugginghelpc++
3 Posts 3 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
    manoharbalu
    wrote on last edited by
    #1

    I have used a tabcontrol which should show different views for each tabs. As a trial, I have created a CView class and tried to show it for the first tab. When I select the tab, the appropriate view ( white screen view) is showing. The problem is when I click on the view, it throws an assertion "Debug Assertion Failed at line: 252 in viewcore.CPP". I have added the below code for selection of tabs. if (nTab == 0) { CRect clientRect; m_cTabCtrl.GetClientRect(&clientRect); clientRect.DeflateRect(5, 18); CTrendview *m_pNewView = new CTrendview(); // Creation of the view window if(! m_pNewView->Create(NULL, NULL, WS_VISIBLE | WS_CHILD, clientRect, &m_cTabCtrl, 1)) { TRACE( "Failed view creation\n" ); } m_pNewView->ShowWindow(SW_SHOW); } Please help me to find a solution for this problem.

    V D 2 Replies Last reply
    0
    • M manoharbalu

      I have used a tabcontrol which should show different views for each tabs. As a trial, I have created a CView class and tried to show it for the first tab. When I select the tab, the appropriate view ( white screen view) is showing. The problem is when I click on the view, it throws an assertion "Debug Assertion Failed at line: 252 in viewcore.CPP". I have added the below code for selection of tabs. if (nTab == 0) { CRect clientRect; m_cTabCtrl.GetClientRect(&clientRect); clientRect.DeflateRect(5, 18); CTrendview *m_pNewView = new CTrendview(); // Creation of the view window if(! m_pNewView->Create(NULL, NULL, WS_VISIBLE | WS_CHILD, clientRect, &m_cTabCtrl, 1)) { TRACE( "Failed view creation\n" ); } m_pNewView->ShowWindow(SW_SHOW); } Please help me to find a solution for this problem.

      V Offline
      V Offline
      Victor Nijegorodov
      wrote on last edited by
      #2

      manoharbalu wrote:

      The problem is when I click on the view, it throws an assertion "Debug Assertion Failed at line: 252 in viewcore.CPP".

      And what is the code "at line: 252 in viewcore.CPP" and some lines above it?

      1 Reply Last reply
      0
      • M manoharbalu

        I have used a tabcontrol which should show different views for each tabs. As a trial, I have created a CView class and tried to show it for the first tab. When I select the tab, the appropriate view ( white screen view) is showing. The problem is when I click on the view, it throws an assertion "Debug Assertion Failed at line: 252 in viewcore.CPP". I have added the below code for selection of tabs. if (nTab == 0) { CRect clientRect; m_cTabCtrl.GetClientRect(&clientRect); clientRect.DeflateRect(5, 18); CTrendview *m_pNewView = new CTrendview(); // Creation of the view window if(! m_pNewView->Create(NULL, NULL, WS_VISIBLE | WS_CHILD, clientRect, &m_cTabCtrl, 1)) { TRACE( "Failed view creation\n" ); } m_pNewView->ShowWindow(SW_SHOW); } Please help me to find a solution for this problem.

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

        manoharbalu wrote:

        The problem is when I click on the view...I have added the below code for selection of tabs.

        But what does the code look like that responds to the view being clicked?

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        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