|
|
My question was is there a way i can make GUIs in the VS2005 IDE without going a 100% coding route and not requiring the .net framework to run the application, maybe i should repost in the Visual studio section.
|
|
|
|
|
Hello,
The following functions
_cexit, _c_exit, exit and _exit works fine on release mode but in debug mode the processes/procedures are not terminated when the functions are called.
I use VS 2003 and I use both managed and unmanaged code. Anyway I tried those functions with #pragma managed and #pragma unmanaged but the problem is the same.
Do you know why and how to make them working on debug mode?
Thanks for your help.
|
|
|
|
|
Which one do you need to use? They al perform differently.
MArk
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I use _c_exit()
It allows me to exit from a procedure/process without closing the application.
|
|
|
|
|
Arris7 wrote: I use _c_exit()
I'm not sure what you expect it to do...
"Performs quick C library termination procedures and returns to the caller, but does not terminate the process."
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark,
Sorry for the confusion, I am not clear with my problem.
Let me give an example.
Suppose the user of my application type-in some data from within an edit control.
This calls a function which calls a 2nd function and finally a 3rd function is called.
But the 3rd function rejects the data entered by the user.
It returns a message to the user.
The user clicks on OK and finally gets the hand on the application.
So the unique solution I've found is _c_exit() that terminates the procedure and gives the hand to the application without closing it.
But is does not work in debug mode.
Any idea?
|
|
|
|
|
I think you may be misunderstanding what these functions are for.
They are not for flow control in function calls. They are for exiting a process (i.e. a running application).
Simple error codes returned from your functions will allow the caller to take the appropriate action
based on the value it gets back from a called function.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
THANKS FOR GREAT HELP...BUT STILL MY PROBLEM IS THERE...CAN U TELL ME HOW TO USE THESE FUNCTIONS EXACTLY??
|
|
|
|
|
Use any of the below to retrive text from your edit box
CString strWindowText;
editBoxObject.GetWindowText(strWindowText);
GetDlgItem(ID_OF_THE_EDIT_BOX)->GetWindowText(strWindowText);
then create an CStdiofile object
then the WriteString(strWindowText) function of CStrdiofile to save the text into disk
Rgds
Sivan
http://www.ktsinfotech.com
|
|
|
|
|
where to specify the path of file in which i want that string??
|
|
|
|
|
Just to be clear, are you using MFC or not ? If you aren't, this code is of no use for you. If you are, you should be able to create variables you can use to access the text in the controls.
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 )
|
|
|
|
|
Sivan Manimala wrote: CStdiofile
He is not using MFC, as far as I can tell. I have no idea why.
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 )
|
|
|
|
|
GetWindowText or GetDlgItemText will get you the string. If you know C++ well, as you said, you should know how to use ofstream to write text to a file.
You really need to start posting your code, so we can see what you've done, establish that you're really not using MFC, and offer specific help, based on seeing what you've tried.
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 )
|
|
|
|
|
Why are you starting a new topic for this? Starting a new topic only adds to the clutter on this board. I, for one, regularly go back and review the topics I have answerred to see if the person I answerred understood what I said.
Ohh and please do NOT delete this topic because for me at least the deletion of topics totally stuffs the board.
|
|
|
|
|
|
WTF is the problem with you buddy ?
i thought you had understood last day when we asked you to be polite !
but it seems that you have some trouble to understand the benefit of an ADVICE
|
|
|
|
|
dona jain wrote: ...MY PROBLEM...
What problem?
dona jain wrote: ...THESE FUNCTIONS...
What functions?
"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
|
|
|
|
|
I said maybe his question is transparent for me;).
|
|
|
|
|
|
I said wheres his question how some people answer to him but I saw he asked one hours ago.
|
|
|
|
|
David i wouldnt worry about it...
he got the answers in a previous post but doesnt know how to use the functions so in a way doesnt know how to program.
myself i'm just confused about what he wants, seems that he wants Win32 but i have a feeling its really managed C++/CLI.
dont think its MFC or Win32.
at present his just posted in every forum, managed, win forms and here
would be nice if he could clam down and just try and explain
1) which compiler
2) which project
then we could point him to the right forum
3) and on wards for the coding he needs. (a good book by the looks of it)
just my 2 cent on this little problem
p.s by the way we are ment to go look in there profiles to find out what they are on about as we have time for that
pp.s i did because i just hate being confused
|
|
|
|
|
whta problem??
"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
|
|
|
|
|
Hi everybody,
i added the function _putenv to my source code and now i have a linker error (LNK2019)
"Can't resolve external symbol"
_putenv is a system funtion of stdlib.h
How can i resolve this error?
Big thanks
|
|
|
|
|
rename your function.
Greetings from Germany
|
|
|
|