2011年7月29日

vc6 编辑出现错误“ **.pch is not a precompiled header file created with this compiler"

摘要: 打开project-》settings-》c/c++,category中选择"Precompiled Headers",选择”not using precompiled headers“,点击”确定“关闭窗口 阅读全文

posted @ 2011-07-29 13:17 MaggieNing 阅读(893) 评论(0) 推荐(0) 编辑

转:VC++6.0 Linking卡住问题的解决过程

摘要: 遇到此问题后使用此方法成功解决:转载内容如下:安装好VC6.0,在编译时出现怪现象,情况如下:点击Build(F7)按钮;完成了compile之后,卡在Linking.....处,VC将一系列的菜单及工具条按钮禁止,不再有任何反应。此时如果关闭VC,则出现错误提示“You can not close workspace while a build is in porgress,Select the Stop Build command before closing the workspace”,确定后VC仍然不能关闭,只能用Ctrl+Alt+Del强行终止MSDEV.EXE,才能退出关闭VC+ 阅读全文

posted @ 2011-07-29 09:51 MaggieNing 阅读(1483) 评论(1) 推荐(0) 编辑

2011年7月25日

漂亮界面-给窗口添加背景图片

摘要: 以下测试是基于对话框的应用程序,主窗口对应的类为CTestDlg。1、添加bitmap资源IDB_BITMAP_BK,大小为899*631(本例中截取的window media player 的界面)2、初始化窗口的大小在OnInitDialog()函数中初始化窗口的大小,大小定义为插入的位图的大小;同时去掉窗体默认的边框显示BOOL CTestqDlg::OnInitDialog(){ ........................................ // TODO: Add extra initialization here //初始化窗口大小,其中插入的背景图片位图大小为 阅读全文

posted @ 2011-07-25 13:17 MaggieNing 阅读(1237) 评论(0) 推荐(0) 编辑

转:VC6.0中的打开文件和添加文件到工程会出现异常

摘要: VC6与VISIO2007的冲突,导至VC6.0中的打开文件和添加文件到工程会导致异常或点了没反应如果机子上装了Visio2007,在VC6.0中的“FileView”右键点“addfilestofolder”或者在Project菜单点Addtoproject--Files或打开文件都会报出异常 或 点了一点反应都没有。2种解决方案:1. 卸掉Visio2007或Office2007即可;2. 去微软那下个FileTool的dll,作为插件添加进VC,然后删除原来VC自己的打开文件和添加文件到工程(http://support.microsoft.com/kb/241396/zh-cn)微软支 阅读全文

posted @ 2011-07-25 11:32 MaggieNing 阅读(584) 评论(0) 推荐(0) 编辑

响应键盘事件

摘要: 实现响应键盘事件,首先想到方法是响应WM_KEYDOWN事件,但是经过测试后,WM_KEYDOWN事件是不响应的,具体原因还在寻找中。正确方法是实现PreTranslateMessage函数,在此函数中实现键盘响应的处理操作。第一步:打开“类向导”对话框,选择对话框对应的类CTestdlg,在Messages列表框中查找PreTranslateMessage函数;第二步:找到后点击“Add Function”,得到以下函数:BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code her 阅读全文

posted @ 2011-07-25 09:48 MaggieNing 阅读(366) 评论(0) 推荐(0) 编辑

2011年7月22日

CWnd::IsIconic解释

摘要: CWnd::IsIconicBOOL IsIconic( ) const;返回值:如果CWnd被最小化,则返回非零值;否则返回0。说明:这个函数指明CWnd是否被最小化(图标化)。请参阅:::IsIconic 阅读全文

posted @ 2011-07-22 17:17 MaggieNing 阅读(418) 评论(0) 推荐(0) 编辑

转:VC对话框添加WM_ERASEBKGND消息

摘要: 1、首先,为了下面使用擦除背景的方便,先增加OnEraseBkgnd函数(WM_ERASEBKGND ),但好多新手都不知道对话框在那里找增加这个函数,来跟我来快捷键Ctrl+W打开ClassWizard对话框(菜单->view->ClassWizard):选择Class Info,找到左下角的Message filter,下拉列表至最底部,选中Window,OK保存;2、我们再Ctrl+W 打开ClassWizard对话框,MessageMaps->Class Name:选择当前工程对话框->Object IDs:选择当前对话框->Messages:下拉找吧,W 阅读全文

posted @ 2011-07-22 15:57 MaggieNing 阅读(393) 评论(0) 推荐(0) 编辑

ListBox的使用

摘要: 1、添加行m_ctrlListBox.AddString("第一行"); m_ctrlListBox.AddString("第二行"); 2、清空列表m_ctrlListBox.ResetContent();3、设置列表控件的背景颜色① 先创建一个基于对话框的工程,命名为test,然后在对话框上加入一个ListBox控件。 ② 在testDlg.h中加入一个成员变量:HBRUSH m_hbrush; ③ 在OnInitDialog()中,加入m_hbrush=CreateSolidBrush(RGB(0,0,0);此处设置的RGB值可以改变ListBox 阅读全文

posted @ 2011-07-22 15:49 MaggieNing 阅读(437) 评论(0) 推荐(1) 编辑

2010年12月23日

Learning Cpp----Comliling your first program

摘要: IDE: Visual Studio 2008Project Type: Console ApplicationPoint 1:the first program is "Hello world" for a new languageTraditionally, the first program programmers write in a new language is the infamoushello world program, and we aren’t going to deprive you of that experience! You’ll thank us later. 阅读全文

posted @ 2010-12-23 10:50 MaggieNing 阅读(196) 评论(0) 推荐(0) 编辑

Learning Cpp----Getting Started it!

摘要: I have studied C++ for some time discontinuously.i feel it's hard to catch it.Event i do not be getting started really now.recently,i found a really good website of C++ tutorial--http://www.learncpp.com/.Though it's written in English,it's really simply,and very be suited to the begginer for C++ pro 阅读全文

posted @ 2010-12-23 09:06 MaggieNing 阅读(267) 评论(0) 推荐(0) 编辑

导航