write to console or output
-
Hi there In C# is a method WriteLine in Debug class. How can I do that in a MFC win32 application.
duta wrote:
How can I do that in a MFC win32 application.
Assuming a non-GUI application, try
WriteConsole()
orWriteConsoleOutput()
. If, however, you are referring to the debug window within the IDE, check outTRACE()
."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
-
Hi there In C# is a method WriteLine in Debug class. How can I do that in a MFC win32 application.
first of all, it seems that you don't exactly know what you're talking about :
duta wrote:
in a MFC win32 application
even though MFC is built upon Win32, an application is either MFC or Win32, not both. moreover, even though it is possible to have a console in a MFC program, it is a framework designed for window oriented applications. so to reply, but not to you exact question, you still can always use the C++ mechanisms to output to the standard stream :
std::cout << "Hello World !";
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hi there In C# is a method WriteLine in Debug class. How can I do that in a MFC win32 application.
-
it's about a GUI using MFC. I'm new in the field and I wish to learn. I need so see/write some variables but without using a label.
-
first of all, it seems that you don't exactly know what you're talking about :
duta wrote:
in a MFC win32 application
even though MFC is built upon Win32, an application is either MFC or Win32, not both. moreover, even though it is possible to have a console in a MFC program, it is a framework designed for window oriented applications. so to reply, but not to you exact question, you still can always use the C++ mechanisms to output to the standard stream :
std::cout << "Hello World !";
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Actually that's not entirely correct. You can change your linker settings from /subsystem:WINDOWS to /subsystem:CONSOLE and you will get a console.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
Actually that's not entirely correct. You can change your linker settings from /subsystem:WINDOWS to /subsystem:CONSOLE and you will get a console.
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
that's why i said "even though it is possible to have a console in a MFC program", but i felt the post owner wasn't that far in learning C++/MFC...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
that's why i said "even though it is possible to have a console in a MFC program", but i felt the post owner wasn't that far in learning C++/MFC...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Damn you got me! :) Helps to read all the way to the end! :)
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
Damn you got me! :) Helps to read all the way to the end! :)
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
many thx for your posts. :) :) I've tried to switch to system:/console but I have this error: error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
duta wrote:
error LNK2019: unresolved external symbol _main...
So do you have a
main()
function?"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