|
Try showing the actual code from your program, and make sure that all the parameters are valid.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi,
i search for an function to restore folder content to previous status/version?
I mean, if i add new files to folder, i need in some cases to restore a status before adding new files!?
Restore to previous version?
Is there an API to use for that or some sample code??
Simple single deletion of any each file is not the way, because there can be many files added(hundreds)!
Thanks for any help!
|
|
|
|
|
bosfan wrote: i search for an function to restore folder content to previous status/version? I mean, if i add new files to folder, i need in some cases to restore a status before adding new files!? Restore to previous version? Is there an API to use for that or some sample code??
No such API exists.
bosfan wrote: Simple single deletion of any each file is not the way, because there can be many files added(hundreds)!
You can use SHFileOperation() with wildcards.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi,
thanks for answer!
regards
bosfan
|
|
|
|
|
Windows has a feature called Backup.
Find it here , and a list of related actions here.
|
|
|
|
|
If functionality provided by the operating system is not sufficient, you might consider using software revision control for your files or differential backup with your prefered tool.
Philippe Mori
|
|
|
|
|
Hi all,
I have made a application in which i play video files Using MCI api's. Everything is working fine accept when the video ends playing and i move my dialog or any window comes over my dialog then the control in which i play my video becomes empty or it does not repaint itself.
I want that after video ends and some windows come up on it, the image should remain there.
How can i do this??
Thanks in advance
|
|
|
|
|
Do you set m_Play.EnableWindow to TRUE ?
m_Play.EnableWindow(TRUE);
m_Video = MCIWndCreate(this->GetSafeHwnd(),
AfxGetInstanceHandle(),
WS_CHILD | WS_VISIBLE|MCIWNDF_NOMENU,m_Path);
MCIWndPlay(m_Video);
Pause = FALSE;
m_Play.EnableWindow(TRUE);
[ here] is a fine example of MCIWndPlay usage that remains there.
|
|
|
|
|
Hi,
I'd like to make the button save as.. and load, but I think that maybe this button is made in visual as activeX or something like that.
Do you know if it is made already?
|
|
|
|
|
antonio343 wrote: I'd like to make the button save as.. and load, but I think that maybe this button is made in visual as activeX or something like that.
Where do you want to put a button save-as or load ? dialog ? menu ? toolbar ?
And, adding a button for the save-as and load will not actually do all the code ... just sayin'
M.
Watched code never compiles.
|
|
|
|
|
Just add them to your toolbar, and then add the code handlers for both items as required.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I'd like to add this button in a dialog. But I dnt know where are these button or if its ones is already made
|
|
|
|
|
You have to make the button yourself (just use a button control), then within the event handler of the button press, add the code you need for prompting the user for file names (see my solution[^]).
|
|
|
|
|
What do you mean "already made"? If you are creating an application then you should know that all toolbar or dialog buttons have to be added to the project by you. In both cases the Visual Studio Framework does most of the hard work for you; all you have to do is use the designer to drag items to the right place.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
If you're talking about using the Windows common dialog for "Save As..." or "File Open" then look at CFileDialog[^] if you're using MFC or the Common Items Dialog[^] when using just the WinAPI.
|
|
|
|
|
Yes Im using mfc, then I must look CFileDialog?
|
|
|
|
|
Yes... you can still use the WinAPI directly, but using MFC classes is generally easier.
|
|
|
|
|
antonio343 wrote:
Do you know if it is made already?
Oy vey, you want to know how it is made already!
Anyway, jewish language jokes aside, you add buttons to your dialog though the UI editor in MFC, bring up the toolbar, drag and drop a button where you want it, give it a meaningfull ID, add a handler, add the code.
If that is too much, do a basic tutorial in MFC.
==============================
Nothing to say.
modified 3-Nov-11 3:54am.
|
|
|
|
|
I remember this user from before stating he was just starting to learn to use MFC plus he's not a native English speaker... So, we need to be patient with the new ones...
|
|
|
|
|
Could you show me how to use to load/save file with CFileDialog??
I dont find some example
|
|
|
|
|
Gotta learn the joy of Google / Bing. Simple search for CFileDialog(), 2nd returned result was a tutorial.
CFileDialog()[^]
You'd find it a lot faster yourself rather than wait around for somebody to post an answer.
|
|
|
|
|
I'm triying to do this:
void CDlgResultados::SaveToFile(void)
{
this->UpdateData();
CFile f;
CString strFilter =_T("*.txt");
CFileDialog FileDlg(FALSE, _T(".txt"), NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite);
CArchive ar(&f, CArchive::store);
ar << cadena;
ar.Close();
}
else
return;
f.Close();
}
Everything run well, but it function save the file in the folder of my project and not when I want.
what happen?
|
|
|
|
|
|
Ok, thank you very much
Everything run right
|
|
|
|
|
I'm sorry, I didn't understand very well what you said.
What do you mean?
I have a button in a dialog, which I'd like to be the open botton (Load). I know that in the toolbar there are this button but they haven't code only
BEGIN_MESSAGE_MAP(CAdestApp, CWinAppEx)
ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen)
..
|
|
|
|