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. Not access to child dialog object... Assert Error..

Not access to child dialog object... Assert Error..

Scheduled Pinned Locked Moved C / C++ / MFC
visual-studiodata-structureshelpquestion
2 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.
  • A Offline
    A Offline
    aquawicket
    wrote on last edited by
    #1

    Not able to access child dialog object, Assert Error.. //Pointers to dialogs CDialog * pCMyApp; CDialog * pCChildDialogs[5]; //array of dialogs . . . void CMyApp::function() { //trying to SetWindowText to one of the child dialogs objects. pCChildDialog[0]->GetDialogItem(IDC_STATIC1)->SetWindowText(mystring); //MVS2005 intelliSense shows this path ok } Other functions "PCChildDialog[N]->???" seem to work fine within this CMyApp function. But in this situation I get an Assert Error.. and it drops me off here void CWnd::SetWindowsText(LPCTSTR lpszString) { ...... ENSURE(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); <------------

    A 1 Reply Last reply
    0
    • A aquawicket

      Not able to access child dialog object, Assert Error.. //Pointers to dialogs CDialog * pCMyApp; CDialog * pCChildDialogs[5]; //array of dialogs . . . void CMyApp::function() { //trying to SetWindowText to one of the child dialogs objects. pCChildDialog[0]->GetDialogItem(IDC_STATIC1)->SetWindowText(mystring); //MVS2005 intelliSense shows this path ok } Other functions "PCChildDialog[N]->???" seem to work fine within this CMyApp function. But in this situation I get an Assert Error.. and it drops me off here void CWnd::SetWindowsText(LPCTSTR lpszString) { ...... ENSURE(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL)); <------------

      A Offline
      A Offline
      aquawicket
      wrote on last edited by
      #2

      Hehe, go figure.. get stumped on something for hours and figure it out only seconds after writing a post.. pCChildDialog[0]->SetDlgItemTextW(IDC_STATIC1, mystring); //This fixed it :)

      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