|
Sorry I use FindFirstFile and not FindNext.
it wos my mistake.
|
|
|
|
|
Well, then it would be nice that you explain what you mean by "I can't write". This is not clear at all. What's happening ? Do you have a compilation error ? A linker error ? Or what ?
(And of course, if the compiler give an error, then supply it to us also).
|
|
|
|
|
Now not compile error, somting else.
In program I use
hSearch = FindFirstFile("C:\\My Files\\*.*",&FileData);
if(hSearch != INVALID_HANDLE_VALUE)
{
. . .
. . .
// pFileNameOld = L"C:\\My Files\\" + FileData.cFileName
//in this
_wrename(pFileNameOld,pFileName);
}
wen I try to rename file program stop work and thets it.
in "Watch1" I see thet FileData.cFileName is equal to ".", why?
|
|
|
|
|
david bagaturia wrote: in "Watch1" I see thet FileData.cFileName is equal to ".", why?
Strange, are you sure it is ".".
Use FindClose to close file handle brefore renaming it.Check return value of _wrename for any possible arrors.
|
|
|
|
|
There are two directories in every folder named "." and "..", They are usually hidden system directories that allow navigation. You cannot do anything with them, so in your code, when you find them, skip them.
|
|
|
|
|
"." means "current directory", which is a sub directory as far as the filesystem is concerned
Likewise for ".." (parent directory)
So you need to do some extra checking to see if you're dealing with a file or a folder
|
|
|
|
|
Thanks, it help me.
I solve problem.
|
|
|
|
|
david bagaturia wrote: I cant write:
FindNextFile("C:\\My File\\*",&FileData);
or
FindNextFile("C:\\My File\\*.*",&FileData);
No, you cant. Can you tell , what you are trying to do?
|
|
|
|
|
I need to find all files in given folder,
and I use FildFirstFile. In message I made mistake and write FindeNextFile.
Sorry for that.
|
|
|
|
|
|
thanks mOnO.
It help me.
I have skype and I will send you code bu it.
|
|
|
|
|
How to check if the check box is checked or not in win 32 App ???
We use to use member of the check box to check if its checked or not checked in MFC
m_CkBox == TRUE
how to do it in win 32 app ????
I want to open the text file in note pad how to do it ???
This works in MFC
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
How to do it in Win 32 API ??? I am not able to use ShellExecute in win 32 App
Thanking you,
Suresh HC
|
|
|
|
|
Suresh H wrote: How to check if the check box is checked or not in win 32 App ???
We use to use member of the check box to check if its checked or not checked in MFC
m_CkBox == TRUE
how to do it in win 32 app ????
BM_GETCHECK.
Suresh H wrote: ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Suresh H wrote: How to do it in Win 32 API ??? I am not able to use ShellExecute in win 32 App
See what GetLastError returns. See the documentation for further details.
|
|
|
|
|
Thanks Thomas for the response & for the Solution.
Its working now I just did
if (::SendMessage(hwndCheckBox,BM_GETCHECK,0,0)==BST_CHECKED)
to check the status.
But still for this I am getting error
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Error:-
: error C2065: 'ShellExecute' : undeclared identifier
Error executing cl.exe.
|
|
|
|
|
Suresh H wrote: But still for this I am getting error
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Error:-
: error C2065: 'ShellExecute' : undeclared identifier
Error executing cl.exe.
Header: Declared in Shellapi.h.
Import Library: Shell32.lib.
|
|
|
|
|
Hi Nibu Thomas ,
Its working now, as u said I include only Shellapi.h its working.
Thank you very much.
|
|
|
|
|
See BM_GETCHECK and BM_GETSTATE
|
|
|
|
|
Thanks White Sky for the response. info is very use full.
But still for this I am getting error for this statement
ShellExecute(NULL, "open", FileName ,NULL, NULL, SW_SHOWNORMAL);
Error:-
: error C2065: 'ShellExecute' : undeclared identifier
Error executing cl.exe.
|
|
|
|
|
I think your problem is sovle with Nibu babu thomas answer,right;)
|
|
|
|
|
yes ........White Sky.....its done ...Thanks for the responce.
|
|
|
|
|
You're welcome
|
|
|
|
|
Hello
All
I am changing font of my dialog box to marathi in my application,but by changing font, some part of dialog box's font is not change.It remains in English.So what may be the reason of this problem.If any body have solution to this please forward me.
Thanks
Atul Mahajan
|
|
|
|
|
|
I am changing Font of Dialog Box
Atul Mahajan
|
|
|
|
|
You change font of dialog ok afterward what problems?
|
|
|
|