Click here to Skip to main content
15,906,335 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: What's Wrong With This Check? Pin
Dave Kreskowiak27-Dec-06 12:56
mveDave Kreskowiak27-Dec-06 12:56 
QuestionWhen should I choose Windows application or Console application? Pin
ComCoderCsharp17-Dec-06 7:30
ComCoderCsharp17-Dec-06 7:30 
AnswerRe: When should I choose Windows application or Console application? Pin
David Crow19-Dec-06 9:55
David Crow19-Dec-06 9:55 
GeneralRe: When should I choose Windows application or Console application? Pin
Roger Wright21-Dec-06 11:59
professionalRoger Wright21-Dec-06 11:59 
AnswerRe: When should I choose Windows application or Console application? Pin
PIEBALDconsult26-Dec-06 11:01
mvePIEBALDconsult26-Dec-06 11:01 
AnswerRe: When should I choose Windows application or Console application? Pin
Rilhas22-Jan-07 13:03
Rilhas22-Jan-07 13:03 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 6:11
professionalJeremy Falcon31-Jan-07 6:11 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 11:14
Rilhas31-Jan-07 11:14 
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.



GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 11:52
professionalJeremy Falcon31-Jan-07 11:52 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 12:23
Rilhas31-Jan-07 12:23 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 12:34
professionalJeremy Falcon31-Jan-07 12:34 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 12:56
Rilhas31-Jan-07 12:56 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 13:00
professionalJeremy Falcon31-Jan-07 13:00 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 13:12
Rilhas31-Jan-07 13:12 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 13:17
professionalJeremy Falcon31-Jan-07 13:17 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 13:31
Rilhas31-Jan-07 13:31 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 11:55
professionalJeremy Falcon31-Jan-07 11:55 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 12:29
Rilhas31-Jan-07 12:29 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 12:36
professionalJeremy Falcon31-Jan-07 12:36 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 12:46
Rilhas31-Jan-07 12:46 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 12:56
professionalJeremy Falcon31-Jan-07 12:56 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 13:05
Rilhas31-Jan-07 13:05 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 13:12
professionalJeremy Falcon31-Jan-07 13:12 
GeneralRe: When should I choose Windows application or Console application? Pin
Rilhas31-Jan-07 13:23
Rilhas31-Jan-07 13:23 
GeneralRe: When should I choose Windows application or Console application? Pin
Jeremy Falcon31-Jan-07 13:30
professionalJeremy Falcon31-Jan-07 13:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.