CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 12 of 12

Thread: GUI Programming

  1. #1
    Join Date
    May 2007
    Posts
    67

    GUI Programming-need your HELP!!!

    Hello to all,
    Sorry for the newbe question but I never experienced in that.

    How do i combine my code with a GUI in ,say, visual studio 2005.
    I only know how to write "school code" to a console.
    How can I make my code more - real like, and move it into user interface
    for better functionality.

    Thnx alot.
    Last edited by gizmokaka; May 20th, 2007 at 12:02 PM. Reason: NO COMMENTS

  2. #2
    Join Date
    Nov 2006
    Posts
    1,611

    Re: GUI Programming

    You'll need to work through some tutorial examples on GUI programming.

    Combining an existing console application with GUI is a redesign of the application.

    The key unique feature of GUI over console programming is that GUI applications are constructed as a set of responses to events, whereas console applications assume a starting point, run through a series of operations, then exit. GUI applications start up, then wait for events to occur, which can occur in any order (keystrokes, mouse moves, button clicks, etc).

    The subject is too large to engage in posts here. You'll have to find tutorials for your compiler/framework that walk you through the concepts, and come back here with questions on more specific tasks.

    Google or search around here for GUI tutorial, GUI example, Windows tutorial, MFC tutorial (if you have MFC), WTL tutorial (if you get WTL), wxWidgets tutorial (if you'd like to make linux GUI apps) - see where you go from there.

  3. #3
    Join Date
    May 2007
    Posts
    67

    Re: GUI Programming

    Thank you Jvene,
    I tried finding good tutorials pre posting
    but could not find any decent ones that I can actually learn from

    I will how ever try to find something

  4. #4
    Join Date
    Nov 2006
    Posts
    1,611

    Re: GUI Programming

    Which framework are you favoring, MFC, WTL or others?

  5. #5
    Join Date
    May 2007
    Posts
    67

    Re: GUI Programming

    Sorry for the late reply, I could not get to my PC for a long time

    I have no favorite Framework, what ever is your favorite will also be mine,
    just tell how to use either.

    thank you very much.

  6. #6
    Join Date
    Mar 2005
    Location
    Romania,Cluj-Napoca
    Posts
    1,073

    Re: GUI Programming

    Then you could start with MFC

    Tutorial

    But I suggest to get an mfc book ... that would be more helpful than a tutorial . ( IMHO )

    Good luck.
    Gili
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili

  7. #7
    Join Date
    May 2007
    Posts
    67

    Re: GUI Programming

    Thank you very much gili

    It's not a professional question but where are you from
    I meen world wide?

  8. #8
    Join Date
    Mar 2005
    Location
    Romania,Cluj-Napoca
    Posts
    1,073

    Re: GUI Programming

    Well if you read my profile you will find it ) .

    Regards,
    Gili
    Please use code tags [code] [/code]

    We would change the world, but God won't give us the sourcecode..
    Undocumented futures are fun and useful....
    ___
    ______
    Gili

  9. #9
    Join Date
    May 2007
    Posts
    67

    Re: GUI Programming

    Hey that's great I am also a Romanian in origin.
    My father Came from Romania.
    and my girlfriend is also Romanian .

    very nice to meet you

  10. #10
    Join Date
    Mar 2007
    Posts
    7

    Question GUI Programming - Win API or MFC?

    Hello,
    My question is whether making the GIU using only the Win32 API is an overkill, or it is quite normal? Should one definetly use MFC, or some other GUI library?
    How do you guys create GUIs?

  11. #11
    Join Date
    Nov 2006
    Posts
    1,611

    Re: GUI Programming

    Hey stormdev:

    The question hinges somewhat on the nature of C vs C++. I say that because the Win32 API, and the general approach to design of a GUI application based on only Win32API calls, is generally a C implementation.

    If, say, one began immediately to apply C++ concepts to the design of a GUI application that was started out based only on the win32 API, eventually you would end up encapsulating most of the concepts into C++ objects. The result, if taken to logical extension, would be a framework something along the lines of MFC, wxWidgets, QT, WTL - or any of the others.

    While for the sake of a single application, the resulting 'framework' you'd create would be small, limited to those features of interest to you in that one application, the purpose of bothering with objects is, among other factors, the ability to reuse code made to solve generic design goals like creating windows, handling files, dealing with resource, painting, etc.

    Most engineers agree that C++ provides leverage, and therefore by extension so do the frameworks, depending on their quality and suitability toward your application goals.

    In my case, I focus on cross platform application development, which means I want one body of code (as much as possible) to compile and work on Linux, Windows and Mac (sometimes Palm, hand helds, smart phones, whatever).

    By abstracting the concepts common to all GUI's (that of the windows, dialogs, buttons, menus, events, etc) - a framework can offer a developer the option of creating cross platform GUI applications that is otherwise impracticable in C.

    It may be possible in C, but the amount of work involved in write GUI code in C that's "not win32", not "Linux" and not "MAC" - but generic to all 3 - is tough enough to try it without the leverage of object design.

    There are still developers writing in C for these GUI applications. Most will identify the size of the executable, or the sense of speed. There was a time with that imperative was more important, but I think that time was gone by the era of 128Mbyte RAM desktops and laptops, around the time of 400Mhz CPU's.

    There are lots of options and considerations that go into an application's engineering, so I can't say that a given framework is an obvious choice for most applications. I use wxWidgets frequently, but I've had little trouble using MFC, WTL, Borland's OWL (back when OS/2 seemed to matter), and others.

    You ask, also, in an era of .NET application design, and that's an entirely 'other' area. With respect to win32 applications, and Linux and MAC, the operating system is exposed as a set of functions. The C++ frameworks like MFC offer leverage, to varying degrees of quality, that give leverage to developers writing to those targets. It's the object level exposure presented by the framework that the programmer uses to implement the app.

    In .NET, the operating system is exposed to the application programmer as a set of .NET objects. This obviates the need for a framework to some degree, and offers the leverage of objects at a 'native' level. The degree to which this is a 'good' thing is related to the quality of the .NET object design. So far many find it wonderful. Writing for it is not yet recognizably portable outside of Windows, though progress in that direction is moving.

  12. #12
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: GUI Programming - Win API or MFC?

    See Dude it's Depend on person to Person .if you are using Win32 you have to Perform a lots of calculation by your Self. But in case of MFC or ATL Everything is there what i mean to say mostly classes supported for GUI development so easily you can Proceed . But before Proceeding to next Step it is always good that atleast you have some basic idea about your first step then only you can understand how your program flow. One more important Thing some programmer also like to take help of OpenGl and DirectX to develop Their GUI application for more detail or to learn OpenGL or DirectX your can browse on GOOgle .

    Thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured