数学建模社区-数学中国

标题: Ask the API to find a file [打印本页]

作者: 韩冰    时间: 2005-1-26 01:23
标题: Ask the API to find a file

You can find files by using the ShellExecute function. Unfortunately, this doesn't quite work like I was hoping. Here is how you do it.

: s6 c( k# C4 f

// include SHLOBJ.H in your CPP file. 9 ^" v% e2 q1 J5 ~8 t) X) U #include <shlobj.h>

* n: i& y' p+ p& i t. F; N, Y1 o

// Add this statement to your code.5 I9 e$ i3 w# o# u ShellExecute(Handle,"find",NULL,NULL,NULL,SW_SHOWDEFAULT);

, F$ K- S9 O5 K3 M5 A) Z$ R& ^ y

Note: The downfall is that you can't specify what to search for. ShellExecute usually allows you to specify a filename, but you can't specify a file when you use the "find" command. % H4 }. c; a$ N






欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5