BUG: English Query MFC Sample Gives AV on Win98ID: Q216338
|
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); }
The problem is caused by two resources on MFCEQUI_DIALOG that have the same ID.
To work around the problem, rename one of the IDs as described below:
Line 222: CWnd *pWnd = GetDlgItem(IDC_STATIC);
Line 230 : SetDlgItemText(IDC_STATIC, "Welcome to Microsoft English Query");
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
Additional query words: EQ
Keywords : kbDatabase kbMFC kbVC kbEngQuery
Version : NT:7.0
Platform : NT
Issue type : kbbug
Last Reviewed: June 8, 1999