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

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]

相关文章:

  • 【CXX】6.6 UniquePtr<T> — std::unique_ptr<T>
  • Windows安装milvus和图形化管理工具attu
  • 【webrtc debug tools】 rtc_event_log_to_text
  • 大数据面试之路 (一) 数据倾斜
  • 第一章:介绍Python编程-1.Python是什么
  • 2.2 企业级ESLint/Prettier规则定制
  • Excel两列和依次相减
  • AnyAnomaly: 基于大型视觉语言模型的零样本可定制视频异常检测
  • 中断机制及NVIC管理解析
  • Xavier 初始化:深度网络权重初始化的经典之作
  • Java小白-管理项目工具Maven(2)初识Maven
  • Cursor配置Golang开发环境
  • Java变量与常量
  • ubuntu 22.04 本地部署DeepSeek的Janus Pro
  • BigFoot EventAlertMod lua
  • 【hot100】046全排列
  • 初识数组下篇
  • 滑动窗口及边缘化直观理解
  • Maven 的常用指令
  • 编程视界:C++命名空间
  • 铁肩担道义,历史鉴未来——中共中央政治局委员、外交部长王毅谈习近平主席对俄罗斯进行国事访问并出席纪念苏联伟大卫国战争胜利80周年庆典
  • 巴基斯坦外长:印巴已同意立即停火
  • 时隔14个月北京怀柔区重启供地,北京建工以3.59亿元摘得
  • 马上评丨规范隐藏式车门把手,重申安全高于酷炫
  • 2025柯桥时尚周启幕:国际纺都越来越时尚
  • 心相印回应官方旗舰店客服辱骂消费者:正排查