窗口的符合删除对话框不是模态的 [英] Conform delete dialog of window is not modal
本文介绍了窗口的符合删除对话框不是模态的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在我的应用程序中显示文件的上下文菜单.当用户单击其中的Delete(删除),然后使用API时,将按以下方式调用delete.
I am displaying context menu of a file in my application. When user clicks Delete in it, then using API, delete will be called as below.
ShellAPI.CMINVOKECOMMANDINFOEX invoke = new ShellAPI.CMINVOKECOMMANDINFOEX();
invoke.cbSize = ShellAPI.cbInvokeCommand;
invoke.lpVerb = (IntPtr)cmd;
invoke.lpDirectory = parentDir;
invoke.lpVerbW = (IntPtr)cmd;
invoke.lpDirectoryW = parentDir;
invoke.fMask = ShellAPI.CMIC.UNICODE | ShellAPI.CMIC.PTINVOKE |
((Control.ModifierKeys & Keys.Control) != 0 ? ShellAPI.CMIC.CONTROL_DOWN : 0) |
((Control.ModifierKeys & Keys.Shift) != 0 ? ShellAPI.CMIC.SHIFT_DOWN : 0);
invoke.ptInvoke = new ShellAPI.POINT(ptInvoke.X, ptInvoke.Y);
invoke.nShow = ShellAPI.SW.SHOWNORMAL;
iContextMenu.InvokeCommand(ref invoke);
这里的问题是,单击对话框时出现确认删除对话框,但不是模态对话框.
请帮我考虑一下.
here the problem is, on clicking dialog Confirm Delete dialog appears but it is not Modal dialog.
Please help me regard this.
推荐答案
我做C ++已经很久了.但我认为问题出在下面:
It''s already a lot of time ago that I did some C++. But I think the problem is in the line:
invoke.nShow = ShellAPI.SW.SHOWNORMAL;
应该不是SHOWDIALOG
而不是SHOWNORMAL
吗?
Shouldn''t that be SHOWDIALOG
instead of SHOWNORMAL
?
这篇关于窗口的符合删除对话框不是模态的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文