|
|
Hi,
I have an MDI project. When some changes occur in a view i call the view's document's SetModifiedFlag() method and when the user attempts to close the child frame, it asks to save the recent changes and that's OK. I also have a Save Project button on the toolbar and when it is pressed it calls CDocTemplate::SaveAllModified() method and saves the modified documents but
the problem is it still pops a confirmation dialog. It looks rather silly when the user presses "Save" and it says "Do you want to save?"..
Is there a way that i can "silently" save the documents without displaying the confirmation dialog box?
Any idea is welcome. Thanks in advance.
|
|
|
|
|
Hi,
I Think this is possible. Just try to overwrite the CFileDialog() or Do the serialization by skipping CFileDialog(). This is a huge mess I think. I am tryieng this application by myself. If I get the solution I will surely let u know.
bbye
Salman
Live and Let live
|
|
|
|
|
(Grab active window, click the button with name "&save")
U will find such program on net which will do this for u.
e.g. dismiss.exe which will do the same explained on 1st line.
The chosen One
|
|
|
|
|
volkan878 wrote:
Is there a way that i can "silently" save the documents without displaying the confirmation dialog box?
You'll need to override the CDocument::SaveModified() method to do everything the base class does sans the prompt.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thank you all for your responses.
I think the most efficient way for to overcome the problem, as DavidCrow suggested, will be overriding CDocument::SaveModified(). After David's post i wondered what MSDN says about SaveModified() and it says :
"Called by the framework before a modified document is to be closed. The default implementation of this function displays a message box asking the user whether to save the changes to the document, if any have been made. Override this function if your program requires a different prompting procedure. This is an advanced overridable"
So, altough i wished to discover a method like TurnOffTheStupidDialog(), i think i'll go for overriding it.
Anyway, thank you again for your replies.
|
|
|
|
|
Hi all,
anyone know how to add a new item to the outlook context menu?
for some reason, this menu is seemed to be protected, and when i try to add new item, i get an exception (in Debug mode).....
can any1 help
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Can you tell me how to create an arrary of buttons? I am assuming that the same way of creating this array of buttons will work for an array of Text Boxes and other ActiveX controls.
Thanks alot..
|
|
|
|
|
CButton arBtn[MAX_BUTTONS];
for(int i = 0 ; i < MAX_BUTTONS;i++)
{
arBtn[i].Create(....,this,...);
arBtn[i].MoveWindow(..);
arBtn[i].ShowWindow(...);
}
Hope this helps
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Is anybody can tell me where i can get login password dialog and source code....
|
|
|
|
|
I assume your question relates to entry of undisclosed text (asterisks shown instead of plain characters): Just use a standard edit control. Set the password flag (style: ES_PASSWORD), and use CEdit::SetPasswordChar() if needed.
Bernd
|
|
|
|
|
Can u provide me simple source code for login password...Because i am beginner study the visual c++!!!
Thank You
|
|
|
|
|
Just right click on your edit control. You will see properties of edit control. Check the password in the properties. Thats it.
Cheers,
Salman
Live and Let live
|
|
|
|
|
But how can i key in the password then press the button "OK", it will go to the another dialog...
|
|
|
|
|
I did not understand what you want to ask. Will you please explain me eloberately.
Thanks,
Salman
Live and Let live
|
|
|
|
|
Hi All,
I need to make a program that uses one document but multiple views in the same way that an MDI app would do it, ie ChildFrame/View combination. Anyone have any ideas how I would attack this?
Cheers,
Clint
|
|
|
|
|
i suggest two probable ways:
First, you can put your saved data into CMainFrame. Then use afxgetMainWnd() to get them needed.
Two, you can mark every doc with a label. Then use cdoctemplate to enum every doc and pick up your needing one.
How do you feel?
Hello World!
|
|
|
|
|
Hi,
I think you can Create Document Template Dynamically. I tried for this but this is not working in Release build.
bbye
Salman
Live and Let live
|
|
|
|
|
I have an application that can be download and installed from various sites
The problem is how does my application can determine where it was downloaded from.
currently it is a single file (Setup.exe)
should i have multiple files and make the software installable via net (i.e u can't download setup.exe and install later , i'll hate to do that )
also is there any way to determine that the computer is in US ?
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Come on guys even suggestions will do
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
if the Setup.exe is an archive or so, the server could modify a file inside the archive, when there was a request to this file
scio me nihil scire
My OpenSource(zlib/libpng License) Engine:
http://sourceforge.net/projects/rendertech
Its incurable, its a Pentium division failure.
|
|
|
|
|
mailMonty wrote:
...how does my application can determine where it was downloaded from.
Given your constraint of a single file, it can't. If, however, another application is involved, you could go the route that has been suggested and modify the EXE itself, or package a configuration file with the EXE that denotes where it was downloaded from. Having never tried any of this, these are only guesses on my part.
mailMonty wrote:
also is there any way to determine that the computer is in US ?
Which computer, the one that downloaded the file, or the one running it? The answer is probably 'yes' in either case, but the actual solution will differ.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thank you for ur valuable input
DavidCrow wrote:
Which computer, the one that downloaded the file, or the one running it?
the one that downloaded the file
i think i'll have to keep more than one file for setup and modify some setup files as we download (no idea how i'll do that but you guys are here to help me )
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
You could also have more than one link on the download page. Take a look at www.sysinternals.com. They usually have three links per utility: one for 9x, one for NT, and one for Alpha or Linux boxes.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I would like to understand how you can print the string from an edit box using dcPrint?
Example: dcPrint.TextOut(50,150,Editbox string here);
anyhelp greatly appreciated
ThankYou in advance.
Still no advice on how to achive this, does anyone have any sugestions that I might try?
|
|
|
|