Microsoft KB Archive/216338

= BUG: English Query MFC Sample Gives AV on Win98 =

Article ID: 216338

Article Last Modified on 7/18/2001

-

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.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Additional query words: EQ

Keywords: kbbug kbdatabase kbpending KB216338

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.