Call DialogB from DialogA
-
Hello everyone, i finished with yesterdays work and got a fully functional crytography class that builds perfectly and today im starting to write my dialog based aplication. i created a few dialogs and im trying to link them but i havent found how. i know its an easy question but still i would like a recomendation. in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the
->Create();
command but i think im using it wrong ps: the aplication is in C++ for visual studio 2005 -
Hello everyone, i finished with yesterdays work and got a fully functional crytography class that builds perfectly and today im starting to write my dialog based aplication. i created a few dialogs and im trying to link them but i havent found how. i know its an easy question but still i would like a recomendation. in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the
->Create();
command but i think im using it wrong ps: the aplication is in C++ for visual studio 2005pabloraul wrote:
in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the ->Create(); command but i think im using it wrong
So dialogA is showing when you run the application? If so then you have code that does shows a dialog, it's the same for DialogB, yes?
Abandon hope all ye who answer here.
Pete O'Hanlon - the General Discussions forum
-
pabloraul wrote:
in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the ->Create(); command but i think im using it wrong
So dialogA is showing when you run the application? If so then you have code that does shows a dialog, it's the same for DialogB, yes?
Abandon hope all ye who answer here.
Pete O'Hanlon - the General Discussions forum
yes, dialog A runs when the App starts the code is the following:
CZEUSv2008Dlg(CWnd* pParent = NULL); CEncriptacion * dialogo_encriptar;
but i dont know how to use it since im copying from a thing done like 10 years ago. i trieddialogo_encriptar->DestroyWindow(); dialogo_encriptar->Create();
but it gives me error c2027 for using an undefined class and a c2227 for the left part of the "->" must point to a class struct union or generic type im just plain confused with this -
yes, dialog A runs when the App starts the code is the following:
CZEUSv2008Dlg(CWnd* pParent = NULL); CEncriptacion * dialogo_encriptar;
but i dont know how to use it since im copying from a thing done like 10 years ago. i trieddialogo_encriptar->DestroyWindow(); dialogo_encriptar->Create();
but it gives me error c2027 for using an undefined class and a c2227 for the left part of the "->" must point to a class struct union or generic type im just plain confused with this -
yes, dialog A runs when the App starts the code is the following:
CZEUSv2008Dlg(CWnd* pParent = NULL); CEncriptacion * dialogo_encriptar;
but i dont know how to use it since im copying from a thing done like 10 years ago. i trieddialogo_encriptar->DestroyWindow(); dialogo_encriptar->Create();
but it gives me error c2027 for using an undefined class and a c2227 for the left part of the "->" must point to a class struct union or generic type im just plain confused with thisWhere you tried it? I mean, does the posted code belong to a single source file? Which line is the error c2027 for? Maybe you need to post more code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke -
Where you tried it? I mean, does the posted code belong to a single source file? Which line is the error c2027 for? Maybe you need to post more code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarkei asked my dad about it and he said it was from an old stupid class called "MyDlg" so he told me to find a new way to call dialogs. now that code and way of doing it its obsolet so if i acomplish solving this issue i solved the issue for all the dialogs that need to be called. already tryed to use the .DoModal(); thing but it didnt work
modified on Wednesday, April 2, 2008 4:04 PM
-
Hello everyone, i finished with yesterdays work and got a fully functional crytography class that builds perfectly and today im starting to write my dialog based aplication. i created a few dialogs and im trying to link them but i havent found how. i know its an easy question but still i would like a recomendation. in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the
->Create();
command but i think im using it wrong ps: the aplication is in C++ for visual studio 2005pabloraul wrote:
...i think im using it wrong
That all depends on if you want a modal or modeless dialog. If the former, use
DoModal()
, much like you are already doing in your app'sInitInstance()
method to bring up dialog A."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
pabloraul wrote:
...i think im using it wrong
That all depends on if you want a modal or modeless dialog. If the former, use
DoModal()
, much like you are already doing in your app'sInitInstance()
method to bring up dialog A."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
pabloraul wrote:
an article about modal thingies
:doh: :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
pabloraul wrote:
an article about modal thingies
:doh: :rolleyes:
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
Think nice thoughts - we were all there once. Too long ago for me, I sometimes think! Iain.
Iain Clarke appears because CPallini still cares.
-
Think nice thoughts - we were all there once. Too long ago for me, I sometimes think! Iain.
Iain Clarke appears because CPallini still cares.
It wasn't his verbiage that bothered me (I'm from Oklahoma so I get accused of talking funny all the time). It was that he talked about modal while linking to a modeless article.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
It wasn't his verbiage that bothered me (I'm from Oklahoma so I get accused of talking funny all the time). It was that he talked about modal while linking to a modeless article.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
DavidCrow wrote:
It was that he talked about modal while linking to a modeless article.
Ah, he's taking the zen approach to computer programming. Learn X, by learning about ~X. Iain.
Iain Clarke appears because CPallini still cares.
-
DavidCrow wrote:
It was that he talked about modal while linking to a modeless article.
Ah, he's taking the zen approach to computer programming. Learn X, by learning about ~X. Iain.
Iain Clarke appears because CPallini still cares.
That reminds me of an incident in the elevator yesterday. The elevators in the lobby of our building can go up (to floors 2-15), or down (to floors B and SB). Above the elevator doors are red arrows pointing down. They are lit when the elevator is going down (and unlit otherwise) to let those getting on know where they are headed to. I got on yesterday with a guy that was apparently new to the building. We were both going up. Because I had gotten on so quickly, he asked me how I knew that the elevator was indeed going up. I told him it was because the red arrows did not tell me it was going down. Sort of a reverse logic thing.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
That reminds me of an incident in the elevator yesterday. The elevators in the lobby of our building can go up (to floors 2-15), or down (to floors B and SB). Above the elevator doors are red arrows pointing down. They are lit when the elevator is going down (and unlit otherwise) to let those getting on know where they are headed to. I got on yesterday with a guy that was apparently new to the building. We were both going up. Because I had gotten on so quickly, he asked me how I knew that the elevator was indeed going up. I told him it was because the red arrows did not tell me it was going down. Sort of a reverse logic thing.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
You are going to be in trouble when the bulb breaks! Iain.
Iain Clarke appears because CPallini still cares.
-
You are going to be in trouble when the bulb breaks! Iain.
Iain Clarke appears because CPallini still cares.
Iain Clarke wrote:
You are going to be in trouble when the bulb breaks!
:laugh: They are already somewhat unreliable (built in the 50s). Worst case, and has happened, I go to the 7th floor via the sub-basement.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne