如何防止PowerPoint(Office 365 64位)窗口重新绘制?
我有一个图形激烈的PowerPoint加载项,该加载项正在重新绘制屏幕。 I'm trying to lock the PowerPoint window from VBA while the changes are being made with the following code (64-bit Office):
Private Declare PtrSafe Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hWnd As LongPtr, ByVal wMsg As Long, _
ByVal wParam As LongPtr, Optional lParam As Any) As LongPtr
Public Const WM_SETREDRAW = &HB
Sub testLock()
Static hWnd As LongPtr
hWnd = FindWindow("PPTFrameClass")
SendMessage hWnd, WM_SETREDRAW, False, 0&
End Sub
Sub testUnlock()
Static hWnd As LongPtr
hWnd = FindWindow("PPTFrameClass")
SendMessage hWnd, WM_SETREDRAW, True, 0&
End Sub
When I do, this is the result (a mostly white window, with some stray lines):
What am I doing wrong?我也尝试了lockwindowupdate,但不能阻止更新。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论