Word and VC++

小泉之家 2000-01-14 07:42:00
如何在VC6中创建一个WordAppliction 对象,如在Delphi中可用CreateOleObjeect('word.Application')完成?
...全文
171 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
jude 2000-09-08
  • 打赏
  • 举报
回复
o
kola 2000-01-18
  • 打赏
  • 举报
回复
直接使用低层的IUnKnow!
Jackzhu 2000-01-18
  • 打赏
  • 举报
回复
use cwnd::createControl()
详细说明:VC 源代码 --- --- --- --- --- --- --- -- dswRename_src.zip   一个可以重命名workspace的程序。 simplecomserver_src.zip   演示了如何生成一个COM组件。 consolePipe_src.zip consolePipe_demo.zip   用图形界面的程序装载控制台程序并接收控制台程序的输出。 TiffToPDF_src.zip sampleimage.zip   将tiff转换成PDF的源程序。 SimpleWordPad.zip   简单字处理程序。 Gamma_Manager_src.zip Gamma_Manager_demo.zip   调节灰度的滑动条的类。 smpplib.zip   一个SMPP类库可以用来连接SMPP网关来发送和接收SMS消息。 ColorFont_src.zip   使用CColorDialog类轻松改变对话框背景颜色和字体。 benBro107.zip benbro.zip   一个基于IE的浏览器,使用了多文档界面的标签,IE界面和XP的工具条等。 PictureZoom_src.zip PictureZoom_demo.zip    一个C++ OCX控件可以在你应用程序的窗口上绘制图片。 -VC source-------------------------------------------- dswRename_src.zip a workspace can rename the procedure. Simplecomserver_src.zip demonstration of how to create a COM. ConsolePipe_src.zip consolePipe_demo.zip use graphical interface loading procedures and receiving procedures console console program output. TiffToPDF_src.zip sampleimage.zip will tiff converted into PDF of the source. SimpleWordPad.zip simple word-processing procedures. Gamma_Manager_src.zip Gamma_Manager_demo.zip adjust the sliding strip of gray type. Smpplib.zip a SMPP library can be used to connect SMPP Gateway to send and receive SMS messages. ColorFont_src.zip use CColorDialog category dialog easily change fonts and background colors. BenBro107.zip benbro.zip one based on the I
电脑上如果装有VC++6.0编程软件和office2007(2010)办公软件,那么经常编程的人就会遇到下面的问题:VC打不开文件和工程,总是提示读取内存错误,点“确定”后vc自动关闭,但vc却能新建文件和工程;这让许多人困惑。以为是vc版本不行,再下载在安装,即便下了补丁,结果仍然存在。其实这是微软公司的一个小小的失误,VC++6.0与office2007(2010)有冲突 FileTool.exe使用方法(详见压缩包得word文档): 1. 下载FileTool.exe,并解压2. 打开VC6.0,点击File-Open Workspace,选择刚解压出来的FileTool.dsw,并确定3. 点击Bulid(组建)-Build FileTool.dll,生成FileTool.dll文件4. 在VC6.0中点击Tools(工具)-Customize(定制)5. 在出现的“Customize(定制)”对话框中,点击Add-Ins and Macro Files(附加项和宏文件)标签6. 点击Browse(浏览),在文件类型下选 dll , 定位刚才生成的dll文件,点击确定,然后点击OK保存设置(这里要用管理员身份运行vc)7. 此时VC中会出现一个上面只有两个图标的工具栏,点击其右上角的“X”按钮将其关闭,然后关闭VC6.0并重新启动程序此时打开VC6会有一个浮动工具栏(A O),点击A就是添加文件到工程,点击O就是打开文件8. 还是在VC6.0中点击Tools(工具)-Customize(定制)9. 在Customize(定制)对话框中点击Keboard(键盘)标签10. 从Category(类别)的下拉菜单框中选择File(文件)11.在Commands(命令)窗口中选择FileOpen12.在Current keys(当前键)窗口中选择CTRL+O条目,并点击Remove(移去)13.从Category(类别)的下拉菜单框中选择Project(工程)14.在Commands(命令)窗口中选择InsertFilesIntoProject,如果之前给它注册了快捷键,则按照上面所说步骤移除之,默认情况下它是没有快捷键的15.从Category(类别)的下拉菜单框中选择Add-Ins16.这时Commands窗口中应该已经多出了AddFileToProject和OpenFile两个条目,可以给它们分配快捷键了,选择 OpenFile条目,然后点击Press New Shortcut Key(按下新快捷键)输入框,按下想设置的快捷键或快捷键组合(如打开文件默认的快捷键CTRL+O),点击Assign(分配)可以以同样的方法为其它的命令设置快捷键最后,还应该在菜单栏内做相应的改动,移除无法使用的旧Open命令,换上新的:17. 在VC6.0中点击Tools(工具)-Customize(定制)(然后点击一下Toolbars或者Commands,这样才能下一步)18. 点击vc6.0工具栏上的File菜单,并将弹出菜单中的Open命令拖拽至弹出菜单之外(出现一个差号时释放,别弄错了给它拖到其他菜单中去了)并释放19. 点击Project(工程)菜单,并将弹出菜单中的Add To Project(添加到工程)命令拖拽至弹出菜单之外并释放20. 在Customize(定制)对话框中选择Commands(命令)标签21. 在Category(类别)列表中选择Add-ins22. 点击File菜单,将OpenFile命令(图标为字母O)拖动到之前Open命令所在位置点击Project(工程)菜单,将AddFileToProject命令(图标为字母A)拖动到之前Add To Projec命令所在位置 这样,VC6.0中无法打开文件和无法向工程中添加文件的问题就解决了
Gamma Manager is based on Gamma Slider control. This control allows to change gamma monitor on most graphic cards. The goal for this project is very simple and control is for VC6 & VC7. The other day I downloaded a N64 emulator but the screen was so black that I did not see anything. I had thus to find this solution to lighten my screen. I know that the tools of my video chart make it possible to change gamma of my screen, but it is faster with this tool. Implementation The implementation of this slider control is very easy. Import GammaSlider.h and GammaSlider.cpp into your project. Include reference to the class control. Add slider control on a form. Use ClassWizard to declare variable name derived from CGammaSlider control. That's it, enjoy! Under the hood Windows provides two APIs GetDeviceGammaRamp/ SetDeviceGammaRamp to perform gamma correction. In fact we need to have a 3 dimensional buffer of 256 WORD to manipulate gamma correction. To change gamma, it is necessary to change the RGB value of each color contained in the buffer by a float factor between 0.0 and 2.0. Example We need to save current gamma for future restore. Collapse Copy CodeWORD m_RampSaved[256*3]; if (!GetDeviceGammaRamp(::GetDC(NULL), m_RampSaved)) { TRACE("WARNING: Cannot initialize DeviceGammaRamp.\n"); }To change gamma, cycle into ramp buffer and change RGB color where Gamma is the float factor. Collapse Copy CodeWORD ramp[256*3]; for( int i=0; i<256; i++ ) { ramp[i+0] = ramp[i+256] = ramp[i+512] = (WORD)min(65535, max(0, pow((i+1) / 256.0, Gamma) * 65535 + 0.5)); } SetDeviceGammaRamp(::GetDC(NULL), ramp);Now to trap slider control message, we need to use a special message ON_WM_HSCROLL_REFLECT() that can provide message to be dispatched into control class itself.

16,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧