GUI Programming?

This is a discussion on GUI Programming? within the C Programming forums, part of the General Programming Boards category; Hello, I recently got into C, and I am lost as to how one would go about learning how to ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    GUI Programming?

    Hello,

    I recently got into C, and I am lost as to how one would go about learning how to program Windows Applications instead of the regular console stuff I always see referenced to in books. I'm using the dev-c++ compiler, and if I set the project type as a Windows Application I see a lot of code for the window handlers, like:
    WinMain (HINSTANCE hThisInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpszArgument,
    int nFunsterStil)

    as an example.

    Could someone provide me a link to a tutorial or something on this? I haven't been able to find a single thing about it, but would like to learn.
    And on a related note, is there any easy way to go about learning of the functions that are made available in header files and what they do, other than sifting through them to find the definitions?
    Thanks!

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595
    One thing I suggest you do is do a search for GUI on the board search option, I know I've seen a bunch of threads on it.
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    Unhappy still nothing..


    Thanks for the response!
    Sorry, by the way, I seem to have posted this in the wrong forum (I meant C instead of C#).
    I've looked around on the boards for the last 30 minutes or so but have not found anything that really helps with my question.
    Surely some of you expert C programmers here have done this type of thing before other than just console applications right? could you lend some advice to a beginner so that I can finally get an eager start on learning c well?

    I've had so much trouble finding information on things related to C. I spent the whole last week just trying to get my compiler working right. Is there some huge , easy to navigate , resource with tutorials and example sources that's out there somewhere that you all get help learning from? It's so frustrating to encounter a troublespot while programming and then having to look around for the simple answer for weeks before I find it.
    Is it a lost cause to try to learn C well on my own instead of from a teacher?

    Anyways.. if anyone can help me out with some info on where I can learn about the Windows API, I guess it is, or whatever it will take to understand all of these window handlers and such, i would appreciate it SO MUCH

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,705
    Well, you should learn C before you jump into Windows.

    Win32 is a most convoluted and confusing API, with hundreds of data structures and functions, and so much of it is not well documented. It's daunting for the seasoned programmer! Why do you think so many turn to MFC and other similar encapsulation schemes?

    Anyway, use books, not the internet to learn C, and when your done, look up the forgers and sunlights windows tutorials. They will give you a very basic start, and from there, start examining your header files, and browse MSDN too. Another handy tool is this. It's the Win32 Programming "help" file. Though it has no tutorials, it is a great way to look up functions and data structures very quickly, and usually gives you a good idea how to use them. Good luck.
    Code:
    #include <cmath>
    #include <complex>
    bool flip(bool value)
    {
           return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0)*(1 << (value + 2)))
        ).real() < 0;
    }

  5. #5
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91
    I agree with Sebastiani, first learn to code in "generic" C, then you can play around with GUI. Although Im a Linux programmer, I believe Visual C/C++ is a good API for Windows GUIs

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    3
    I was hoping it would be as easy as a link to a tutorial but the help file you gave me the link to is the next best thing to it.
    Thanx all, for the responses.

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    108
    The Dev-cpp/examples directory of your installation has several Windows application examples. Just carefully study the source files on how the associated are laid out and work.

    Try this link for a Win32 API tutorial...


    I'm one who follows the philosophy that you start learning the C/C++ language by jumping right into Windows programming, learn the language as you learn the API.
    Last edited by DarkStar; 11-13-2002 at 11:25 PM.

  8. #8
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Originally posted by Sebastiani
    Well, you should learn C before you jump into Windows.

    Win32 is a most convoluted and confusing API, with hundreds of data structures and functions, and so much of it is not well documented. It's daunting for the seasoned programmer! Why do you think so many turn to MFC and other similar encapsulation schemes?
    How dare you soil the m$ name Actually this is exactly why it is important for you to get a very firm footing in many different types of application. The windows api is one of the most complex api's around (I would say it is the most complex but then I know someone would argue with me). Go ahead an bookmark a few links but don't get buried in this stuff until you have a better grasp of the c language.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. GUI Programming...
    By ShadeS_07 in forum C++ Programming
    Replies: 12
    Last Post: 12-28-2008, 03:58 PM
  2. Convert Windows GUI to Linux GUI
    By BobS0327 in forum Linux Programming
    Replies: 21
    Last Post: 11-27-2005, 03:39 AM
  3. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 03:22 PM
  4. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 02:22 PM
  5. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 07:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21