|
Thx's for Responce..It's helping me..
But i need more information
My Source File Name is Store in String strFileName.
void OnCopy(const CString & strFileName)
{
m_listBox.AddString( _T("File Added: ") + strFileName);
CopyFile(strFileName, "C:\\New Text Document.txt",FALSE);
}
i want to do in this formate..
So plz help me..
Thx's in advance..
|
|
|
|
|
Isn't it working? Any errors?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
No error at all but to Copy file..
|
|
|
|
|
See one interseting point when i debug the code and fixed the break point on
(break)void OnCopy(const CString & strFileName)
{
m_listBox.AddString( _T("File Added: ") + strFileName);
CString ap;
ap=strFileName;
CopyFile(ap, "C:\\New Text Document1.txt",FALSE);
}
Then file data is copy.And when i run in simple then file data is not copy..
I cann't figure out why these thing is happen..
Plz help me
|
|
|
|
|
cpvc++ wrote: And when i run in simple then file data is not copy..
I cann't figure out why these thing is happen..
Any reason why you are not checking the return value of CopyFile() ? What about calling GetLastError() ?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
cpvc++ wrote: But i need more information
Such as?
cpvc++ wrote: i want to do in this formate..
What "format" are you referring to?
cpvc++ wrote: So plz help me..
What exactly is the problem?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello Sir
I am useing
DirectoryChanges function.It's function return add and remove file/folder name.i want to copy data of these file(DirectoryChanges) which is add or remove.
Add and remove path store in CString
strFileName . I am useing for source path name strFileName. And destination path is fixed(like c:\ or D:\). So plz help me how Can i copy the data..
Thx's in advance..
|
|
|
|
|
cpvc++ wrote: I am useing
DirectoryChanges
Do you mean ReadDirectoryChangesW() ?
cpvc++ wrote: Add and remove path store in CString
Check out PathRemoveFileSpec() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
I am currently trying to get the default language of the current User-Settings from Windows, I have found that there is a Function called GetLocaleInfo, which returns a numeric language Identifier, when I pass LOCALE_ILANGUAGE.
What I need now is a way of determining the three-character ISO-name of that language, i.e.
ARA for Arabic
BGR for Bulgarian
CAT for Catalan
DAN for Danish
DEU for German
ELL for Greek
ENU for English
ESP for Spanish
FIN for Finnish
and so on.
In .NET, there is a class called "CultureInfo", however, I need this for my MFC project.
Is there a way to get the ISO-language of the user?
|
|
|
|
|
If you scroll down at the list[^] youll see the LOCALE_SISO639LANGNAME2 which is for the three letter iso, but its only for >=Vista. The xp compatible LOCALE_SISO639LANGNAME its the two letter version.
|
|
|
|
|
Hi all,
how can we put validation Editbox on property pages of property sheet.
i want if not fill all fild of page1 the tab not be able to open the page2.
is this possible?
please help me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
yes. see OnWizardNext, OnWizardBack etc. You can do the validations in these functions
This would be applicable in case you have set the wizard mode
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Wednesday, September 3, 2008 8:19 AM
|
|
|
|
|
No its not done,
i have no back or next button.
i have 8 property pages those are used in propertsheet with ok and cancel button.
so please help me.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Then in this case you would be having a dialog class derived from CPropertyPage. You can implement the OnOK handler for that. For this go to the properties window and select OnOK from the list of handlers and here you can check whether all the controls on that page satisfy the criteria of allowing the user to navigate to the other page.
Hope that now it makes sense
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In each page's OnKillActive() method, simply return 0 to stay on that page.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello everyone,
In ATL new object wizard, we deinfe CoClass Name (under COM sub-category) and Interface Name (under COM sub-category). But I found it only displays in IDL file for Coclass/interface names. Even client only use GUID, but the names. My question is, is the names used elsewhere besides IDL file?
I quoted the client side code which uses GUID and IDL file which contains coclass/interface names below.
<pre>
Client code
MIDL_DEFINE_GUID(CLSID,
CLSID_Test,0x5B8F6FFC,0x4A45,0x4878,0x8F,0xC1,0x25,0x96,0x89,0xB0,0xDE,0xA7);
Client will use CLSID_Test other than
"0x5B8F6FFC,0x4A45,0x4878,0x8F,0xC1,0x25,0x96,0x89,0xB0,0xDE,0xA7".
IDL code,
importlib("stdole2.tlb");
[
uuid(5B8F6FFC-4A45-4878-8FC1-259689B0DEA7),
helpstring("Test Class")
]
coclass Test
{
[default] interface ITest;
};
</pre>
thanks in advance,
George
|
|
|
|
|
Hi All
I want to change MDI Application Size and Position.When code is run then i want to show Application in Top Right side Corner and size will be 4*4. Plz help me
singh
|
|
|
|
|
SetWindowPos/MoveWindow
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I just want to set the current directory to the one navigated to by the user via the CFileDialog. MFC C++ Application VS 2005 on WIndows XP.
I cannot seem to find an option other than to select a specific file.
I need to open multi files when the user selects the directory, but this is not using the CFileDialog.
Any suggestion please.
Andy.
|
|
|
|
|
you can set the current directory value in registry and then pick it up from there before showing the CFileDialog. In OPENFILENAME structure set lpstrInitialDir variable.
Hope this helps you.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I wanted to use the CFileDialog to find the directory and then set it to the current directory.
|
|
|
|
|
Andy202 wrote: to find the directory
which directory. the one that the user was currently in...
Can you elaborate your problem?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I just want to navigate to a directory and make that diectory the CurrentDirectory.
Without selectin a file.
|
|
|
|
|
You want to use CFileDialog to browse to a folder but not select a file? How about using SHBrowseForFolder() instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Thanks, I used the SHBrowseForFolder.
But needed to set the current directory for the CFileDialog - this was never shown - files opened in the background.
CFileDialog dlg( !save, extension, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, filter );
dlg.m_ofn.lpstrInitialDir = path;
Many thanks,
Andy.
|
|
|
|