BUG: The JScript onFocus event does not occur when the IESample browser window receives focus in Windows CE 5.0 and in Windows CE Platform Builder 4.2 (888169)
The information in this article applies to:
- Microsoft Windows CE 5.0
- Microsoft Windows CE Platform Builder 4.2
SYMPTOMSThe Microsoft JScript onFocus event does not occur when the IESample browser window receives focus. This problem occurs when an HTML page uses the onFocus event in the document body.CAUSEThis problem occurs because a bug exists in the sample source code for the IESample browser that is included with Microsoft Windows CE 5.0 and with Microsoft Windows CE Platform Builder 4.2.WORKAROUNDTo work around this problem, you must modify the sample source code for the IESample browser. To do this, follow these steps: - Open the following source file:
%WinCERoot%\Public\IE\Oak\IESample\Core\Mainwnd.cpp - Locate the CMainWnd::BrowseWndProc function.
- Locate the WM_SETFOCUS message in the function that you located in step 2.
- Change case WM_SETFOCUS: to case WM_ACTIVATE:.
- The modified code will look similar to the following.
LRESULT CMainWnd::BrowseWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
CMainWnd *pMainWnd = this;
if (pMainWnd)
{
switch (message)
{
...
//The following is the only modified line.
case WM_ACTIVATE:
if (pMainWnd->_pIPActiveObj)
{
pMainWnd->_pIPActiveObj->OnFrameWindowActivate(LOWORD(wParam) != WA_INACTIVE);
}
return 0;
...
}
}
}
- Save the source file, and then rebuild the IESample application.
STATUS Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
| Modification Type: | Major | Last Reviewed: | 12/15/2004 |
|---|
| Keywords: | kbbug KB888169 kbAudDeveloper |
|---|
|