Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2005
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2005 by Ivor Horton; ISBN: 9780764571978
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 17th, 2008, 04:05 AM
Authorized User
 
Join Date: Oct 2005
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 20, p.987 Runtime Error

A runtime error is generated by the assert statement (if pSite == NULL) in the following method in file dlgdata.cpp:

HWND CDataExchange::PrepareCtrl(int nIDC)
{
    ASSERT(nIDC != 0);
    ASSERT(nIDC != -1); // not allowed
    HWND hWndCtrl;
   COleControlSite* pSite = NULL;
    m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl);
    if (hWndCtrl == NULL)
    {
      // Could be a windowless OCX
      pSite = m_pDlgWnd->GetOleControlSite(nIDC);
      if (pSite == NULL)
      {
           TRACE(traceAppMsg, 0, "Error: no data exchange control with ID 0x%04X.\n", nIDC);
           ASSERT(FALSE);
           AfxThrowNotSupportedException();
      }
    }
    m_idLastControl = nIDC;
    m_bEditLastControl = FALSE; // not an edit item by default

   return hWndCtrl;
}

As I did not write this code, I have no idea what it means. Can anybody help?

Dan Crossley
__________________
Dan Crossley





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 20 masegui JSP Basics 0 April 1st, 2004 07:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.