松鼠的博客

导航

统计

文章分类 -  BCB6-图形图像

异形窗口代码
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->BOOL CBmpDlg::OnEraseBkgnd(CDC* pDC) { HBITMAP hBackgroundBMP = (HBITMAP)LoadImage(NULL, "Skin/QQD... 阅读全文

posted @ 2008-12-26 20:01 Xproer-松鼠 阅读(391) 评论(0) 推荐(0) 编辑

伪园角窗口坐标
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> int w = this->Width; int h = this->Height; gdip::PointF borderData[]={ ... 阅读全文

posted @ 2008-12-04 16:42 Xproer-松鼠 阅读(153) 评论(0) 推荐(0) 编辑

制做透明窗口
摘要:在C++ Builder中,制做透明窗体分为两步: 一是重载CreateParams函数,设置透明风格 WS_EX_TRANSPARENT 二是重载WM_ERASEBKGND消息更新背景 .h文件代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->... 阅读全文

posted @ 2008-12-04 13:53 Xproer-松鼠 阅读(429) 评论(0) 推荐(0) 编辑

在C++ Builder中显示PNG
摘要:由于PNG是透明图片,所以直接在TImage组件的Canvas里面画图片的话,PNG图片的透明部分将会被显示成白色。为了避免透明部分显示成白色,可以直接在Form中画,将绘画的位置设置为TImage所在的位置,这样可以显示PNG的透明部分。 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.Code... 阅读全文

posted @ 2008-12-03 14:51 Xproer-松鼠 阅读(2312) 评论(0) 推荐(0) 编辑

显示不规则窗体
摘要:思路: 从图片中读取路径信息(实际上是点,每一个点的信息),将这些点存为一个路径,最后为窗体设置路径信息SetWindowRgn 关键API: (1)CreatePolygonRgn (2)SetWindowRgn 在分析图片路径的过程中需要用到的API: (1)CreateRectRgn (2)CombineRgn GDI+实例代码: Code highlighting produced by ... 阅读全文

posted @ 2008-11-21 09:50 Xproer-松鼠 阅读(273) 评论(0) 推荐(0) 编辑

窗体背景的绘制
摘要:核心思想:由于Windows窗体每次都会重绘其窗体背景,所以我们可以通过拦截窗体重绘背景的消息(WM_ERASEBKGND),并自定义方法来实现重绘窗体背景。通过TImage组件也可以实现,但是重写WM_ERASEBKGND消息的效率更高一些,所以还是推荐使用这种方法。 (2)声明重绘背景消息响应函数 Code highlighting produced by Actipro CodeHighl... 阅读全文

posted @ 2008-11-19 14:10 Xproer-松鼠 阅读(380) 评论(0) 推荐(0) 编辑

C++ Builder 资源文件的使用
摘要:(1)创建.rc 文件格式 srcfile.rc: WAV_RING WAV wav1.Wav EXE_FILE EXEFILE faint.exe ICON_CLOUD ICON icon1.ico CURSOR_HAND CURSOR cursor1.cur 说明文件代码如下: ... 阅读全文

posted @ 2008-11-19 14:02 Xproer-松鼠 阅读(904) 评论(0) 推荐(0) 编辑

BCB配置和使用GDI+
摘要:在BCB6中编译GDI+程序 1.) 在BCB6中已自带了ghiplus.h文件,故只需要生成gdiplus.lib文件就可以: 在命令行下运行implib gdiplus.lib gdiplus.dll。(如果ghiplus.dll不在当前文件夹下,注意写完整路径) 2.) 在工程的编译选项中加入STRICT条件编... 阅读全文

posted @ 2008-10-25 16:43 Xproer-松鼠 阅读(1944) 评论(0) 推荐(0) 编辑

显示透明位图
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->this->Image1->Transparent = true; this->Image1->Picture->Bitmap->TransparentColor = clWhite;//要设... 阅读全文

posted @ 2008-10-19 18:38 Xproer-松鼠 阅读(238) 评论(0) 推荐(0) 编辑

TListView为某一项显示图片
摘要:void __fastcall TForm1::lv1CustomDraw(TCustomListView *Sender, const TRect &ARect, bool &DefaultDraw) { TJPEGImage *jpg = new TJPEGImage(); ... 阅读全文

posted @ 2008-08-27 23:11 Xproer-松鼠 阅读(233) 评论(0) 推荐(0) 编辑

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