Click here to Skip to main content
12,395,183 members (60,678 online)
Rate this:
Please Sign up or sign in to vote.
See more: C++
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.
Posted 13-Dec-12 1:04am
Updated 13-Dec-12 19:05pm
jibesh 14-Dec-12 1:55am
what is the error you are getting when Delete file is called? can you paste the error you got

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
vishal9483 14-Dec-12 0:44am
Thanks for your reply. I am completely new to this type of coding. How could I get the PreviewPane status and file selection status using cpp code?
01010RAJ 14-Dec-12 0:59am
sorry yaar,i don't know it with C++,otherwise i will write complete code.So i suggested u only logic.I thought u know about PreviewPane and windows Explorer in context of c++.So Update ur question again.
vishal9483 14-Dec-12 1:06am
I have updated my que. I am behind this from a long time. And not able to get a solution. :(.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100