FIX: ???? ?????? CDialog::Create() ???? ??? ????? ??? ????? ???? ???? ?? Visual C++

?????? ????????? ?????? ?????????
???? ???????: 193099 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

???????

??? ?? ????? ???? ???? ??? ??????? CDialog::Create() ?????? OnInitDialog() (???? ??? ??????? WM_INITDIALOG) ???? ?????? ?? ???? ?????? ??? EndDialog() ? ???? ?????? CDialog::Create() ???? ??? ?????. CDialog::Create() ?? ??? ?????? ??? ????? ???.

???? ?? ????? ???? ?????? ???? ??? ??????? EndDialog() ?? ???? ?????? OnInitDialog() ? CDialog::m_hWnd ?? ??? ?????? ?? NULL.

?????

?? ????? ?????? ????? ?? ??? WM_INITDIALOG (??? ??? 365 Dlgcore.cpp) ? ??? ???? ??? ???? Create() ??? ??? ??? ???? ?????? NULL.

??? MFC 5.0 Visual C++:
BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,

      CWnd* pParentWnd, HINSTANCE hInst)

   {

      // ...

      if (hWnd == NULL)
      {
         // ...
         // .. dump some debug information
         return FALSE;
      }

      ASSERT(hWnd == m_hWnd);
      return TRUE;
   }
				
??? MFC 6.0 Visual C++:
BOOL CWnd::CreateDlgIndirect(LPCDLGTEMPLATE lpDialogTemplate,

      CWnd* pParentWnd, HINSTANCE hInst)

   {

      // ...
      // Help with error diagnosis (only if WM_INITDIALOG didn't
      // EndDialog())
      if (hWnd == NULL && (m_nFlags &amp; WF_CONTINUEMODAL)) // <--- PROBLEM!!!

{
         // ... dump some debug information.
         return FALSE;
      }

      ASSERT(hWnd == m_hWnd);
      return TRUE;

   }
				

????

??? ??????? CDialog::Create ?????? ?? ???? ??????? CDialog::Create() ???? CDialog::m_hWnd. ??? ??? CDialog::m_hWnd NULL ? ?? ????? ???? ?????? ??? ?????.

?????

???? Microsoft ?? ???? ??? ?? Microsoft ??? ??? ???????? ?? ????? ??? ???????. ?? ????? ??? ??????? ?? Visual Studio 6.0 ?????? ????? ?????? Service Pack 1.

?????? ??? ???? ?????? ???, ?????? ??????:
http://msdn2.microsoft.com/en-us/vstudio/Aa718362.aspx
?????? ??? ???? ?? ????????? ??? Visual Studio 6.0 ?????? ????? ?????? Service Pack 1 ?????? ?????? ???????? ??????? ?? "????? ????? Microsoft:
193009 INFO: Visual Studio 6.0 Service Pack 1 Readme

194022 Visual Studio 6.0 service packs, what, where, why

194295 How To Tell That a Visual Studio Service Pack Is Installed

??????? ????

????? ????????? ???????? ???? ???? ?????? ??? ????? ????? ????? ????? CDialog::m_hWnd. ??? ???? ??????:
 
   // Create a modeless dialog box. In this example, m_pModeless is a
   // member variable of type CModeless where CModeless is a CDialog-
   // derived class. IDD_MODELESS is the ID number of a dialog-box template
   // resource.
   m_pModeless = new CModeless;
   if (m_pModeless->Create(IDD_MODELESS, this) &&
      ::IsWindow(m_pModeless->m_hWnd))
   {
      // ... succeeded in dialog-box creation.
   }
   else
   {
      // ... failed in dialog-box creation.
   }
				

????? ????? ????? ??????

  1. ??? ????? MFC MODELESS ?? ??????? ???????? MSDN.
  2. ?????? ClassWizard ?????? ????? ????? OnInitDialog() (???? ??? ??????? WM_INITDIALOG) ??? ??? CAdderDialog. ???? CAdderDialog ??? ????? CDialog.
  3. ??????? EndDialog() ?? CAdderDialog::OnInitDialog() ??? ???:
       BOOL CAdderDialog::OnInitDialog()
       {
          CDialog::OnInitDialog();
    
          // TODO: Add extra initialization here
          EndDialog(-1);
          return TRUE;  // return TRUE unless you set the focus to a control
                   // EXCEPTION: OCX Property Pages should return FALSE
       }
    					
  4. ??? ????? ??????? Win32 ?? VC ++ ????? ??? ??????? Build\Set ????? Active Directory.
  5. ????? ?? ?? ?????? ??????? ??? ?????.
  6. ???? ??? ????? ?? ???? ??????. ??????? m_pModeless->Create() ?? ??? Modeldlg.cpp (?? ????? 178) ?????? TRUE ???? ???? "?????" (?? ??? ??? ???? ???? ??? ????? CAdderDialog) ?? ??? ?????? ??? ?????.
(c) 1999 ???? Microsoft ? ???? ???? ?????. ????????? ??? Kah Yeong Tam ? Microsoft Corporation.

???????

???? ???????: 193099 - ????? ??? ??????: 24/???? ??????/1435 - ??????: 6.2
????? ???
  • Microsoft Foundation Class Library 4.2, ????? ?????? ??:
    • Microsoft Visual C++ 5.0 Professional Edition
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 5.0 Learning Edition
    • Microsoft Visual C++ 6.0 Enterprise Edition
    • Microsoft Visual C++ 6.0 Professional Edition
    • Microsoft Visual C++, 32-bit Learning Edition 6.0
????? ??????: 
kbnosurvey kbarchive kbmt kbfunctions kbqfe kbbug kbdlg kbfix kbnoupdate kbvc600sp1fix kbvs600sp1fix KB193099 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????193099

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com