|
Hi!!
Go through Q167834.
U will definitely get some hint from there.
"If you change then change for the good."
|
|
|
|
|
If you are using CFileDialog, call CFileDialog::GetPathName() for the complete path to the selected file. If you are not using MFC then OPENFILENAME::lpstrFile will contain the complete path to the file.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
That is true. But i want the file name from Open/Save as dialog of MS-Office or Notepad
|
|
|
|
|
how to assign signed char* data to cstring. any one help to me. thanks in advance.
Have A Nice Day!
Murali.M
|
|
|
|
|
CString str = _T("A signed char");
Owner drawn
Jesus Loves
|
|
|
|
|
thanks for your info. But I need info about signed char* variable to cstring.
Have A Nice Day!
Murali.M
|
|
|
|
|
That is what it is!
Owner drawn
Jesus Loves
|
|
|
|
|
Just assign it:
char *data = "This is some data";
CString str = data; If you're compiling for unicode, use the ATL A2T() macro.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote: If you're compiling for unicode, use the ATL A2T() macro.
Little correction Sir, we can use TCHAR instead of char to avoid use of macro like A2T
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: Little correction Sir, we can use TCHAR instead of char to avoid use of macro like A2T
I'm well aware of that, but his question specifically stated that he had a signed char , not a TCHAR .
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
HI,
Suppose I have following files
FileA.txt, FileB.txt, FileC.txt, FileD.txt, FileE.txt in the Directory C:\\Files\\
I want to create new files like FileA-FileB.txt merging the text of both files.
Then FileA-FileC.txt then another FileA-FileD.txt, then FileA-FileE.txt
I have created the above all the first file and its combination with other files
but the problem is in remaing
Means create the combinations of one file with all other.
After first one create FileB-FileC, then FileB-FileD , then FileB-FileE . after that skip second one and create the combination of 3rd and forth file. so on
When I ends up with first file combiantoin with other then I do
BOOL find = finder.FindFile("C:\\Files\\FileA.txt");
BOOL get = finder.FindNextFile(); // to get the second file again , to make its combinations
but here get give false;
Why not it finds again the next file to the fileA. and return true.
Thanks
Regards.
|
|
|
|
|
Hello!
Ur question is not very clear.
"If you change then change for the good."
|
|
|
|
|
FindNextFile() finds the next file that matches the pattern given in the call to FindFile() . Since you've only given one file name to FindFile() , FindNextFile() will always return false. To get all the text files, specify "C:\\Files\\*.txt" in the call to FindFile()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
In the 2nd iteration of upper loop , will not it again retuen the first file with *.text that will again be FileA, I want to get the 2nd file in 2nd iteration that is FileB , and 3rd file in 3rd iteration.
In the inner loop its iterating to all file once then again come to outer loop
Regards.
|
|
|
|
|
No, if you call CFileFind::FindFile ("*.txt"), then it will give you the next file at each itteration of CFileFind::FindNextFile ().
There are two remarks to be made:
1. You MUST call FindNextFile at least once before you can use the outcome of CFileFind. You cannot use the filename immediately after the call to FindFile. So what you do is:
bLoop = Finder.FindFile ("*.txt", 0)
while (bLoop)
{
bLoop = Finder.FindNextFile ();
now you can use Finder.GetPath () or whatever
}
2. There is no telling on the order in which you will receive the filenames. They will come in the order in which they happen to have been registered in the directory. If you need to handle the files in any particular order (e.g. alphabetically or based on age or whatever), you will need to first get all the filenames in a linked list or something like that, then sort them to the desired order and then use the files
Regards
|
|
|
|
|
hi everybody,
i have to understand about bayesian algorith and also implement this .i am beginer about this so please guied me where i have to start reading about bayesian algorith.reply me ASAP.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
I very need source code Lines game That it was Written visual c++(win32 application)
Who know please send for me to luanspkt2001@yahoo.com
|
|
|
|
|
|
toxcct wrote:
Its Usual Buddy.. I prefer not repond to this type of post
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
My problem is that I want to capture all packets which are sent to or received by my computer. However, I don't know how to do that if I don't use WinPcap or Ethereal...I just use the API functions of windows. Would you tell me some instructions about how to do that or point me to some specific websites that show me clearly about the technique. thanks
|
|
|
|
|
vtalau wrote: if I don't use WinPcap or Ethereal...I just use the API functions of windows. Would you tell me some instructions about how to do that or point me to some specific websites that show me clearly about the technique. thanks
look for IPHelper Api! or you can hook WinSock dll.. to see what going out or what coming in , try this link for more HOOK winsock[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
The demo attached to the article you sent me doesn't operate. I can't hook a api function of a dll successfully. By any way, thank you so much for widening my knownledge.
|
|
|
|
|
Hi, I'm now trying to simulating keyboard stroke that affect all application that running but i experiment that keybd_event(...) and SendInput(...) doesn't effect to the application that using DirectInput. Hook is useless too! May you help me solve this problem! Thank very much.
Note: I read the DirectX documentation and I known that DirectInput connect directly with hardware's driver;may it is helpful.
|
|
|
|
|
The problem is, what key stroke are you trying to send, and what result do you expect ? Sending an event to an app will not send it to a text box on the visible window. DX won't help, it's just another layer you need to get through. Most apps are not using DX.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i know there is few app using DirectInput, but i want simulate keystroke perfectly; i want a DirectInput app receive the keystroke. As i said: when i using SendInput(...) the DirectInput app can not receive the key(any key) but another app can receive it normal. i think hook is useless because DirectInput app doesn't receive keyboard frome system message queue and i think SendInput(...) only place keyboard message to system message queue so that the DirectInput app can't receive this keystroke.
From model of keyboard of MSDN library: i think i need a function that can send keystroke to the keyboard's device driver. Please help me!
|
|
|
|