if i open the excel file with excel 2003, then i'll do the query again for the file,everything goes fine, why? how can i get the data from xls, without open it in the excel 2003 at the same time, who can help me ? thanks very much!
It has always been called as recycle bin. People may not understand you if you call it by other names. Anyway, try doing an invalidate on the desktop.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)
You would need to know the format of each type of file that may exist. This information is specific to each application and is not something maintained by Windows itself.
You could try gettin an IShellFolder[^] interface of the desktop, maybe by using SHGetDesktopFolder[^], use its EnumObjects[^] method to enumerate the objects on the desktop, on every object you get, use GetUIObjectOf[^] to retrieve IExtractIcon[^] for it and then use the ExtractIcon[^] method of that to get an icon.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <
there are no hidden file extensions when doing directory lookups within a program. If you are talking about seeing file extensions in things like Explorer Windows or File Open dialogs, you do that by going to Tools / Folder Options / View in any Explorer Folder and uncheck "Hide file extensions for known file types"
Steve _________________ I C(++) therefore I am
It's not as simple as that. There's not a WM_REFRESH type of message that you can send to a window and have it refresh itself. Using Spy++, you can see what messages are sent to the desktop's list control and how it responds. In order to mimic this, I suspect a shell extension would be in order.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
You need two functions: SHGetFolderPath()[^] (XP and earlier) or ShGetKnownFolderPath()[^] (Vista and later) and SHGetFileInfo()[^]
Software Zen: delete this;
Fold With Us![^]
You can use ShellExecute Function with "Open" as command. Using SHGetFolderLocation Function you can get the path for special folders you want, and pass that to ShellExecute Function. Above function seems deprecated, look for equivalent new function.
-- "Programming is an art that fights back!"
You need to use the SetWindowsHookEx()[^] function to monitor the messages going through the system, then activate whatever you need when you see the message that you are interested in. The following CodeProject Article[^] explains how you can utilise this feature.