Creating Sub folder
-
if you know folers name use of String Table of course before this if your folders are like a b c d...ab ac dc,... use of numbers and convert numbers with
itoa or CString::Format
forPathFileExists
then you can check and create 28 folder with a loop (I think you use of a b c d),but if you different names use of String Table and insert folders name on it and read of it ;)
WhiteSky
-
if you know folers name use of String Table of course before this if your folders are like a b c d...ab ac dc,... use of numbers and convert numbers with
itoa or CString::Format
forPathFileExists
then you can check and create 28 folder with a loop (I think you use of a b c d),but if you different names use of String Table and insert folders name on it and read of it ;)
WhiteSky
-
That is some dumb way of doing things. What if you have a 14 folders intermediate to create the innermost folder? Use
SHCreateDirectory()
orSHCreateDirectoryEx()
instead.SHCreateDirectory(NULL, TEXT("D:\\Hi there\\Good luck"));
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
Hi brahmma, I am getting undeclared identifier, we have to include any header or lib file ??? SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C")); SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C")); error C2065: 'SHCreateDirectory' : undeclared identifier error C2065: 'SHCreateDirectoryEx' : undeclared identifier
-
Hi brahmma, I am getting undeclared identifier, we have to include any header or lib file ??? SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C")); SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C")); error C2065: 'SHCreateDirectory' : undeclared identifier error C2065: 'SHCreateDirectoryEx' : undeclared identifier
Suresh H wrote:
we have to include any header or lib file ???
#include "shlobj.h"
and you need to link to shell32.lib
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
That is some dumb way of doing things. What if you have a 14 folders intermediate to create the innermost folder? Use
SHCreateDirectory()
orSHCreateDirectoryEx()
instead.SHCreateDirectory(NULL, TEXT("D:\\Hi there\\Good luck"));
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
Good one !
Prasad Notifier using ATL | Operator new[],delete[][^]
-
Suresh H wrote:
we have to include any header or lib file ???
#include "shlobj.h"
and you need to link to shell32.lib
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
hi Brahmma , I added shell32.lib to project settings, but still i am getting the same error and also i ahve included #include "shlobj.h" . can u plz tell me what is the cause ??
I think you need to download the latest Platform SDK.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
I think you need to download the latest Platform SDK.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Hi brahmma, I am getting undeclared identifier, we have to include any header or lib file ??? SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C")); SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C")); error C2065: 'SHCreateDirectory' : undeclared identifier error C2065: 'SHCreateDirectoryEx' : undeclared identifier
Suresh H wrote:
SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C")); SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C"));
SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C")); There is a third parameter to the
Ex
version of this function! Did you not even look at this function in the documentation? theEx
version of this function allows you to define security attributes to the folder that you create. That is the third parameter while using theEx
version and that is the only difference betweenSHCreateDirectory()
andSHCreateDirectoryEx()
. If you do not want to define security attributes, then do not use theEx
version.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Suresh H wrote:
SHCreateDirectory(NULL, TEXT("C:\\A\\B\\C")); SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C"));
SHCreateDirectoryEx(NULL, TEXT("C:\\A\\B\\C")); There is a third parameter to the
Ex
version of this function! Did you not even look at this function in the documentation? theEx
version of this function allows you to define security attributes to the folder that you create. That is the third parameter while using theEx
version and that is the only difference betweenSHCreateDirectory()
andSHCreateDirectoryEx()
. If you do not want to define security attributes, then do not use theEx
version.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Good one !
Prasad Notifier using ATL | Operator new[],delete[][^]
Thanks!
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
You need to download latest platform SDK. If its already there. Update include directories settings for your IDE, to point to updated SDK.
Prasad Notifier using ATL | Operator new[],delete[][^]
-
In addition to my previous reply. Mentioned API's are available with IE version 6 onwards. Make sure sure it is present on your machine. And to compile youe code , your need to update IE version in your app, too.
#ifdef _WIN32_IE
#undef _WIN32_IE
#endif
#define _WIN32_IE 0x0601Use above line of code in your application. Before including concern API file.
Prasad Notifier using ATL | Operator new[],delete[][^]