Share via


Losing the Selection Focus

4/8/2010

When a Windows Classic Home screen plug-in loses focus, it receives a WM_TODAYCUSTOM_LOSTSELECTION message. Regardless of the value of the Selectability registry key, the plug-in also receives WM_ERASEBKGND and WM_PAINT messages so that it can redraw its content.

Note   The plug-in must call InvalidateRect when it receives the WM_TODAYCUSTOM_LOSTSELECTION message to ensure that it will be refreshed correctly while scrolling.

WM_TODAYCUSTOM_LOSTSELECTION is defined as (WM_USER + 245). The parameters wParam and lParam are not used, and the return value is ignored. For example:

case WM_TODAYCUSTOM_LOSTSELECTION:
   g_bSelected = FALSE;
   break;

See Also

Other Resources

Windows Classic Home Screen Plug-in Selection