ListView_GetIconBufferX函数和ListView_GetIconBufferY函数和RECT结构的关系
第一部分:
[+0x0c8] cxIconSpacing : 75 [Type: int]
[+0x0cc] cyIconSpacing : 75 [Type: int]
[+0x0d0] himl : 0x916d8 [Type: _IMAGELIST *]
[+0x0d4] cxIcon : 32 [Type: int]
(75-32)/2=21
// Get the buffer around an item for rcView calculations and slot offsets
int ListView_GetIconBufferX(LV* plv)
{
if (ListView_IsIconView(plv))
{
return (plv->cxIconSpacing - plv->cxIcon) / 2;
}
else if (ListView_IsTileView(plv))
return g_cxLabelMargin;
else
return 0;
}
#define g_cyIconOffset (g_cyBorder * 2) // NOTE: Must be >= cyIconMargin!
1: kd> x comctl32!g_cyBorder
6f6c6560 comctl32!g_cyBorder = 0n1
int ListView_GetIconBufferY(LV* plv)
{
if (ListView_IsIconView(plv))
return g_cyIconOffset;
else if (ListView_IsTileView(plv))
return g_cyIconMargin;
else
return 0;
}
第二部分:
1: kd> dt RECT
Explorer!RECT
+0x000 left : Int4B
+0x004 top : Int4B
+0x008 right : Int4B
+0x00c bottom : Int4B
1: kd> dv
rcIcon = {LT(304, 431) RB(357, 465) [53 x 34]}
1: kd> dx -id 0,0,896d1020 -r1 (*((comctl32!tagRECT *)0x13bf148))
(*((comctl32!tagRECT *)0x13bf148)) : {LT(304, 431) RB(357, 465) [53 x 34]} [Type: tagRECT]
[<Raw View>] [Type: tagRECT]
1: kd> dx -id 0,0,896d1020 -r1 -nv (*((comctl32!tagRECT *)0x13bf148))
(*((comctl32!tagRECT *)0x13bf148)) : {LT(304, 431) RB(357, 465) [53 x 34]} [Type: tagRECT]
[+0x000] left : 304 [Type: long]
[+0x004] top : 431 [Type: long]
[+0x008] right : 357 [Type: long]
rcIconReal = {LT(304, 431) RB(336, 463) [32 x 32]}
1: kd> dx -id 0,0,896d1020 -r1 (*((comctl32!tagRECT *)0x13bf0dc))
(*((comctl32!tagRECT *)0x13bf0dc)) : {LT(304, 431) RB(336, 463) [32 x 32]} [Type: tagRECT]
[<Raw View>] [Type: tagRECT]
1: kd> dx -id 0,0,896d1020 -r1 -nv (*((comctl32!tagRECT *)0x13bf0dc))
(*((comctl32!tagRECT *)0x13bf0dc)) : {LT(304, 431) RB(336, 463) [32 x 32]} [Type: tagRECT]
[+0x000] left : 304 [Type: long]
[+0x004] top : 431 [Type: long]
[+0x008] right : 336 [Type: long]
[+0x00c] bottom : 463 [Type: long]
[+0x00c] bottom : 465 [Type: long]