[ros-diffs] [janderwald] 23718: * show selected static control via DrawFocusRect

janderwald at svn.reactos.org janderwald at svn.reactos.org
Sat Aug 26 15:43:15 CEST 2006


Author: janderwald
Date: Sat Aug 26 17:43:15 2006
New Revision: 23718

URL: http://svn.reactos.org/svn/reactos?rev=23718&view=rev
Log:
* show selected static control via DrawFocusRect

Modified:
    trunk/reactos/dll/win32/console/colors.c

Modified: trunk/reactos/dll/win32/console/colors.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/console/colors.c?rev=23718&r1=23717&r2=23718&view=diff
==============================================================================
--- trunk/reactos/dll/win32/console/colors.c (original)
+++ trunk/reactos/dll/win32/console/colors.c Sat Aug 26 17:43:15 2006
@@ -47,6 +47,10 @@
 
 	FillRect(drawItem->hDC, &drawItem->rcItem, hBrush);
     DeleteObject((HGDIOBJ)hBrush);
+	if (pConInfo->ActiveStaticControl == index)
+	{
+		DrawFocusRect(drawItem->hDC, &drawItem->rcItem);
+	}
 	return TRUE;
 }
 
@@ -213,7 +217,6 @@
 			{
 				DWORD index = LOWORD(wParam) - IDC_STATIC_COLOR1;
 
-				pConInfo->ActiveStaticControl = index;
 				SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_RED, GetRValue(s_Colors[index]), FALSE);
 				SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_GREEN, GetGValue(s_Colors[index]), FALSE);
 				SetDlgItemInt(hwndDlg, IDC_EDIT_COLOR_BLUE, GetBValue(s_Colors[index]), FALSE);
@@ -235,8 +238,11 @@
 				{
 					pConInfo->PopupBackground = s_Colors[index];
 				}
+				InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + pConInfo->ActiveStaticControl), NULL, TRUE);
+				InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_COLOR1 + index), NULL, TRUE);
 				InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_SCREEN_COLOR), NULL, TRUE);
 				InvalidateRect(GetDlgItem(hwndDlg, IDC_STATIC_POPUP_COLOR), NULL, TRUE);
+				pConInfo->ActiveStaticControl = index;
 				break;
 			}
 		}




More information about the Ros-diffs mailing list