|
I have SDI application in which there are two dialogs which are opened at run time.
One dialog is modeless and onclick of button on this modeless dialog One modal dialog is coming. Now based on selection of listbox on modal dialog I want to fillup
fields on modeless dialog.
For the same I require the object of class which is running in memory.
How to achieve it.
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: Now based on selection of listbox on modal dialog I want to fillup
fields on modeless dialog.
Not possible, since the modal dialog must be dismissed first before the modeless dialog can continue processing its messages.
shivditya wrote: For the same I require the object of class which is running in memory.
This makes no sense. Please elaborate.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Actually I myself was able to do it
cnc was object of my modeless class.
what I done is I declared it in MainFrame.h
Then by (CMainFrame*)AfxGetMainWindow()->cnc I was able to get
object of modeless class in modal dialog. From cnc I was
able to access all fields on form and everything worked out well.
Modification -- yes modal dialog closes once I confirm selection,I didnot mentioned that
condition,and I think that is even possible for a separate thread.
|| ART OF LIVING ||
|
|
|
|
|
Sounds rather kludgy, but glad you got it going.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi...
ca anyone tell me ...how to satrt with windows programming in .NET C++..i mean how to make dialog boxes and buttons in my window.?? plzzz answer..thanx in advance
|
|
|
|
|
oh man, that's too large topic to cover in a simple thread...
buy a book about MFC or Win32 and learn about it like this... but if you don't know C/C++ yet, i highly advise you to either learn those languages first, or move to a more easier one like C#
|
|
|
|
|
toxcct wrote: hey trhan for ur advice.. i know C/C++ very well...i also hav buk for this...but still i cant...ok...can u just tell me.. that to make these dialog boxes , icons ...i hav to do coding or i can use resources directly...please tel l me wat is GDI??
1) speak - correct - english
2) understand you books
3) try their examples/samples
4) ask specific questions
your issue(s) are too generals... no one can help.
explain what you already tried and where you're stuck, and then we'll see what we can do for you.
|
|
|
|
|
Doing it in .NET is not MFC, you should ask in the C++/CLI forum. But, if you're going to ask such broad questions, yes, buy a book.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Does this question for C++ or C++.Net?
|
|
|
|
|
WhiteSky wrote: Does this question for C++ or C++.Net?
both...
"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
|
|
|
|
|
Maybe its possible becuase both has C with ++.;P
|
|
|
|
|
dona jain wrote: ca anyone tell me ...how to satrt with windows programming in .NET C++..i mean how to make dialog boxes and buttons in my window.?? plzzz answer..thanx in advance
isn't you not getting any help from your collegue!
"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
|
|
|
|
|
If some other program launches my MFC application from command line, such as
test.exe /a /b
is there a way to return the Exit Code to the caller?
If the caller launches my MFC application with CreateProcess , then my MFC application should return the Exit Code with ExitProcess , right?
If the caller runs a batch (script) file to launch my application, how do I do to return the Exit Code?
Thanks!
Maxwell Chen
|
|
|
|
|
using the %ERRORLEVEL% environment variable for instance ?!
my bad, i uinderstood "how do i get the return code ?".
anyway, have you tried something Maxwell ? i think it should work if you're just using the exitprocess, or the exit() function from the CRT, but all depends what you're doing in your application...
|
|
|
|
|
The customer said in the email that they have a master program to invoke my application, but they have not told me how they do to run my application yet.
So I was thinking, if they are running a DOS-box (command prompt) script batch file ... ?
C:\ test.exe /a /b
C:\ _ <--- Show nothing. :->
Maxwell Chen
|
|
|
|
|
You can override ExitInstance method of your App class.
For instance, the following override make the application to return 5 :
int CMyApp::ExitInstance()
{
CWinApp::ExitInstance();
return 5;
}
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.
|
|
|
|
|
Nice method. Thanks!
Maxwell Chen
|
|
|
|
|
hi all.
I whont to set my style of window.
Can you help?
|
|
|
|
|
When asking for help, you should give more detail.
|
|
|
|
|
dude, if somebody else had asked a question that way, would you have helped him ? even if you wanted to ?
what have you tried so far ?
|
|
|
|
|
|
Can you more explain ? how did you try? did you get any error or message?
|
|
|
|
|
I can create Standard window form my program, but I whont that this window wos different, cane I control color of the window, color of the border and somting like this?
|
|
|
|
|
david bagaturia wrote: whont
david bagaturia wrote: wos
david bagaturia wrote: cane
what the hell does that mean ?!
|
|
|
|
|
I want to develop a new GINA dll to use smart card for winlogon. I have surveyed and studied MSDN and got useful information but I want to know more about that. If there is any article available, please let me know. Thanks.
|
|
|
|