2006年10月18日

600个问与答

摘要: http://faq.xunweb.org/itfaq/mfcbasic/ 怎样彻底结束一个线程? (2006-06-04) v 怎么样以纯idispatch方式而不是引入类型库的方法调用Word? (... 阅读全文

posted @ 2006-10-18 23:34 cy163 阅读(4313) 评论(2) 推荐(0) 编辑

关于如何为FormView中的Richedit/Edit添加右键菜单,并响应CTRL+C等快捷键

摘要: 反复碰到这个问题,查资料很困难,索性整理一下放在这里,供朋友们借鉴。 faq-it.org/apache/=========================================================================== 微软很恶心,竟然无法很方便的为FormView或者Dialog上的RicheditCtrl添加右键菜单功能项.经过搜索资料和实际使用,需要... 阅读全文

posted @ 2006-10-18 23:33 cy163 阅读(2716) 评论(1) 推荐(0) 编辑

Change the Foreground and Background Colour of Staic Text Control in VC++

摘要: overrider OnCtlColor for WM_CTLCOLOR for your dialog like following to set background and text color :e.g.HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::On... 阅读全文

posted @ 2006-10-18 23:09 cy163 阅读(366) 评论(0) 推荐(0) 编辑

在VC Project中 加入无基类 的自定义新类

摘要: 在引入CSADirRead类(从Internet Google查到)到testing_061018Project时,先是尝试用Class Wizard将其引入项目,但不成功。后来发现通过“Insert | New Class”这条路径 在“Class type”中有”Generic Class”选项,经由这条路径成功将CSADirRead类引入项目。 阅读全文

posted @ 2006-10-18 22:48 cy163 阅读(604) 评论(1) 推荐(0) 编辑

OnIntialDialog() (Dialog应用)和 OnIntialUpdate(View应用)的 程序起始点

摘要: Dialog为基的应用框架的程序的起始点在OnIntialDialog() FormView为基的应用框架的程序起始点在OnIntialUpdate() 把 需要起始就装入的代码放在 CformView:OnIntialUpdate(); GetParentFrame()->RecalcLayout(); Resize ParenttoFit(); 三个... 阅读全文

posted @ 2006-10-18 22:46 cy163 阅读(296) 评论(0) 推荐(0) 编辑

How do I convert a CString to a char*

摘要: First, be sure you actually need a char* (non-constant pointer, or LPTSTR). If you need a const char* (or LPCTSTR), then CString has a conversion function that will be called automatically if you pas... 阅读全文

posted @ 2006-10-18 22:41 cy163 阅读(929) 评论(0) 推荐(0) 编辑

经典Vc书

摘要: Charles Petzold 的《Programming Windows》 -- 入门Jeffrey Richter 的《Advanced Windows》 -- 经典中的经典,我太喜爱这本书了Jeffrey Richter 的《Windows 95 : A Developer's Guide》 -- 学HookMatt Pietrek 的 《Windows 95 System Programm... 阅读全文

posted @ 2006-10-18 20:29 cy163 阅读(1194) 评论(0) 推荐(0) 编辑

MFC学习总结 (67个技巧) dlg 上建立View

摘要: 1."属性页的添加:创建对话框的类,该类要从CpropertyPage继承;然后在要添加该对话框为属性页的类(头文件)里创建CpropertySheet类的一个对象m_tabsheet和新创建的对话框类的对象m_skatch;最后,在.cpp文件里的OnInitDialog()之类的函数里实现如下代码:m_tabsheet.Create(thi... 阅读全文

posted @ 2006-10-18 19:52 cy163 阅读(14590) 评论(3) 推荐(1) 编辑

在OnInitDialog(对话框)或OnInitialUpdate(表单视)中添加下面代码:

摘要: 在OnInitDialog(对话框)或OnInitialUpdate(表单视)中添加下面代码: m_BalloonToolTip.Create(this); m_BalloonToolTip.AddTool(GetDlgItem(), , [text color]); http://www.vchome.net/myforum/viewtheme.asp?area=25&id=11473... 阅读全文

posted @ 2006-10-18 19:50 cy163 阅读(1141) 评论(0) 推荐(0) 编辑

VC中基于 Windows 的精确定时

摘要: 方式一:VC中的WM_TIMER消息映射能进行简单的时间控制。首先调用函数SetTimer()设置定时 间隔,如SetTimer(0,200,NULL)即为设置200ms的时间间隔。然后在应用程序中增加定时响应函数 OnTimer(),并在该函数中添加响应的处理语句,用来完成到达定时时间的操作。这种定时方法非常 简单,可以实现一定的定时功能,但其定时功能如同Sleep()函数的延时功能一样,精度非... 阅读全文

posted @ 2006-10-18 19:46 cy163 阅读(743) 评论(0) 推荐(0) 编辑

VC++ Tutorial (http://www.softlookup.com/tutorial/vc++/vcu03fi.asp

摘要: VC++ Tutorial (http://www.softlookup.com/tutorial/vc++/vcu03fi.aspVC++ Tutorial (http://www.softlookup.com/tutorial/vc++/vcu03fi.asp 阅读全文

posted @ 2006-10-18 13:39 cy163 阅读(458) 评论(0) 推荐(0) 编辑

导航