松鼠的博客

导航

统计

文章分类 -  BCB6-控件

Edit 控件自绘
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->void __fastcall TForm1::Edit1KeyPress(TObject *Sender, char &Key) { if ((Key == 13)&&(Editing)) //K... 阅读全文

posted @ 2008-12-02 10:23 Xproer-松鼠 阅读(1586) 评论(0) 推荐(0) 编辑

TFrame控件背景自绘
摘要:(1)在Frame框架窗口中增加 TApplicationEvent 对象 (2)响应 TApplicationEvent 的 Message 消息 (3)编写 WM_PAINT 消息的代码: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->void ... 阅读全文

posted @ 2008-12-02 09:47 Xproer-松鼠 阅读(293) 评论(0) 推荐(0) 编辑

改变TListView的表格头部颜色
摘要:列表头实际上是一个SysHeader32控件,如果想改变它的颜色,唯一的办法就是自己画!那如何自己画呢? 1、首先,那个SysHeader32的每一个Item都必须具有HDF_OWNERDRAW属性。 2、当Item具有HDF_OWNERDRAW时,Windows在画它们之前将向SysHeader32的Owner(也就是TListView)发送WM_DRAWITEM消... 阅读全文

posted @ 2008-11-24 21:40 Xproer-松鼠 阅读(951) 评论(1) 推荐(0) 编辑

TPageControl的使用
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->TTabSheet* tab = new TTabSheet(this);//创建TTabSheet对象 tab->PageControl = this->MainPageControl;//设置Page... 阅读全文

posted @ 2008-11-05 10:20 Xproer-松鼠 阅读(595) 评论(0) 推荐(0) 编辑

C++ Builder 中使用JPG图片
摘要:使用 C++ Builder 6.0 提供的 TPicture控件来操作JPG格式的图片 使用方法: (1)引入jpeg头文件 #include Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> TPicture* picBtn; p... 阅读全文

posted @ 2008-10-30 10:28 Xproer-松鼠 阅读(1399) 评论(0) 推荐(0) 编辑

C++ Builder支持文件拖放
摘要:首先在FormCreate时调用DragAcceptFiles(this,true)注册你的程序,使得你的程序可以接受文件的DragDrop。然后处理WM_DROPFILES消息,获得DropDrag的消息,调用如下函数获得相关的参数:: UINT DragQueryFile( HDROP hDrop, UINT iFile, LPTSTR lpszFile, UI... 阅读全文

posted @ 2008-10-18 17:16 Xproer-松鼠 阅读(896) 评论(0) 推荐(0) 编辑

TListView多选
摘要:TListItem *Item = ListView1->Selected; while (Item){ ListBox1->Items->Add(Item->Caption); Item = ListView1->GetNextItem(Item, sdAll, TItemS... 阅读全文

posted @ 2008-10-12 14:47 Xproer-松鼠 阅读(206) 评论(0) 推荐(0) 编辑

TListView拖动
摘要://--------------------------------------------------------------------------- void __fastcall TForm1::ListView1DragDrop(TObject *Sender, TObject *Source, int X, ... 阅读全文

posted @ 2008-10-12 09:54 Xproer-松鼠 阅读(338) 评论(2) 推荐(0) 编辑

为TListView项自绘图标
摘要:(1)将OwnerDraw属性设为 true (2)编写OnDrawItem事件代码 (推荐使用ListView1CustomDrawItem事件来实现自绘) Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/* 自绘 */ void __fa... 阅读全文

posted @ 2008-09-03 11:18 Xproer-松鼠 阅读(561) 评论(0) 推荐(0) 编辑

TVCLUnZip控件使用
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include "VCLUnZip.hpp" #include "kpZipObj.hpp" #pragma hdrstop //------------------------... 阅读全文

posted @ 2008-08-20 16:17 Xproer-松鼠 阅读(741) 评论(0) 推荐(0) 编辑

TListView编辑
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->TListItem* s = ListView1->Selected; s->EditCaption(); 阅读全文

posted @ 2008-08-16 18:04 Xproer-松鼠 阅读(233) 评论(0) 推荐(0) 编辑

自绘TTrackBar
摘要:.h文件 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->class PACKAGE ttrackBar11 : public TTrackBar { private: TCanvas *m_pCanvas; protected: vo... 阅读全文

posted @ 2008-08-14 17:04 Xproer-松鼠 阅读(686) 评论(0) 推荐(0) 编辑

实现从IE中拖放URL的类
摘要:.h文件 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include "oleidl.h" #include "controls.hpp" //---------------------------------------------------... 阅读全文

posted @ 2008-08-13 21:09 Xproer-松鼠 阅读(339) 评论(0) 推荐(0) 编辑

取出TListView选中项的某一列值
摘要:ListView1->Selected->SubItems->Strings(4)吧 ,Listview 从0开始算起 第一列=ListView1->Items->Item[0]->Caption; 第五列=ListView1->Items->Item[0]->SubItems->Strings[4]; 阅读全文

posted @ 2008-08-08 14:08 Xproer-松鼠 阅读(437) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示