在Windows资源管理器预览窗格中看到预览时删除文件 [英] delete file when preview is seen in windows explorers preview pane

查看:291
本文介绍了在Windows资源管理器预览窗格中看到预览时删除文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好先生/女士,



我正在尝试使用函数DeleteFile删除文件。预览窗格为ON,并在Windows资源管理器中选择该文件。当我在这个文件上调用DeleteFile时,如何才能获得在预览窗格中看到文件预览的状态?另外我怎么能删除它的预览并删除文件?我是Windows的c ++编码新手。请建议我使用函数来获取目录的预览状态并获取是否选择了文件。



感谢和问候,

Vishal V 。

Hello sir/madam,

I am trying to delete a file using function DeleteFile. Preview pane is ON and the file is selected in windows explorer. When I call DeleteFile on this file, how could I get its status that file preview is seen in preview pane? Also how could I remove its preview and delete the file? I am new to c++ coding with windows. Please Suggest me functions to get preview status of a directory and to get whether a file is selected.

Thanks and regards,
Vishal V.

推荐答案

声明一个全局变量,其布尔类型和默认值设置为false。

现在当PreviewPane为On并且文件被选中时,设置真实到那个全局变量。

然后当你尝试删除该文件时,检查该变量的true / false,如果为true(表示文件位于窗格和Windows资源管理器中),则删除否则
declare a global variable with boolean type and default value set to false.
Now when PreviewPane Is On and file is selected,set "True" to that global variable.
Then when u try to delete that file,check true/false for that variable,if true (means file is in pane and windows explorer) then delete otherwise not


这篇关于在Windows资源管理器预览窗格中看到预览时删除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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