哪个API Microsoft Word(Office 2013)正在使用屏幕绘画 [英] Which API Microsoft Word (Office 2013) is using the paint the screen

查看:105
本文介绍了哪个API Microsoft Word(Office 2013)正在使用屏幕绘画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Office插件(本机C ++),与Office相当相关.我正在做的一件事是找到主窗口的HWND,并对该窗口进行子类化.在各种情况下,我都会同时获取该窗口,并在Office文档的顶部绘制自己的内容.

I have an Office plug-in (native C++) which is fairly involving with Office. One of the thing I'm doing is finding the HWND of the main window, and subclass that window. On various occasions I also GetDC that window, and paint my own stuff on top of the Office document.

我还在使用各种Windows API的IAT挂钩(相当标准).

I'm also using IAT hooking (fairly standard) of various Windows API.

我有一个装饰"功能,可直接在HDC上绘制.在Office 2010之前,我在Office处理WM_PAINT之后以及WM_KEYUP之后立即调用了我的方法.很好.

I've a 'Decorate' function that draw on the HDC directly. Until Office 2010, I called my method immediately after Office handled WM_PAINT, and also after WM_KEYUP. That was working fine.

从Office 2013开始,在我无法跟踪时,WinWord会困扰客户区域.而且,我什至找不到Office在为其工作区重新粉刷时使用的GDI API.我正在钩住DrawText(gdi)或DrawString(gdi +).

Starting with Office 2013, WinWord pains the client area in times I failed to track. Moreover, I cannot even find any GDI API that Office is using when repainting it's client area. I'm putting a hook on DrawText (gdi), or DrawString (gdi+).

据我所知,即使没有调用GetDC,BeginPaint或ReleaseDC,WinWord也会重新绘制客户区(因此-删除我的装饰)!

As far as I can tell, WinWord will repaint the client area (and hence - delete my decoration) even without calling GetDC, BeginPaint, or ReleaseDC!

我几乎没主意了.我会感激Office可以用来触摸屏幕的任何想法?我设置为钩住任何功能和/或Windows消息-只是找不到必须被钩住的东西.任何其他想法(不需要完整的解决方案-只是一个方向就可以了).可以使用的任何工具(例如,是否有类似于FileMon for GDI方法的工具?).

I'm almost out of ideas. I'll appreciate any idea that Office could use to touch the screen? I'm setup to hook any function, and/or Windows message - just can't find what has to be hooked. Any other idea (no need for complete solution - just an direction will be fine). Any tool that can be used (e.g. is there anything similar to FileMon for GDI methods?) will be appreciated.

推荐答案

Office 2013使用DirectWrite,Direct2D和DXGI在屏幕上放置墨水.当他们这样做时,他们几乎完全避免使用GDI,因此避免使用GetDC/BeginPaint/etc.从来没有被叫过.

Office 2013 is using DirectWrite, Direct2D and DXGI for putting ink on the screen. As they do that, they almost entirely avoid using GDI, hence GetDC/BeginPaint/etc. never been called.

查看此博客:

http://blogs.msdn.com/b/murrays/archive/2012/07/29/office-adopts-new-windows-display-technology.aspx

这篇关于哪个API Microsoft Word(Office 2013)正在使用屏幕绘画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆