listview加了背景图,数据加入时有自己的底色,怎么去掉?

tom_happy 2004-07-07 03:25:51
listview加了背景图,添加数据时,每行数据有自己的底色,不能透明看到背景图,效果很差,是否有像vc中的SetTextBkColor那样将listview的文字背景颜色设置为透明?
...全文
240 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tom_happy 2004-08-16
  • 打赏
  • 举报
回复
搞定,非常感谢
constantine 2004-07-27
  • 打赏
  • 举报
回复
void __fastcall TForm1::ListView1CustomDraw(TCustomListView *Sender,
const TRect &ARect, bool &DefaultDraw)
{
Graphics::TBitmap *bitmap= new Graphics::TBitmap();
bitmap->LoadFromFile("F:\\My Pictures\\111.bmp");
ListView1->Canvas->Draw(0,0,bitmap);
ListView1->Color = clNone;
SetBkMode(ListView1->Canvas->Handle,TRANSPARENT);
ListView1->Perform(LVM_SETBKCOLOR ,0,CLR_NONE);
ListView1->Perform(LVM_SETTEXTBKCOLOR,0,CLR_NONE);
}

这样就可以了
cnhgj 2004-07-17
  • 打赏
  • 举报
回复
搜索ListView_SetTextBkColor()
tom_happy 2004-07-11
  • 打赏
  • 举报
回复
知道的告诉我一声啊
tom_happy 2004-07-11
  • 打赏
  • 举报
回复
没人知道吗

13,873

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧