Lines 869-883
Link Here
|
869 |
HDITEM hdItem = new HDITEM (); |
869 |
HDITEM hdItem = new HDITEM (); |
870 |
hdItem.mask = OS.HDI_WIDTH; |
870 |
hdItem.mask = OS.HDI_WIDTH; |
871 |
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, 0, hdItem); |
871 |
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, 0, hdItem); |
872 |
RECT rect = new RECT (); |
872 |
//RECT rect = new RECT (); |
873 |
OS.SetRect (rect, nmcd.left + hdItem.cxy, nmcd.top, nmcd.right, nmcd.bottom); |
873 |
//OS.SetRect (rect, nmcd.left + hdItem.cxy, nmcd.top, nmcd.right, nmcd.bottom); |
874 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
874 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
|
|
875 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
876 |
int oldPen = OS.SelectObject (hDC, newPen); |
877 |
int [] points = {nmcd.left+hdItem.cxy, nmcd.bottom-1, nmcd.right, nmcd.bottom-1}; |
878 |
OS.Polyline (hDC, points, points.length / 2); |
879 |
OS.SelectObject (hDC, oldPen); |
880 |
OS.DeleteObject (newPen); |
875 |
} |
881 |
} |
876 |
} |
882 |
} |
877 |
} |
883 |
} |
878 |
RECT rect = new RECT (); |
884 |
//RECT rect = new RECT (); |
879 |
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); |
885 |
//OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); |
880 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
886 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
|
|
887 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
888 |
int oldPen = OS.SelectObject (hDC, newPen); |
889 |
int [] points = {nmcd.left, nmcd.bottom-1, nmcd.right, nmcd.bottom-1}; |
890 |
OS.Polyline (hDC, points, points.length / 2); |
891 |
OS.SelectObject (hDC, oldPen); |
892 |
OS.DeleteObject (newPen); |
881 |
} |
893 |
} |
882 |
if (!explorerTheme) { |
894 |
if (!explorerTheme) { |
883 |
if (handle == OS.GetFocus ()) { |
895 |
if (handle == OS.GetFocus ()) { |
Lines 988-996
Link Here
|
988 |
if (OS.IsWindowVisible (handle) && nmcd.left < nmcd.right && nmcd.top < nmcd.bottom) { |
1000 |
if (OS.IsWindowVisible (handle) && nmcd.left < nmcd.right && nmcd.top < nmcd.bottom) { |
989 |
if (hFont != -1) OS.SelectObject (hDC, hFont); |
1001 |
if (hFont != -1) OS.SelectObject (hDC, hFont); |
990 |
if (linesVisible) { |
1002 |
if (linesVisible) { |
991 |
RECT rect = new RECT (); |
1003 |
//RECT rect = new RECT (); |
992 |
OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); |
1004 |
//OS.SetRect (rect, nmcd.left, nmcd.top, nmcd.right, nmcd.bottom); |
993 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
1005 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
|
|
1006 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
1007 |
int oldPen = OS.SelectObject (hDC, newPen); |
1008 |
int [] points = {nmcd.left, nmcd.bottom-1, nmcd.right, nmcd.bottom-1}; |
1009 |
OS.Polyline (hDC, points, points.length / 2); |
1010 |
OS.SelectObject (hDC, oldPen); |
1011 |
OS.DeleteObject (newPen); |
994 |
} |
1012 |
} |
995 |
//TODO - BUG - measure and erase sent when first column is clipped |
1013 |
//TODO - BUG - measure and erase sent when first column is clipped |
996 |
if (hooks (SWT.MeasureItem)) { |
1014 |
if (hooks (SWT.MeasureItem)) { |
Lines 1356-1372
Link Here
|
1356 |
int hDC = nmcd.hdc; |
1374 |
int hDC = nmcd.hdc; |
1357 |
if (hwndHeader != 0) { |
1375 |
if (hwndHeader != 0) { |
1358 |
int x = 0; |
1376 |
int x = 0; |
1359 |
RECT rect = new RECT (); |
1377 |
//RECT rect = new RECT (); |
1360 |
HDITEM hdItem = new HDITEM (); |
1378 |
HDITEM hdItem = new HDITEM (); |
1361 |
hdItem.mask = OS.HDI_WIDTH; |
1379 |
hdItem.mask = OS.HDI_WIDTH; |
1362 |
int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); |
1380 |
int count = OS.SendMessage (hwndHeader, OS.HDM_GETITEMCOUNT, 0, 0); |
|
|
1381 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
1382 |
int oldPen = OS.SelectObject (hDC, newPen); |
1363 |
for (int i=0; i<count; i++) { |
1383 |
for (int i=0; i<count; i++) { |
1364 |
int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0); |
1384 |
int index = OS.SendMessage (hwndHeader, OS.HDM_ORDERTOINDEX, i, 0); |
1365 |
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem); |
1385 |
OS.SendMessage (hwndHeader, OS.HDM_GETITEM, index, hdItem); |
1366 |
OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom); |
1386 |
//OS.SetRect (rect, x, nmcd.top, x + hdItem.cxy, nmcd.bottom); |
1367 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_RIGHT); |
1387 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_RIGHT); |
|
|
1388 |
int [] points = {x + hdItem.cxy - 1, nmcd.top, x + hdItem.cxy - 1, nmcd.bottom - 1}; |
1389 |
OS.Polyline (hDC, points, points.length / 2); |
1368 |
x += hdItem.cxy; |
1390 |
x += hdItem.cxy; |
1369 |
} |
1391 |
} |
|
|
1392 |
OS.SelectObject (hDC, oldPen); |
1393 |
OS.DeleteObject (newPen); |
1370 |
} |
1394 |
} |
1371 |
int height = 0; |
1395 |
int height = 0; |
1372 |
RECT rect = new RECT (); |
1396 |
RECT rect = new RECT (); |
Lines 1381-1393
Link Here
|
1381 |
height = OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0); |
1405 |
height = OS.SendMessage (handle, OS.TVM_GETITEMHEIGHT, 0, 0); |
1382 |
OS.GetClientRect (handle, rect); |
1406 |
OS.GetClientRect (handle, rect); |
1383 |
OS.SetRect (rect, rect.left, rect.top, rect.right, rect.top + height); |
1407 |
OS.SetRect (rect, rect.left, rect.top, rect.right, rect.top + height); |
1384 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
1408 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
|
|
1409 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
1410 |
int oldPen = OS.SelectObject (hDC, newPen); |
1411 |
int [] points = {rect.left, rect.bottom-1, rect.right, rect.bottom-1}; |
1412 |
OS.Polyline (hDC, points, points.length / 2); |
1413 |
OS.SelectObject (hDC, oldPen); |
1414 |
OS.DeleteObject (newPen); |
1385 |
} |
1415 |
} |
|
|
1416 |
int newPen = OS.CreatePen (OS.PS_SOLID, 1, OS.GetSysColor (OS.COLOR_3DFACE)); |
1417 |
int oldPen = OS.SelectObject (hDC, newPen); |
1386 |
while (rect.bottom < nmcd.bottom) { |
1418 |
while (rect.bottom < nmcd.bottom) { |
1387 |
int top = rect.top + height; |
1419 |
int top = rect.top + height; |
1388 |
OS.SetRect (rect, rect.left, top, rect.right, top + height); |
1420 |
OS.SetRect (rect, rect.left, top, rect.right, top + height); |
1389 |
OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
1421 |
//OS.DrawEdge (hDC, rect, OS.BDR_SUNKENINNER, OS.BF_BOTTOM); |
|
|
1422 |
int [] points = {rect.left, top+height-1, rect.right, top+height-1}; |
1423 |
OS.Polyline (hDC, points, points.length / 2); |
1390 |
} |
1424 |
} |
|
|
1425 |
OS.SelectObject (hDC, oldPen); |
1426 |
OS.DeleteObject (newPen); |
1391 |
} |
1427 |
} |
1392 |
} |
1428 |
} |
1393 |
return new LRESULT (OS.CDRF_DODEFAULT); |
1429 |
return new LRESULT (OS.CDRF_DODEFAULT); |