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. Help Required for CFormView

Help Required for CFormView

Scheduled Pinned Locked Moved C / C++ / MFC
helpdebugging
1 Posts 1 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.
  • N Offline
    N Offline
    nutkase
    wrote on last edited by
    #1

    AOA! last night as i was trying to do one of my Assignments i tried to open a form using my Class inherted from CFormView! the problem is that i was able to show the form as i want but as i close this window using the CWnd::DestroyWindow() i get an Assert Failure! the Code i am using to initialize the window is as follows: //defined in MyClass.h; CMyClass Form; CMyMainView::OnInitialUpdate() { CView::OnInitialUpdate(); CRect Rect; GetClientRect(Rect); Form.Create(NULL,"NewForm",WS_VISIBLE|WS_BORDER|WS_CHILD,Rect,this,1234,NULL); } And to Destroy the Window CMyMainView::OnFileNew() { Form.DestroyWindow(); } i cant understand y i get the assert failure when i click the new button on the toolbar!:(( the Assert Failure Message i get is as follows: Debug Assertion Failed! Program:E:\Chummi.exe File:dbgheap.c Line:1101 Expression:_CrtIsValideHeapPointer(pUserData) //bla bla bla plz help! shoaib!

    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