|
Hi Guys
I am relative new to Visual Studio... I'm about to do some calculations on my data and I was wondering if anybody can tell me the difference between choosing a Windows application or Console application when starting a project. Seems to me to be easier to implement my algorithms in a console, because it is possible to get the data output in the command-prompt (don't know how to do this in an application) and when doing the GUI I could change it over to an application, is this possible..?
Thanks in advance
AL
|
|
|
|
|
ComCoderCsharp wrote: Seems to me to be easier to implement my algorithms in a console...
Generally speaking, algorithms are not governed/affected by platforms. Perhaps you are referring to something completely different.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I think his point may be that in a console app you don't have to waste 80% of your time programming around the Windows overhead. For a straight "Run" type app, a console program is far more efficient.
"...a photo album is like Life, but flat and stuck to pages." - Shog9
|
|
|
|
|
Sounds like you want a console application.
|
|
|
|
|
I think you are trying to determine the diference between a Win32 application and a console application, right? There is a third option, which is an MFC application.
If you justo compute data then console is grat and MFC too. Simple Win32 applications start without any interface, so it will be dificult to interact with the users, even for a simple printf!
So, I would advise you to use console or MFC. Console is simpler and standard, MFC is easier if your input is composed of many parts with numbers, buttons, checkboxes, etc.
If you know nothing about MFC then your only real option is console.
I hope this helps,
Rilhas
|
|
|
|
|
Rilhas wrote: Simple Win32 applications start without any interface, so it will be dificult to interact with the users, even for a simple printf!
Same thing with MFC.
Also, the project wizards for VS have long since generated skeleton apps for both Win32 and MFC. Don't get me wrong, I have nothing against MFC; I just don't want people to be steered wrong.
|
|
|
|
|
I'm sorry, but that is not true. An MFC application is much easier to startup that Win32.
An MFC application skeleton will typically create a window for you, which is the hardest step. Then you visually add a text box or whatever, and output to it using SetDlgItemText(). This is very simple. The corresponding simplest alternative in raw Win32 is the MessaBox (since we don't want to create a normal window) and this is not really equivalent because the program stops until the message box is dismissed.
The same applies to adding buttons and the like, which is done visually and a function is created for you. It is all automatic. I've been programming with MFC for years now, and I never learned how to do it... that goes to show how easy it is. My application work and allow data input and output, buttons, sliders, etc, without ever mastering MFC. With raw Win32 this would require much more work than I ever had with MFC.
So, I don't think I'm steering anyone the wrong way. On the contrary, I believe that anyone who needs a console application may do it with MFC. Interaction will surelly be easier, since making a bunch of text boxes and a start button is simpler and easier than a bunch of scanf's, and allows for an easier user interaction.
I can send you a simple hello world application based on a skeleton to which I add just 2 or 3 extra lines. With another 3 or 4 lines I can show the equivalent to scanf for inputing text. I bet you cannot do the same starting from a Win32 skeleton. At leaste not with lines as short as mine! In this sense MFC does rival to console applications (in the low number of lines required to startup a program).
Rogério Rilhas
PS: I assume the use of VC6 which has skeletons for both MFC and Win32, and what I say above applies to this scenario. VC7 or VC8 may have other skeletons (more ellaborate) for Win32, but I trust that even with these newer IDE's it will always be simpler to use MFC instead of Win32.
|
|
|
|
|
Rilhas wrote: I'm sorry, but that is not true. An MFC application is much easier to startup that Win32.
You're arguing apples to oranges. I never said MFC wasn't easier. You said, and I quote, "Simple Win32 applications start without any interface, so it will be dificult to interact with the users, even for a simple printf!" To that I said it's not true. I never said MFC wasn't easier to use.
Rilhas wrote: An MFC application skeleton will typically create a window for you, which is the hardest step. Then you visually add a text box or whatever, and output to it using SetDlgItemText(). This is very simple. The corresponding simplest alternative in raw Win32 is the MessaBox (since we don't want to create a normal window) and this is not really equivalent because the program stops until the message box is dismissed.
No offense, but you must be inexperienced. You may wish to try out that project wizard again for a Win32 app and notice it will create a window - which is what I said. Also, the dialog editor applies exactly the same way as it does for a MFC project.
What you're confusing is the amount of options the MFC wizard gives you compared to the Win32 one (ie, you can select a dialog-based app in the MFC wizard). Any dialog in Windows could make use of the editor no matter what framework. The Win32 wizard just gives you the option to create a normal window (think frame).
Rilhas wrote: I can send you a simple hello world application based on a skeleton to which I add just 2 or 3 extra lines. With another 3 or 4 lines I can show the equivalent to scanf for inputing text. I bet you cannot do the same starting from a Win32 skeleton. At leaste not with lines as short as mine! In this sense MFC does rival to console applications (in the low number of lines required to startup a program).
This only proves you have no clue what you're even arguing about.
|
|
|
|
|
You are missing the point. MFC is easier. MFC cannot be started without an interface. Win32 can. You can start Win32 with an interface, but it is much more hard to start a text interface. Of course this is the point, if comparing with console applications. So, don't forget, we are talking apples. Keep this in mind, and when you think I'm stearing anyone the wrong way then don't start talking oranges. Try to compare CON/MFC/WIN32 and you will, inevitably, conclude that the first 2 are much easier than the latter to setup (with skeletons) and use (in text).
So, you focused on the fact that it is possible to create a Win32 with a graphical interface, and lost focus that that is not the interface required for this comparison. You can then take the conversation through that lane, but you will be missing the point. I didn't mention that particular aspect because I thought is would be ovious (text interface, not graphical interface). And, again, don't forget the other benefits I mentioned like input text boxes and buttons.
I'm not inexperienced, so I take no offense. You just missed the point, and so you didn't understand what I meant. Maybe a problem in my English since it is not my native language. If you try to create a Win32 project with a window (in VC6) a graphical interface is created. You go to the dialog editor and draw a little button, just like with MFC. Then you try to create a callback function (you will need to add a class and some more steps) and then you find out it doesn't compile. Typically CDialog is undefined. Typically MFC does not present these problems. So if you think Win32 is an alternative to MFC in dialog (and button and textbox) creation then you are, of course, missing the point, and taking the discussion back to oranges.
No, I'm not condusing anything, I'm sure you are. But please: try to do an equivalent to printf and scanf in Win32 with VC6 with... say... 10 extra lines? 10 extra short lines? With a button, maybe? Or a checkbox? Please do, and then we will see which of us is confused.
I know what I'm talking about. You are the one singing off-key here. And you are the one misleading people.
|
|
|
|
|
Rilhas wrote: You are missing the point.
I'm not missing anything. What you said is incorrect primarily because you don't know what it is even that you're arguing, and you're arguing apples to oranges.
Rilhas wrote: MFC is easier.
Can you at least read my posts before you start arguing?
Rilhas wrote: MFC cannot be started without an interface.
More proof you don't know what you're talking about. At least get your terminology correct when you don't listen. You can create a MFC app without a GUI; however, the wizard doesn't give you that option.
Rilhas wrote: So, you focused on the fact that it is possible to create a Win32 with a graphical interface, and lost focus that that is not the interface required for this comparison.
You mean the comparison that you made that didn't even address my point? You were talking about wizards and so was I. I even quoted that. Then, your next statement was about how MFC is easier, blah blah blah.
Rilhas wrote: No, I'm not condusing anything, I'm sure you are. But please: try to do an equivalent to printf and scanf in Win32 with VC6 with... say... 10 extra lines? 10 extra short lines? With a button, maybe? Or a checkbox? Please do, and then we will see which of us is confused.
Ok, look I'll say this S-L-O-W-E-R! You're comparing apples to oranges just to argue a point I never made.
Rilhas wrote: I know what I'm talking about. You are the one singing off-key here. And you are the one misleading people.
Yeah, for a beginner you're gonna have a difficult time with an attitude like that. Good luck, you'll need it.
|
|
|
|
|
Yes, you missed the point. Proven again. What was the point? Remember? "When should I choose Windows application or Console application?". Remember why I brought up MFC? Just read back, don't make me re-type it.
MFC is easier (than Win32). This is the point. You missed it, argued wrong, and then didn't find a way to come back gracefully. Simple: just apologise. I read your posts. No apologies, they still say I was misleading. Well, it is easier, so where was I misleading? Oh, I know: you didn't understand the context of my sentence. Sorry, your bad.
The terminoloy is correct. I can even start and MFC application with hammer and nails. Yes. a Magnific Fine Chair. Oh, sorry, lost context. You mean MFC as in VC or MFC as in bricolage? Please: don't loose focus. Don't try to argue terminology, otherwise a can start arguing that MFC don't have graphical interfaces, just wood. You won't be able to contradict me, but we won't get anywhere.
OF COURSE MFC WITH A WIZARD!! At least MFC with a wizard is easier than Win32 in assembly. Do you agree or am I being misleading?
I'm not comparing apples to oranges. I was talking about apples. You started talking about oranges because you missed the context of my sentence (maybe just to say something). And you stated that I was misleading while talking of apples. And then you just keep on defending that it was a good idea to talk oranges. At the same time you say apples are good. I'm sorry, your comments are just pointless.
I'm not a beginner. Probably much more experienced than you and in many more areas. You just don't know, but you think you do.
|
|
|
|
|
Rilhas wrote: MFC is easier (than Win32). This is the point. You missed it, argued wrong, and then didn't find a way to come back gracefully.
You are one stubborn fool. What part of I never even bothered to address this point did you not get? And this time actually answer the question to prove you're even bothering to read my posts.
Rilhas wrote: MFC is easier (than Win32). This is the point. You missed it
That's nice. Enjoy your stay at the "I hate to listen" club.
Rilhas wrote: I'm not a beginner. Probably much more experienced than you and in many more areas. You just don't know, but you think you do.
If you're not a beginner then you're a slow learner. And after this thread, I can believe it.
|
|
|
|
|
Your correction to my post. This is the reason why. You missed the point and argued I was misleading. Is this enough for you to understand now?
I'm listening: what exactly have you said about this? Nothing. Still nothing. I sure would like to read you say that MFC is, in fact, almost as easy as CON, and Win32 is much harder (to use as CON). I'm still waiting. But you avoid a position on this. Of course, because if you said so then you would have to admit that your fisrt correction was out-of-place... and that it lost focus and missed the point. Maybe you could even say something like "What I wrote is true, but I now understand that it doesn't address your comments and that you were not being misleading... I just didn't understand what you meant right away". Should I wait sitting down? Enjoy your stay at the "I hate to speak" club.
I'm not a slow learner. But I'm a good learner. I typically don't throw myself inside large big holes on the ground like you did I try to crawl out still trying to look good.
|
|
|
|
|
Rilhas wrote: Your correction to my post. This is the reason why. You missed the point and argued I was misleading. Is this enough for you to understand now?
If that's your answer to my question you really do have comprehension issues.
You say something inaccurate, I say it's wrong. You get an get pissed off all you want to about it, but the more you talk the more I realize you are one stubborn person that likes to argue when bored.
Rilhas wrote: I'm listening: what exactly have you said about this? Nothing. Still nothing.
EXACTLY MY DAMN POINT! Which means your arguing about it is retarded. Nevertheless, your claim is stupid, but we'll have to deal with one thing about a time because of your learning disability.
Rilhas wrote: Enjoy your stay at the "I hate to speak" club.
Wow, one point for originality there.
|
|
|
|
|
Still nothing there. Still waiting here. I didn't say incorrect, you just didn't consider context. The exact same as my wood MFC. All you said was wrong. Oh, and Win32 if you Pay16 Supermarkets also does not have a graphical interface. Its a supermarket. So your comment is inaccurate. I'll give you that I could have spoecified context all the way in all my sentences, if you would give me that that does not make my comments untrue. But you won't do that, because you don't understand MFC or CON enough so you think the comparison is retarded. That limits all options for an understanding.
Still nothing? You do have a point somewhere, because you say I was misleading. But you still don't say why MFC/CON comparison is that bad. And you also don't say why it should have been obvious for me that Win32 graphical interface is a good for printf replacement. It is frustrating that you still do not assume a position. This is getting boring. TV is becoming more interesting (it is not as dumb, and if I talk to it it gives back smarter answers).
Thanks. I thought it would be nice to keep the same tone... maybe it would make it easier for you to understand... but it seems you are capable of going on and on and on and don't add anything to your accusations. That is an art, which you don't master.
|
|
|
|
|
The point is, without the wizards both Win32 AND MFC do not have a GUI/Window. With them, BOTH of them do. You need to recheck that Win32 app wizard if you think otherwise.
|
|
|
|
|
MFC application without window? You have a wizard for that? I think you should recheck your IDE's options. With wizards both have a graphical interface. One of them close to text interface (MFC) another much further away (Win32).
Anyway, if you want to get really technical and argue that Win32 an also be used as a text interface then you will be right. I won't argue that, of course, because it is true. This discussion will just become pointless since that was not the objective of this discussion.
I stated from the begining that MFC is an easy enough alternative to console, and you said that I was steering people wrong. All my other comments are always emphasizing simplicity, so why didn't you give up there? You argued that MFC is equivalent to Win32... and keep on arguing that. That is, to say the least, not useful. Recheck the meaning of printf.
|
|
|
|
|
Rilhas wrote: MFC application without window? You have a wizard for that?
You really don't listen.
Rilhas wrote: With wizards both have a graphical interface.
Nor do you know what you're even talking about.
Rilhas wrote:
I stated from the begining that MFC is an easy enough alternative to console, and you said that I was steering people wrong.
Bull, you said that the Win32 app wizard doesn't create a window. I said you're wrong. Maybe your English sucks - who knows.
|
|
|
|
|
Well, I do believe now that you lack the brain capacity to understand your mistakes. I don't think you can learn anything new until you retrace your steps and try the Win32 application that can serve as a console substitute. I'll wait for that Mr. Theory. Go back all the way to the begining and observe, carefully, that what I said is true from the start and that I wasn't misleading people. Then read on, carefully again, and observe that you just tried to defend your point of view, blindly, just to try not to look so bad. Too late.
I do know. That comment is just ignorant. You don't know me at all, don't you think you better be quiet instead of speaking garbage? With wizards both have a graphical interface. You didn't know that? Do you know what graphical means? And interface? You English is not that good, I guess...
Ididn't say without a window... I meant without an interface taking the remainder of the context: a text interface. I don't think my English failed there, your brain just wasn't able to pick up on the context. Anyway, I hope your Portuguese is better than my English.
|
|
|
|
|
Rilhas wrote: Well, I do believe now that you lack the brain capacity to understand your mistakes.
Look, insults from a child don't really get on my nerves. Although you not listening does. But, whatever I'm sure you have paint to sniff so I won't keep you waiting too much longer with this post.
Rilhas wrote: I don't think you can learn anything new until you retrace your steps and try the Win32 application that can serve as a console substitute.
This is pathetic. For one, both MFC and direct Win32 are capable of much of the same things. The pathetic part is I NEVER SAID ANYTHING REMOTELY CLOSE TO THESE LINES IN THE FIRST PLACE. Did you catch that, or would you prefer to not read it AGAIN.
Quit being stubborn and think. You, the newbie having no idea what is being talked about, arguing with someone who is NOT a newbie and who in all likelihood knows way more about programming than you. Just think about that for a bit. Then, stop arguing and start reading.
Rilhas wrote: Ididn't say without a window... I meant without an interface taking the remainder of the context: a text interface. I don't think my English failed there, your brain just wasn't able to pick up on the context.
Your context suggested it was in comparison to a mainframe windows in MFC, and later switched to a dialog. Not to mention you used the terms and the term "window" throughout the remainder of this thread interchangeably.
But hey, don't let me stop you from acting like a fool.
|
|
|
|
|
You don't know how old I am. You say insults don't offend you, but your reaction just states otherwise. And it was not an insult, was the observation of a fact.
I did read it. You keep saying the same. When will you admit that MFC is a better alternative to console than Win32? Never? Ok, just keep arguing.
I'm not a newbie. You insist on the very same mistake, and that teaches me a lot about you. You should have, at least, searched the web for my name and you would have found a lot of high-technology telecom systems and image processing algorithms developed by me (and mny more). Ignorance does not make you look good, no matter what your friends tell you.
Your name, on the other hand, hit more on this forum. Probably means you say a lot but acomplish far less.
Yes, I used the term window. Dialog appeared especially when pointing out compilation erros. You didn't comment on that either, you just talk, you don't solve problems. Dialog and window are confusing terms to you? Well, they souldn't. And you should feel confused if I used them interchangeably... especially since I also mentioned buttons and text boxes.
I'm the one still waiting to hear from you defend that MFC is not closer to CON than WIN32. You talk and talk and talk, but the fact is you should have kept your first correction to my post all to yourself. Now you just try to get out gracefully and that is pitiful and impossible. I have some time to spare now, so no rpblem for me.
|
|
|
|
|
Rilhas wrote: You don't know how old I am. You say insults don't offend you, but your reaction just states otherwise. And it was not an insult, was the observation of a fact.
I wasn't referring to your age, rather your mentality.
Rilhas wrote: I did read it. You keep saying the same. When will you admit that MFC is a better alternative to console than Win32? Never? Ok, just keep arguing.
When will you admit you have a comprehension problem?
Rilhas wrote: Yes, I used the term window. Dialog appeared especially when pointing out compilation erros. You didn't comment on that either, you just talk, you don't solve problems. Dialog and window are confusing terms to you? Well, they souldn't. And you should feel confused if I used them interchangeably... especially since I also mentioned buttons and text boxes.
Oh, so now you're pulling a 180 just to argue?
And for you not being a newbie I find it rather amusing you get compilation errors from a wizard generated project.
Rilhas wrote: I'm the one still waiting to hear from you defend that MFC is not closer to CON than WIN32.
For starters, your comparison of the two is retarded in the first place and only shows your ignorance. Nevertheless, this wasn't what I was talking about. The fact you choose not to listen really only means you want to argue, probably because you have no life and are bored.
Rilhas wrote: I have some time to spare now, so no rpblem for me.
Yup, looks like I was right. Get a hobby.
|
|
|
|
|
My mentality? That of a child? That was insightful. Thanks.
So you will not admit? Is that your quick intelligent answer? I was hopping for something more along the lines "I will admit MFC is a good alternative to CON when you admit that Win32 can have a graphical interface built by the wizard". But no: your great comeback is about my comprehension problem? He he he! That just made me laugh. You think that comment looks good on you? You realize that that is the same as admiting you should have been quiet from the start, don't you?
No, no 180. I wrote that Win32 as a CDialog missing, typically, when you use the resource editor to try and create a button in a dialog. Why do you think this is a 180? I don't see where you note the change... I guess you are trying to confuse me, you succeeded. Maybe 180 is not the same as in Portuguese. 180=PI/2? Then I'm sorry to disapoint you, no 180 here.
Major mistake on your part. The errors don't apear when compiling the Win32 skeleton. You think they did? And you thought that was my fault? That is consistent with the rest of the things you think you know. No, the errors appear when you manually try to add a resource with a button. Maybe you have a special technique, I'm all ears.
The comparison is not retarded. I can prove it to you. Do you want me to teach you how to do a printf and scanf in an MFC (windowed) application in about 10 extra short lines? If you think that is retarded it just goes to show that 1) you have a lot to learn, and 2) you missed the point. But, of course, you don't need proof. You're just saying that because you think it makes you look smart.
Yes, I have a life. But it is 12AM here (almost time for bed), and my computer is near the TV. So I just comment away, don't worry about me.
Again: you think you know, but you just guessed wrong. You do that a lot, don't you?
|
|
|
|
|
Have fun arguing with yourself. I have a life. See ya.
|
|
|
|
|
I bet you have. If it involves other people then I feel sorry for them. Anyway, nice escape.
|
|
|
|
|