"Debug Assertion Failed at line: 252 in viewcore.CPP"
-
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.
-
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.
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?
-
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.
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