|
Quite easy in fact...assuming you have the 3 Dialogs decended from an MFC class
<br />
<br />
CDialog1 dlg1;<br />
CDialog2 dlg2;<br />
CDialog3 dlg3;<br />
...<br />
if(dlg1.DoModal())<br />
...
if(dlg2.DoModal())<br />
...
if(dlg3.DoModal())<br />
...
<br />
dlg1.m_iMyValue = dlg2.m_iMyValue = dlg3.m_iMyValue;<br />
dlg2.m_iOtherValue = dlg1.m_iMyValue + dlg3.m_iSomeValue;<br />
dlg3.m_iAnyValue = dlg1.m_iThisValue * dlg2.m_iBigValue;<br />
<br />
Of course, to be truly object oriented, you'd probably add functions to get the information since the data should normally be declared protected/private. At any rate, that's a real simple example of how to do it. I hope that helps, let me know if you need any additional information.
|
|
|
|
|
san_nat wrote: have created a project in which i have 3 dialog.i need to pass and take the value from one dialog to another..
Use WIndow Messaging for same! most easiest way to do so!
"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
Support CRY- Child Relief and You
|
|
|
|
|
Yes you can use from variables in dialogs or you can use from for example if you have two dialog
CMainDialog and ClocalDialog now if you need to a variable in maindialog see
CMainDialog* m_Main = (CMainDialog* )GetParent(); m_Main->variables or functions
whitesky
|
|
|
|
|
Hi all,
Is there anybody able to use National Instruments Measurement Studio ?
I need to plot just a few points (no line) on a plot but i don't know how.
Elsewhere is there a way to do that using MFC ?
Thanx,
Desmo16.
|
|
|
|
|
Desmo16 wrote: Elsewhere is there a way to do that using MFC ?
Yes, you could do it fairly easily with MFC/GDI. Have you used MFC before?
Best,
Jun
|
|
|
|
|
Jun Du wrote:
Yes, you could do it fairly easily with MFC/GDI. Have you used MFC before?
Measurement Studio is far more Convient for drawing graphs and related thing!
"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
Support CRY- Child Relief and You
|
|
|
|
|
Desmo16 wrote: Is there anybody able to use National Instruments Measurement Studio ?
measurement studio has rich documentation present at there site! visit NI.com for more INfo
"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
Support CRY- Child Relief and You
|
|
|
|
|
Could anyone plz tell me how to ( Programmatically ) terminate / release / kill .... ( whatever ) a dll, so that one program doesn't hold on too the thing the whole time.
Plz
Thanx
Programm3r
|
|
|
|
|
Isn't enough with "FreeLibrary"?
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
|
Search for FreeLibrary function in your/online help files.
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
if this dll was loaded using LoadLibrary, then FreeLibrary should do the trick.
if this dll was loaded by the exe (the compilation was with the lib) , then when the exe unloads the dll.....
hope this helps
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Use FreeLibrary function
see MSDN for more information
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
|
Programm3r wrote: My bad .... Thanx
what?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 and found the solution was to change the system header file string, so I'm trying to figure out how to make the change take effect (I suppose I have to recompile it somehow, but I'm having a lot of trouble figuring out just how to do that). If someone could tell me where to look to make the change take effect, I would appreciate it!
Thanks!
Richard Alley
Student/Software Engineer
|
|
|
|
|
What you are attempting is very risky, and hardly ever necessary. Even if you did manage to recompile the MFC DLLs, they would be incompatible with those on the target machine. Why don't you just derive a class from whatever class getline() belongs to? Then you can override the getline() method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
He isn't talking about the MFC dlls. He is referring to the old bug in the standard header file.
I don't recommend editting it yourself. You can download the patched library (it is just header files) from Dinkuware's site that fixes that issue and several others. Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
Well, I have "#include string" (with string in the angled brackets), so I guess that's really the string file instead of string.h ....I never really thought there was a difference.
And could you give me a link to that site?
Richard Alley
Student/Software Engineer
-- modified at 9:49 Thursday 6th July, 2006
|
|
|
|
|
You should try to use #include <string> instead of #include <string.h> because the latter has been deprecated.
http://www.dinkumware.com/
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: He isn't talking about the MFC dlls.
My bad. I somehow read that into the problem.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
CMas07 wrote: I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 a
if it C++ what about Function Overloading!
"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
Support CRY- Child Relief and You
|
|
|
|
|
If I have two processes connected via TCP (blocking), if one process writes data to the socket and then closes its end of the socket connection without any kind of handshake from the other process, will the other process still be able to read the data sent by the first process? Or will the data be thrown away when the first process closes the socket (in other words, is a handshake required)? In my situation, process A sends a large amount of data (perhaps a megabyte) and then needs to close to service other requests. Process B will always have a blocking read on the socket at the time that process A sends, but the read is specifically for a smaller number of bytes than the total number that process A sent. Process B has to read the header of the data to determine how long the rest of the message is, but by the time process B figures this out and posts another read, presumably process A will have closed its end of the socket.
It appears to me that process B is always getting all the data, but I cannot find any documentation that says that this is the expected behavior. I don't want it just to be a coincidence.
|
|
|
|
|
http://www.freesoft.org/CIE/RFC/1122/99.htm[^]
4.2.2.13 Closing a Connection: RFC-793 Section 3.5
"The normal TCP close sequence delivers buffered data reliably in both directions."
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|