Skip to content

Commit b2afb71

Browse files
committed
Disable HeaderCustomDraw on Windows 7
1 parent 04e2825 commit b2afb71

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

phlib/treenew.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,8 @@ BOOLEAN PhTnpOnCreate(
464464
Context->CustomSelectedColor = GetSysColor(COLOR_HIGHLIGHT);
465465
}
466466

467-
if (Context->Style & TN_STYLE_CUSTOM_HEADERDRAW)
467+
// TODO: HeaderCustomDraw doens't support classic theme on Windows 7 (dmex)
468+
if (Context->Style & TN_STYLE_CUSTOM_HEADERDRAW && WindowsVersion > WINDOWS_7)
468469
Context->HeaderCustomDraw = TRUE;
469470

470471
if (!(Context->FixedHeaderHandle = CreateWindow(
@@ -5450,7 +5451,9 @@ VOID PhTnpPaint(
54505451
// InvalidateRect(Context->FixedHeaderHandle, NULL, FALSE);
54515452
//}
54525453

5453-
// TODO: This invalidates the whole header even when nothing changes.
5454+
// TODO:
5455+
// 1) PhTickProcessNodes excludes the header when invalidating the treelist.
5456+
// 2) This invalidates the whole header even when nothing changes.
54545457
// We can add a callback similar to TreeNewGetHeaderText that returns TRUE
54555458
// for headers that have custom text and need invalidating? (dmex)
54565459

0 commit comments

Comments
 (0)