BUG: English Query MFC Sample Gives AV on Win98 (216338)
The information in this article applies to:
- Microsoft English Query 7.0
This article was previously published under Q216338 SYMPTOMS
The English Query Visual C++ MFC sample that ships with SQL Server 7.0, gives an access violation when built and run on Win98. The debugger stops at the following line in the AfxWin2.inl file if run under debug mode:
_AFXWIN_INLINE void CWnd::SetFont(CFont* pFont, BOOL bRedraw)
{ ASSERT(::IsWindow(m_hWnd)); ::SendMessage(m_hWnd, WM_SETFONT, (WPARAM)pFont->GetSafeHandle(), bRedraw); }
CAUSE
The problem is caused by two resources on MFCEQUI_DIALOG that have the same ID.
WORKAROUND
To work around the problem, rename one of the IDs as described below: - Search for "IDC_STATIC" in MfcequiDlg.cpp and replace with IDC_mySTATIC. The MfcequiDlg.cpp file can be found in the
C:\Microsoft English Query\Samples\Mfcui directory. The lines to change are:
Line 222: CWnd *pWnd = GetDlgItem(IDC_STATIC);
Line 230 : SetDlgItemText(IDC_STATIC, "Welcome to Microsoft English Query");
- Change the resource property to say IDC_mySTATIC for the blank static box on MFCEQUI_DIALOG.
- Rebuild the application.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 7/18/2001 |
---|
Keywords: | kbbug kbDatabase KB216338 |
---|
|