GUI Programming with C?

Discussion in 'C Programming' started by Jesse B., Apr 22, 2004.

  1. Jesse B.

    Jesse B. Guest

    I've been learning how to program with C, and I can't find any info about
    GUI programming with C. I'm almost done with O'reilly's Practical
    programming with C, and would like to mess around with GUI programming with
    C. I understand that it's easier to move to C++ or a few other languages
    (namely GTK+ or QT), but I'd like to stick with just C for awhile so I don't
    get too confused. I've been told that I should stick with a language for
    awhile and make sure I know it inside and out before I move on. I also think
    that I could learn alot about C and my hardware if I were to dabble with GUI
    programming using C.

    If anyone can point me in the right direction I'd be very greatful.
     
    Jesse B., Apr 22, 2004
    #1
    1. Advertisements

  2. Jesse B.

    Ben Pfaff Guest

    Your question is outside the domain of comp.lang.c, which discusses
    only the standard C programming language, including the standard C
    library. This is a remarkably narrow topic compared to what many
    people expect.

    For your convenience, the list below contains topics that are not
    on-topic for comp.lang.c, and suggests newsgroups for you to explore
    if you have questions about these topics. Please do observe proper
    netiquette before posting to any of these newsgroups. In particular,
    you should read the group's charter and FAQ, if any (FAQs are
    available from www.faqs.org and other sources). If those fail to
    answer your question then you should browse through at least two weeks
    of recent articles to make sure that your question has not already
    been answered.

    * OS-specific questions, such as how to clear the screen,
    access the network, list the files in a directory, or read
    "piped" output from a subprocess. These questions should be
    directed to OS-specific newsgroups, such as
    comp.os.ms-windows.programmer.misc, comp.unix.programmer, or
    comp.os.linux.development.apps.

    * Compiler-specific questions, such as installation issues and
    locations of header files. Ask about these in
    compiler-specific newsgroups, such as gnu.gcc.help or
    comp.os.ms-windows.programmer.misc. Questions about writing
    compilers are appropriate in comp.compilers.

    * Processor-specific questions, such as questions about
    assembly and machine code. x86 questions are appropriate in
    comp.lang.asm.x86, embedded system processor questions may
    be appropriate in comp.arch.embedded.

    * ABI-specific questions, such as how to interface assembly
    code to C. These questions are both processor- and
    OS-specific and should typically be asked in OS-specific
    newsgroups.

    * Algorithms, except questions about C implementations of
    algorithms. "How do I implement algorithm X in C?" is not a
    question about a C implementation of an algorithm, it is a
    request for source code. Newsgroups comp.programming and
    comp.theory may be appropriate.

    * Making C interoperate with other languages. C has no
    facilities for such interoperation. These questions should
    be directed to system- or compiler-specific newsgroups. C++
    has features for interoperating with C, so consider
    comp.lang.c++ for such questions.

    * The C standard, as opposed to standard C. Questions about
    the C standard are best asked in comp.std.c.

    * C++. Please do not post or cross-post questions about C++
    to comp.lang.c. Ask C++ questions in C++ newsgroups, such
    as comp.lang.c++ or comp.lang.c++.moderated.

    * Test posts. Please test in a newsgroup meant for testing,
    such as alt.test.

    news.groups.questions is a good place to ask about the appropriate
    newsgroup for a given topic.
     
    Ben Pfaff, Apr 22, 2004
    #2
    1. Advertisements

  3. Jesse B.

    Rakesh Kumar Guest

    Whoever told it got it right. So the moment you are comfortable with
    all the nitty-gritties of the language, all you would need to start on a
    GUI programming is to have

    - a good API documentation
    - a wide vareity of samples
    - specific newsgroups / mailing lists for the toolkit.

    I am pretty sure that both GTK and QT satisfy all the three. (Though
    personally I would prefer a newsgroup to a mailing list).

    On the other hand, if you want to do serious graphics programming, i
    would say it is an entirely different domain, that is. You need to start
    with some standard API - OpenGL, DirectX (all of them are beyond the
    scope of c.l.c , though specific newsgroups do exist for them ).
    All the best.
     
    Rakesh Kumar, Apr 22, 2004
    #3
  4. I used Google

    http://www.google.com/

    to search for

    +"GUI" +"C programming"

    and I found lots of stuff.
     
    E. Robert Tisdale, Apr 22, 2004
    #4
  5. Jesse B.

    Mabden Guest

    Books by Charles Petzold for Windows.
     
    Mabden, Apr 22, 2004
    #5
  6. Jesse B.

    Dan Pop Guest

    That's because C doesn't officially support any GUI and each GUI has its
    own C API. So, after *mastering* the C language, find a book about
    programming in C with the GUI of your choice (there are plenty of books
    about programming in C for Win32 and X11, at least).

    Dan
     
    Dan Pop, Apr 22, 2004
    #6
  7. Jesse B.

    John Bode Guest

    GTK and QT are third-party libraries, not languages unto themselves.

    Since C doesn't natively support any kind of GUI calls, you're going to need
    to rely on libraries provided by your system (such as the Windows API or the
    Mac Toolbox (pre-OS X)) or a third party (GTK, QT).

    Based on the very few times I've done it, I'd say that C is absolutely the
    wrong tool for writing GUIs. Depending on the library, it can go from being
    merely tedious to downright torture. You have memory management issues out
    the wazoo, funky data structures, fairly complex pointer expressions
    (something like *((**foo)->bar) wasn't uncommon) . You have to ratchet up
    your definition of a "small" program by an order of magnitude.

    It's okay to do it as an intellectual exercise, though.
     
    John Bode, Apr 22, 2004
    #7
  8. Jesse B.

    Jesse B. Guest

    Thank you all for the feedback. I will be sure to check out those resources,
    and watch what I post and where I post it. Thank you for having patience and
    being understanding to a rookie like myself.
     
    Jesse B., Apr 22, 2004
    #8
  9. Jesse B.

    Bruce.Zhao

    Joined:
    Nov 17, 2009
    Messages:
    1
    Likes Received:
    0
    I created WGI , a GUI lib written with C. I issue the Demo project of WGI 1.0.0. Here to download the Demo project source code: code.google.com/p/oic-wgi/downloads/list
    What WGI? WGI is doing what MFC has done, to encapsulate API, BUT WGI uses OIOIC, instead of C++.
     
    Bruce.Zhao, Nov 17, 2009
    #9
  10. Jesse B.

    slypuppy

    Joined:
    Apr 11, 2011
    Messages:
    1
    Likes Received:
    0
    :congrats:Amazing :bowl: I tried the demo out and it's looking great!

    I hope you get some support developing a real GUI tool with good ole solid C so we don't have to fool around with all this other gtk qt dot.net junk.
     
    slypuppy, Apr 11, 2011
    #10
  11. Jesse B.

    crossplatformdeveloper

    Joined:
    May 20, 2011
    Messages:
    1
    Likes Received:
    0
    Jesse B., I think you has asked a valid question. C is still in use more than most other languages and C++ is based partially on C. The only tool on the market today that I am aware of that allow you to design and build GUIs in C is a tool called XVT. It is 20 years strong and has a C solution and a C++ solution. The fact that the outputted code is also cross-platform is a bonus! Check it out at www.xvt.com. I hope this helps.
     
    crossplatformdeveloper, May 20, 2011
    #11
  12. Jesse B.

    vmars316

    Joined:
    May 21, 2012
    Messages:
    1
    Likes Received:
    0
    Hi Bruce;
    I looked at code.google.com/p/oic-wgi/downloads/list
    & downloaded for windows,
    but the DOCS are not in English.
    Is there an English translation?

    Thanks Vernon
     
    vmars316, May 21, 2012
    #12
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.