松鼠的博客

导航

统计

文章分类 -  VC-控件

上一页 1 2

控件位置
摘要:CRect rt; lst.GetWindowRect(&rt); lst.MoveWindow(rt.TopLeft().x,rt.TopLeft().y,rt.Width(),rt.Height(),true); 阅读全文

posted @ 2008-09-22 15:25 Xproer-松鼠 阅读(173) 评论(0) 推荐(0) 编辑

MFC全屏显示技术
摘要:全屏显示是一些应用软件程序必不可少的功能。比如在用VC++编辑工程源文件或编辑对话框等资源时,选择菜单“ViewFull Screen”,即可进入全屏显示状态,按“Esc”键后会退出全屏显示状态。 在VC++6.0中我们用AppWizard按默认方式生成单文档界面的应用程序框架。下面将先讨论点击菜单项“ViewFull Screen”实现全屏显示的方法,再讲述按“Esc”键后如何退出全屏显示... 阅读全文

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

MFC 拖放
摘要:添加一个继承自COleDropTarget的类 添加继承自CObject的拖动信息类 在要实现的控件类里面申明和注册COleDropTarget 在应用程序初始化里面加入AfxOleInit 添加继承自COleDropTarget的类 Code highlighting produced by Actipro CodeHighlighter (freeware... 阅读全文

posted @ 2008-08-07 12:42 Xproer-松鼠 阅读(1380) 评论(0) 推荐(0) 编辑

ListCtrl宽度自适应
摘要:Download demo project - 12 Kb While creating a List Control using CListCtrl class, we need to specify the column width for all the columns in the very beginning, when we have little idea about... 阅读全文

posted @ 2008-08-01 10:39 Xproer-松鼠 阅读(2288) 评论(1) 推荐(0) 编辑

如何为CListCtrl控件的滚动条和列标题增加皮肤
摘要:Download demo project - 29.3 Kb Introduction I have been programming in MFC for about five years and it has always been a problem for me to find help in the area of advanced user interfaces. I... 阅读全文

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

Autosize ListCtrl Header
摘要:Download source files - 36.8 KB Introduction Did you ever wonder how to make a list control automatically resize the last column to fit the entire list control without a horizontal scrollbar.... 阅读全文

posted @ 2008-08-01 10:17 Xproer-松鼠 阅读(783) 评论(1) 推荐(0) 编辑

一个自画的list control
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->void CNewListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { TRACE("need draw item\n"); C... 阅读全文

posted @ 2008-08-01 09:54 Xproer-松鼠 阅读(555) 评论(0) 推荐(0) 编辑

视图切换
摘要:http://www.codeproject.com/KB/splitter/st_splitterwnd.aspx http://topic.csdn.net/u/20070308/15/34d54842-2841-40b3-85af-d72ec8de320e.html http://dev.21tx.com/2004/12/10/12624.html 阅读全文

posted @ 2008-07-02 17:37 Xproer-松鼠 阅读(146) 评论(0) 推荐(0) 编辑

使用VC6.0实现窗口的任意分割
摘要:一、关于CSplitterWnd类 我们在使用CuteFtp或者NetAnt等工具的时候,一般都会被其复杂的界面所吸引,在这些界面中窗口被分割为若干的区域,真正做到了窗口的任意分割。 那么我们自己如何创建类似的界面,也实现窗口的任意的分割呢 ?在VC6.0中这就需要使用到CSplitterWnd类。CSplitterWnd看上去像是一种特殊的框架窗口,每个窗口都被相同的或者不同的视图所填充。当窗... 阅读全文

posted @ 2008-06-25 20:02 Xproer-松鼠 阅读(422) 评论(0) 推荐(0) 编辑

Extend List Control with progress control
摘要:Introduction We want to add a progress control or other controls in the list control sometimes. Traditionally, we could draw this controls using CDC and deal all messages related to the controls, but ... 阅读全文

posted @ 2008-06-25 13:21 Xproer-松鼠 阅读(593) 评论(0) 推荐(0) 编辑

Windows 中不规则窗体的编程实现
摘要:一、序言 在绝大多数的Windows应用程序中,其窗体都是使用的正规正矩的矩形窗体,例如我们常用的,“记事本”,“扫雷”,等等。矩形窗体,具有编程实现简单,风格简洁的优点,所以在普通文档应用程序和简单小游戏中使用足矣。但在某些娱乐游戏程序中使用就略显呆板些了,这时若用不规则窗体替代原先的矩形窗体,将会使这类程序更添情趣。典型的例子有windows 自代的Media Player,新版本的Me... 阅读全文

posted @ 2008-06-25 11:11 Xproer-松鼠 阅读(424) 评论(0) 推荐(0) 编辑

形态各异的不规则窗体
摘要:那么实现这样的窗体困难吗?简单!几句话就可以轻松搞定。不过在揭示答案之前我们还是先来熟悉一下在Windows里不规则窗体的实现几点要素。 一、创建不规则窗体的几个主要函数: CreateRectRgn : 创建矩形窗体轮廓。 CreateRoundRectRgn : 创建圆角矩形窗体轮廓。 CreateEllipticRgn : 创建圆形或椭圆形窗体轮廓。 CreatePolygon... 阅读全文

posted @ 2008-06-25 11:08 Xproer-松鼠 阅读(511) 评论(0) 推荐(0) 编辑

分割视图
摘要:分割窗口将窗口分成几个部分,每个部分通常代表一个视图(但也可以是具有子窗口标识的CWnd对象),又称窗格。如图8-8所示。如果想在一个窗口里面观察文档的不同部分,或者是在一个窗口里用不同类型的视图(比如用图表和表格)观察同一个文档,那么采用分割窗口是非常方便的。许多优秀的软件都采用了分割窗口技术,因此我们有必要掌握分割窗口的用法。 图8-8 分割窗口 分割窗口分为两类:动态分割窗口和静态分割... 阅读全文

posted @ 2008-06-21 20:40 Xproer-松鼠 阅读(637) 评论(0) 推荐(0) 编辑

上一页 1 2
点击右上角即可分享
微信分享提示