zoukankan      html  css  js  c++  java
  • qq用户列表,点击变大的皱形及原理

    QQ用户列表的那个点一下变大的实现。

    不知道是不会搜还是真没有,google没啥资料 codeproject也没看到 估计太简单了

    注意点

    1.window sytle

     LBS_NOTIFY | LBS_OWNERDRAWVARIABLE

    2.sting and setitemdata

     id = m_listbox.AddString(L"3234234123");
     m_listbox.SetItemData(id, (DWORD_PTR)&myCon[0]);

     void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
     {
      // must be implemented
      Contactors* con = (Contactors*)lpDrawItemStruct->itemData;

      CDCHandle dc = lpDrawItemStruct->hDC;
      TCHAR aa[100] = {0};
       wsprintf(aa,L"这里是状态%d这里是坐标%d-%d-%d-%d",lpDrawItemStruct->itemState, lpDrawItemStruct->rcItem.left, lpDrawItemStruct->rcItem.top, lpDrawItemStruct->rcItem.right, lpDrawItemStruct->rcItem.bottom);
      //if((lpDrawItemStruct->itemState&ODS_NOFOCUSRECT )==ODS_NOFOCUSRECT )
      //{
       dc.SetBkMode(TRANSPARENT);
       dc.FillRect(&lpDrawItemStruct->rcItem, CreateSolidBrush(RGB(100+lpDrawItemStruct->itemID*10,10+lpDrawItemStruct->itemID*70,40+lpDrawItemStruct->itemID*80)));
       dc.TextOut(lpDrawItemStruct->rcItem.left, lpDrawItemStruct->rcItem.top,aa);
      //}
     }

     (gif图像点击看效果)





  • 相关阅读:
    移动端开发 rem 案例
    html基值 仿淘宝
    使用FreeSWITCH做电话自动回访设置
    Nodejs 实现ESL内联FreeSWITCH设定说明
    ADC自动转接功能Lua实现
    sipML5聊天功能实现
    FreeSWITCH与PSTN对接
    FreeSWITCH Git版本管理
    FreeSWITCH Git版本管理
    SIP 认证
  • 原文地址:https://www.cnblogs.com/mokliu/p/2138815.html
Copyright © 2011-2022 走看看