Click here to Skip to main content
15,887,585 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMultithreading and GUID Pin
Rane19-Dec-09 0:06
Rane19-Dec-09 0:06 
QuestionRe: Multithreading and GUID Pin
CPallini19-Dec-09 0:10
mveCPallini19-Dec-09 0:10 
AnswerRe: Multithreading and GUID Pin
Rajesh R Subramanian19-Dec-09 0:16
professionalRajesh R Subramanian19-Dec-09 0:16 
QuestionMake a copy of a CDocument Pin
Darryl Bryk18-Dec-09 12:33
Darryl Bryk18-Dec-09 12:33 
AnswerRe: Make a copy of a CDocument Pin
Richard MacCutchan19-Dec-09 3:52
mveRichard MacCutchan19-Dec-09 3:52 
GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk22-Dec-09 12:01
Darryl Bryk22-Dec-09 12:01 
GeneralRe: Make a copy of a CDocument Pin
Richard MacCutchan23-Dec-09 0:03
mveRichard MacCutchan23-Dec-09 0:03 
AnswerRe: Make a copy of a CDocument Pin
Nelek20-Dec-09 21:39
protectorNelek20-Dec-09 21:39 
Well,

you work with a document and a view. Let's say your document has a CBitmap and some other parameters to hold coordinates, colours and so on.
When you save to disc, you are probably using the serialize.

One way would be...
If you just want to have a copy of your data, without saving to a file, then the best option (if space and amount of data is not an issue) is doing a copy. For instance:
CBitmap_1 --> CBitmap_2
CPoint coordinates --> CPoint coordinates_2
and so on...

Of course, all classes you use must have a copy and assignment operators. If don't you won't be able to do what you want.


Another way would be...
Using the disc to hold a temp copy of your data, you can do it without calling the Save.. or Save as.. I mean, when you call the function you want to have the "Back" action, you make a parallel saving in disc, but the user don't get any prompt to give name or even notice it using the CFile and its set of functions.

For instance, I made a software to connect with a PLC and was able to read the actual values of a Step7 function, but to do that, the actual project in the software and the read function in the PLC must be equal. So I got a copy of the online function and made a translation of the project in the programm to compare them. The user didn't notice anything of that.

Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.

GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk22-Dec-09 11:58
Darryl Bryk22-Dec-09 11:58 
GeneralRe: Make a copy of a CDocument Pin
Nelek22-Dec-09 20:56
protectorNelek22-Dec-09 20:56 
GeneralRe: Make a copy of a CDocument Pin
Darryl Bryk23-Dec-09 5:55
Darryl Bryk23-Dec-09 5:55 
GeneralRe: Make a copy of a CDocument Pin
Nelek23-Dec-09 9:39
protectorNelek23-Dec-09 9:39 
QuestionHow to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
sashoalm18-Dec-09 5:08
sashoalm18-Dec-09 5:08 
AnswerRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
«_Superman_»18-Dec-09 7:15
professional«_Superman_»18-Dec-09 7:15 
GeneralRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
sashoalm18-Dec-09 7:35
sashoalm18-Dec-09 7:35 
GeneralRe: How to use CreateProcessAsUser from service running under "NT AUTHORITY\SYSTEM"? Pin
«_Superman_»18-Dec-09 7:39
professional«_Superman_»18-Dec-09 7:39 
QuestionI m a starter Pin
code_breaker18-Dec-09 4:44
code_breaker18-Dec-09 4:44 
AnswerRe: I m a starter Pin
«_Superman_»18-Dec-09 4:53
professional«_Superman_»18-Dec-09 4:53 
AnswerRe: I m a starter Pin
Rajesh R Subramanian18-Dec-09 4:54
professionalRajesh R Subramanian18-Dec-09 4:54 
GeneralRe: I m a starter Pin
code_breaker18-Dec-09 5:56
code_breaker18-Dec-09 5:56 
GeneralRe: I m a starter Pin
Tim Craig18-Dec-09 12:56
Tim Craig18-Dec-09 12:56 
GeneralRe: I m a starter Pin
Rajesh R Subramanian18-Dec-09 17:09
professionalRajesh R Subramanian18-Dec-09 17:09 
GeneralRe: I m a starter Pin
Tim Craig18-Dec-09 18:42
Tim Craig18-Dec-09 18:42 
AnswerRe: I m a starter Pin
CPallini19-Dec-09 0:13
mveCPallini19-Dec-09 0:13 
AnswerRe: I m a starter Pin
Alan Balkany23-Dec-09 4:27
Alan Balkany23-Dec-09 4:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.