The information in this article applies to:
SYMPTOMSThe OnInitDialog() function (which is called in response to a WM_INITDIALOG message) for a CPrintDialog-derived class, was called in MFC prior to Visual C++ 6.0. However, this is no longer true for MFC DLLs of Visual C++ 6.0. Therefore, programs that rely on OnInitDialog() to be called will not work as expected. CAUSEPreviously, MFC set up a message hook for CPrintDialog. This hook was the only way to catch a WM_INITDIALOG message. MFC for Visual C++ 6.0 purposely removed this hook so MFC applications would automatically get the new Print dialog by default on Windows NT 5.0; however, this causes applications that rely on CPringDialog::OnInitDialog() to fail to work. RESOLUTIONSet up the message hook function, _AfxCommDlgProc(), in the constructor of your CPrintDialog-derived class as shown below:
Then, make your project statically linked to MFC.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been fixed in the Visual
Studio 6.0 Service Pack 1. http://msdn.microsoft.com/vstudio/sp/default.aspFor more information on the Visual Studio 6.0 Service Pack 1, please see the following articles in the Microsoft Knowledge Base: Q193009 INFO: Visual Studio 6.0 Service Pack 1 Readme MORE INFORMATIONSteps to Reproduce Behavior
© Microsoft Corporation 1998, All Rights Reserved.
Keywords : kbVC600 kbVS600sp2 kbVS600sp2bug kbVS600sp2fix kbVS600SP1fix kbMFC600bug kbVC600SP1Fix |
Last Reviewed: July 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |