LRESULT wmColorChild(int /*long*/ wParam, int /*long*/ lParam) { LRESULT result = super.wmColorChild(wParam, lParam); /* * Feature in Windows. When a SysLink is disabled, it does * not gray out the non-link portion of the text. The fix * is to set the text color to the system gray color. */ if (OS.COMCTL32_MAJOR >= 6) { if (!OS.IsWindowEnabled(handle)) { OS.SetTextColor(wParam, OS.GetSysColor(OS.COLOR_GRAYTEXT)); if (result == null) { int backPixel = getBackgroundPixel(); OS.SetBkColor(wParam, backPixel); int /*long*/ hBrush = findBrush(backPixel, OS.BS_SOLID); return new LRESULT(hBrush); } } } return result; }