当前位置: 首页 > article >正文

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]


http://www.kler.cn/a/582628.html

相关文章:

  • C语言实现队列数据结构:思路与代码详解
  • ARM Cortex-M 内存映射详解:如何基于寄存器直接读写 寄存器映射方式编码程序 直接操作硬件寄存器来控制 MCU
  • JAVA(6)-运算符
  • [密码抓取] Windows 密码抓取 — 浏览器、数据库等其它密码的抓取
  • 【C++】【数据结构】链表与线性表
  • LeetCode 513. 找树左下角的值 java题解
  • Rabbitmq运维
  • 设计模式Python版 模板方法模式
  • 21 | 全面测试项目功能
  • python数据分析--pandas读取数据--按行和列提取数据
  • 【贪心算法4】
  • 人工智能在医疗领域的应用:技术革新与未来展望
  • 【解决报错】:detected dubious ownership in repository at ‘D:/idea_code/xxx‘问题
  • 【2步解决】phpstudy开机自启(自动启动phpstudy、mysql、nignx或apache、自动打开网址)
  • 【蓝桥杯python研究生组备赛】003 贪心
  • Python----计算机视觉处理(opencv:像素,RGB颜色,图像的存储,opencv安装,代码展示)
  • 动态规划-第2篇
  • JAVA SE 4.Java各版本特性
  • 手机端安装包签名原理
  • C++中数组作为函数参数传递,和使用指针作为函数参数有什么区别?