Re: Graphic GUI C

Discussion in 'C Programming' started by jacob navia, Jun 24, 2009.

  1. jacob navia

    jacob navia Guest

    Z.zen wrote:
    > it's possible with C language, use of graphics libraries
    > for creating graphical interfaces?
    >
    > Thank you
    >
    > Regards
    >
    >
    >


    Yes, for the details for the windows system read
    Petzold's book. It is very easy to read, and starts
    at the beginning


    --
    jacob navia
    jacob at jacob point remcomp point fr
    logiciels/informatique
    http://www.cs.virginia.edu/~lcc-win32
     
    jacob navia, Jun 24, 2009
    #1
    1. Advertising

  2. jacob navia

    Fred Guest

    Re: Graphic GUI C

    On Jun 24, 2:47 pm, jacob navia <> wrote:
    > Z.zen wrote:
    > > it's possible with C language, use of  graphics libraries
    > > for creating graphical interfaces?

    >
    > > Thank you

    >
    > > Regards

    >
    > Yes, for the details for the windows system read
    > Petzold's book. It is very easy to read, and starts
    > at the beginning
    >


    And for Unix, Linux, or Windows with Cygwin, you can
    use the X, Xt, and Motif libraries.

    --
    Fred Kleinschmidt
     
    Fred, Jun 24, 2009
    #2
    1. Advertising

  3. jacob navia <> writes:
    > Z.zen wrote:
    >> it's possible with C language, use of graphics libraries
    >> for creating graphical interfaces?

    >
    > Yes, for the details for the windows system read
    > Petzold's book. It is very easy to read, and starts
    > at the beginning


    But be aware that what you learn will be largely inapplicable to
    non-Windows systems.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Jun 24, 2009
    #3
  4. In article <4a429eec$0$17768$>,
    jacob navia <> wrote:
    >Z.zen wrote:
    >> it's possible with C language, use of graphics libraries
    >> for creating graphical interfaces?
    >>
    >> Thank you
    >>
    >> Regards
    >>
    >>
    >>

    >
    >Yes, for the details for the windows system read
    >Petzold's book. It is very easy to read, and starts
    >at the beginning


    Incidentally, on the subject of choice of compiler (*), I guess what it
    boils down to is that if you are going to do Windows programming in a C
    or C-like language (for you language purists out there), you might as
    well get and use VC Express and/or C#, both of which are free from the
    great evil empire. Although it is possible to do it with Unix-like free
    tools (mingw and/or Cygwin), doing so is basically just asking for pain.

    (*) I guess this was actually in another thread, but really, they're all
    the same. Anything that mentions the "W" word gets the usual treatment
    from the regs (off topic, blah, blah, blah), so it really doesn't
    matter.
     
    Kenny McCormack, Jun 24, 2009
    #4
  5. In article <>,
    Keith Thompson <> wrote:
    >jacob navia <> writes:
    >> Z.zen wrote:
    >>> it's possible with C language, use of graphics libraries
    >>> for creating graphical interfaces?

    >>
    >> Yes, for the details for the windows system read
    >> Petzold's book. It is very easy to read, and starts
    >> at the beginning

    >
    >But be aware that what you learn will be largely inapplicable to
    >non-Windows systems.


    Yes, much as what you learn about life on planet Earth will be largely
    inapplicable when you take up residence on some other planet.
     
    Kenny McCormack, Jun 24, 2009
    #5
  6. "Kenny McCormack" <> wrote in message
    news:h1u96l$e88$...
    > In article <>,
    > Keith Thompson <> wrote:
    >>jacob navia <> writes:
    >>> Z.zen wrote:
    >>>> it's possible with C language, use of graphics libraries
    >>>> for creating graphical interfaces?
    >>>
    >>> Yes, for the details for the windows system read
    >>> Petzold's book. It is very easy to read, and starts
    >>> at the beginning

    >>
    >>But be aware that what you learn will be largely inapplicable to
    >>non-Windows systems.

    >
    > Yes, much as what you learn about life on planet Earth will be largely
    > inapplicable when you take up residence on some other planet.


    What planet do you live on?
     
    Chris M. Thomasson, Jun 25, 2009
    #6
  7. "Kenny McCormack" <> wrote in message
    news:h1u93u$e88$...
    > In article <4a429eec$0$17768$>,
    > jacob navia <> wrote:
    >>Z.zen wrote:
    >>> it's possible with C language, use of graphics libraries
    >>> for creating graphical interfaces?
    >>>
    >>> Thank you
    >>>
    >>> Regards
    >>>
    >>>
    >>>

    >>
    >>Yes, for the details for the windows system read
    >>Petzold's book. It is very easy to read, and starts
    >>at the beginning

    >
    > Incidentally, on the subject of choice of compiler (*), I guess what it
    > boils down to is that if you are going to do Windows programming in a C
    > or C-like language (for you language purists out there), you might as
    > well get and use VC Express and/or C#, both of which are free from the
    > great evil empire. Although it is possible to do it with Unix-like free
    > tools (mingw and/or Cygwin), doing so is basically just asking for pain.


    Patents aside for a moment, isn't basic CLI is a "standard"? Well, use Mono:

    http://www.mono-project.com

    It ports standard CLI to Linux, Mac, BSD, others on the way.




    > (*) I guess this was actually in another thread, but really, they're all
    > the same. Anything that mentions the "W" word gets the usual treatment
    > from the regs (off topic, blah, blah, blah), so it really doesn't
    > matter.
    >
     
    Chris M. Thomasson, Jun 25, 2009
    #7
  8. In article <h1ur16$2na9$>,
    Chris M. Thomasson <> wrote:
    ....
    >>>But be aware that what you learn will be largely inapplicable to
    >>>non-Windows systems.

    >>
    >> Yes, much as what you learn about life on planet Earth will be largely
    >> inapplicable when you take up residence on some other planet.

    >
    >What planet do you live on?
    >


    Just like you and everyone who posts to this newsgroup, I live on Earth.
    And I seriously doubt anyone who posts to CLC will ever leave planet
    Earth. So, knowledge that isn't applicable to live on planet Earth is
    unlikely to be of any value. If you get my drift...
     
    Kenny McCormack, Jun 25, 2009
    #8
  9. "Richard" <> wrote in message
    news:h1v4kn$mug$-september.org...
    > "Chris M. Thomasson" <> writes:
    >
    >> "Kenny McCormack" <> wrote in message
    >> news:h1u93u$e88$...
    >>> In article <4a429eec$0$17768$>,
    >>> jacob navia <> wrote:
    >>>>Z.zen wrote:
    >>>>> it's possible with C language, use of graphics libraries
    >>>>> for creating graphical interfaces?
    >>>>>
    >>>>> Thank you
    >>>>>
    >>>>> Regards
    >>>>>
    >>>>>
    >>>>>
    >>>>
    >>>>Yes, for the details for the windows system read
    >>>>Petzold's book. It is very easy to read, and starts
    >>>>at the beginning
    >>>
    >>> Incidentally, on the subject of choice of compiler (*), I guess what it
    >>> boils down to is that if you are going to do Windows programming in a C
    >>> or C-like language (for you language purists out there), you might as
    >>> well get and use VC Express and/or C#, both of which are free from the
    >>> great evil empire. Although it is possible to do it with Unix-like free
    >>> tools (mingw and/or Cygwin), doing so is basically just asking for pain.

    >>
    >> Patents aside for a moment, isn't basic CLI is a "standard"? Well, use
    >> Mono:
    >>
    >> http://www.mono-project.com
    >>
    >> It ports standard CLI to Linux, Mac, BSD, others on the way.
    >>

    >
    > What do you mean "it ports CLI to Linux" ? What do you mean by CLI here?


    http://www.ecma-international.org/publications/standards/Ecma-335.htm



    > Almost no one uses Mono. Its totally unproven.


    http://www.mono-project.com/Companies_Using_Mono
     
    Chris M. Thomasson, Jun 25, 2009
    #9
  10. jacob navia

    Chris Dollin Guest

    Richard wrote:

    > "Chris M. Thomasson" <> writes:
    >
    >> "Richard" <> wrote in message
    >> news:h1v4kn$mug$-september.org...
    >>> "Chris M. Thomasson" <> writes:
    >>>> Patents aside for a moment, isn't basic CLI is a "standard"? Well, use
    >>>> Mono:
    >>>>
    >>>> http://www.mono-project.com
    >>>>
    >>>> It ports standard CLI to Linux, Mac, BSD, others on the way.
    >>>>
    >>>
    >>> What do you mean "it ports CLI to Linux" ? What do you mean by CLI here?

    >>
    >> http://www.ecma-international.org/publications/standards/Ecma-335.htm

    >
    > You are seriously referencing this to a new programmer who wants to try
    > gui programming in C?


    No, he's saying what he means by "CLI". Different question.

    --
    "You're down as expendable. You don't get a weapon." /Dark Lord of Derkholm/

    Hewlett-Packard Limited registered office: Cain Road, Bracknell,
    registered no: 690597 England Berks RG12 1HN
     
    Chris Dollin, Jun 25, 2009
    #10
  11. In article <h1vs0a$b5u$-september.org>,
    Richard <> wrote:
    ....
    >>> What do you mean "it ports CLI to Linux" ? What do you mean by CLI here?


    Yes, a good question, that.

    >> http://www.ecma-international.org/publications/standards/Ecma-335.htm


    For the benefit of those of us who don't go to arbitrary links posted on
    the Usenet, what the h*** is it? 20 words will do.
     
    Kenny McCormack, Jun 25, 2009
    #11
  12. "Kenny McCormack" <> wrote in message
    news:h201ot$j2s$...
    > In article <h1vs0a$b5u$-september.org>,
    > Richard <> wrote:
    > ...
    >>>> What do you mean "it ports CLI to Linux" ? What do you mean by CLI
    >>>> here?

    >
    > Yes, a good question, that.
    >
    >>> http://www.ecma-international.org/publications/standards/Ecma-335.htm

    >
    > For the benefit of those of us who don't go to arbitrary links posted on
    > the Usenet, what the h*** is it? 20 words will do.


    CLI stands for `Common Language Infrastructure'. It was created by Microsoft
    and is standardized by the ECMA and is also approved by the ISO (ISO/IEC
    23271:2006). The Mono project created an implementation of the CLI that
    works on Windows, Linux, Mac, BSD.

    C# is based on the CLI. You can write programs in C# and have them run on
    any platform with binary compatibility which has an implementation of the
    CLI.
     
    Chris M. Thomasson, Jun 25, 2009
    #12
  13. jacob navia

    Tim Harig Guest

    On 2009-06-25, Chris M. Thomasson <> wrote:
    > CLI stands for `Common Language Infrastructure'. It was created by Microsoft
    > and is standardized by the ECMA and is also approved by the ISO (ISO/IEC
    > 23271:2006). The Mono project created an implementation of the CLI that
    > works on Windows, Linux, Mac, BSD.


    I don't know of any C compiler targeted for the CLI; and, I don't know how
    such a thing would work since the CIL is fundimentally based in object
    technology. C++ != C.

    > C# is based on the CLI. You can write programs in C# and have them run on
    > any platform with binary compatibility which has an implementation of the
    > CLI.


    C# != C.
     
    Tim Harig, Jun 25, 2009
    #13
  14. jacob navia

    jameskuyper Guest

    Re: Graphic GUI C

    Chris M. Thomasson wrote:
    > "Kenny McCormack" <> wrote in message
    > news:h1u96l$e88$...
    > > In article <>,
    > > Keith Thompson <> wrote:

    ....
    > >>But be aware that what you learn will be largely inapplicable to
    > >>non-Windows systems.

    > >
    > > Yes, much as what you learn about life on planet Earth will be largely
    > > inapplicable when you take up residence on some other planet.

    >
    > What planet do you live on?


    Apparently some planet where the likelihood of compiling C programs
    for non-Windows systems is comparable to the likelihood of leaving the
    Earth. It's either a planet with much more advanced space travel than
    we have, or several orders of magnitude fewer non-Windows platforms.
     
    jameskuyper, Jun 25, 2009
    #14
  15. jacob navia

    jameskuyper Guest

    Re: Graphic GUI C

    Tim Harig wrote:
    > On 2009-06-25, Chris M. Thomasson <> wrote:
    > > CLI stands for `Common Language Infrastructure'. It was created by Microsoft
    > > and is standardized by the ECMA and is also approved by the ISO (ISO/IEC
    > > 23271:2006). The Mono project created an implementation of the CLI that
    > > works on Windows, Linux, Mac, BSD.

    >
    > I don't know of any C compiler targeted for the CLI; and, I don't know how
    > such a thing would work since the CIL is fundimentally based in object
    > technology. C++ != C.


    I'm not sure what you're suggesting by that last comment. Almost every
    feature of C90, and (in the latest C++ standard, several of the new
    features in C99) is also a feature of C++. If there's any feature of C
    that can't be implemented in CLI, it seems to me that the
    corresponding C++ feature would also not be implementable.
     
    jameskuyper, Jun 25, 2009
    #15
  16. Re: Graphic GUI C

    "Richard" <> wrote in message
    news:h208gm$k5s$-september.org...
    > Tim Harig <> writes:
    >
    >> On 2009-06-25, jameskuyper <> wrote:
    >>> Tim Harig wrote:
    >>>> I don't know of any C compiler targeted for the CLI; and, I don't know
    >>>> how
    >>>> such a thing would work since the CIL is fundimentally based in object
    >>>> technology. C++ != C.
    >>>
    >>> I'm not sure what you're suggesting by that last comment. Almost every
    >>> feature of C90, and (in the latest C++ standard, several of the new
    >>> features in C99) is also a feature of C++. If there's any feature of C
    >>> that can't be implemented in CLI, it seems to me that the
    >>> corresponding C++ feature would also not be implementable.

    >>
    >> Yes, seeing as C++ was origionally a superset, it is generally possible
    >> to
    >> implement C from inside of C++ code. It is a far greater problem to
    >> implement C++ from inside of C code.
    >>
    >> I have no doubt that it would be possible to create a compiler that that
    >> could produce CIL bytecode; but, how would you interact with .Net
    >> objects?
    >> In the end, you would need to do some kind of transparent conversion to
    >> convert objects to something that could be handled from inside of C code
    >> (ie, structures with function pointers to class methods). Even then, it
    >> is
    >> going to be difficult to handle object relationships such as
    >> inheritance.

    >
    > Its why almost no one uses mono/CLI/whatever.
    >
    > It's as clear as mud.


    Why do you think that almost nobody uses C#?
     
    Chris M. Thomasson, Jun 25, 2009
    #16
  17. jacob navia

    Richard Bos Guest

    "Chris M. Thomasson" <> wrote:

    > "Kenny McCormack" <> wrote in message
    > > Keith Thompson <> wrote:
    > >>jacob navia <> writes:
    > >>> Yes, for the details for the windows system read Petzold's book.
    > >>> It is very easy to read, and starts at the beginning
    > >>
    > >>But be aware that what you learn will be largely inapplicable to
    > >>non-Windows systems.


    And also that what he writes about C itself is not always accurate. In
    other words, first learn C, _then_ read Petzold. But if what you want to
    know about is programming for MS Windows specifically, Petzold is good.

    > > Yes, much as what you learn about life on planet Earth will be largely
    > > inapplicable when you take up residence on some other planet.

    >
    > What planet do you live on?


    He lives on only 30% of planet Earth, obviously.

    Richard
     
    Richard Bos, Jun 25, 2009
    #17
  18. In article <4all.nl>,
    Richard Bos <> wrote:
    ....
    >> > Yes, much as what you learn about life on planet Earth will be largely
    >> > inapplicable when you take up residence on some other planet.

    >>
    >> What planet do you live on?


    A bit of clarification. I'm not saying that Windows is the only
    platform on which C prograqms can be compiled and/or run, as some of you
    seem to be implying. Obviously, such a position would be absurd.

    Nor am I saying that most (or even many) of the posters to CLC hold the
    view that the sun rises and sets with Windows. Such a position would be
    equally absurd. However, it is true that there are many people in the
    real world who hold such a view - just as a generation or so back, there
    were many people for whom the totality of the concept of "computing" was
    the IBM 360. And I believe that OP in this thread was one such person
    (for Windows, that is, not the IBM 360). Note: You can try to nit-pick
    this assertion, but I really don't care. If you think it isn't the case
    here, then pick any other similar thread (and there have been many over
    the years) - where somebody came on here and made it clear that Microsoft
    Windows was their universe, and yet they get the usual posts saying
    "Well, that won't work everywhere, blah, blah, blah".

    My point is that saying "such and such only works on Windows", while
    true (and perhaps profound, if the intended audience was one likely to find
    it so), is irrelevant, when directed specifically to a person who has made
    it clear that Windows is their universe.

    >He lives on only 30% of planet Earth, obviously.
    >
    >Richard


    Funny you should say that, since it makes my point well.
    In the course of my lifetime, I should think myself doing well if I do
    end up touching anywhere near 30% of planet Earth. And that's the
    point, that most people really only care about their little corner or
    corners of the computing universe. Those corners really are all that
    matter (to them).
     
    Kenny McCormack, Jun 25, 2009
    #18
  19. jacob navia

    Tim Harig Guest

    On 2009-06-25, Kenny McCormack <> wrote:
    > My point is that saying "such and such only works on Windows", while
    > true (and perhaps profound, if the intended audience was one likely to find
    > it so), is irrelevant, when directed specifically to a person who has made
    > it clear that Windows is their universe.


    1. Shouldn't the original post always be the gold standard seeing as they
    will have to implement any solutions on their target systems? In
    this case, Z.zen didn't specify what his target OS or environment
    is so, solutions for any given os/environment should be acceptable.
    If he OP doesn't get solutions that work with his target
    environment, then he should have clarified.

    2. In the post that started this branch of the thread, jacob navia stated:

    "for the details for the windows system"

    thereby making it clear that his reply was regarding Windows. I
    would have used a similar technique if I had posted a solution that
    was unique to Unix and since the OP never clarified his intentions
    it is perfectly valid to give a Windows native solution since he
    was clear about its non-portable nature. Re-stating that it is not
    portable was needlessly redundant.

    > end up touching anywhere near 30% of planet Earth. And that's the
    > point, that most people really only care about their little corner or
    > corners of the computing universe. Those corners really are all that
    > matter (to them).


    1. It is perfectly valid that people should only be concerned about their
    own environment and sometimes non-portable solutions are perfectly
    valid if they provide enough advantages where no other way exists.

    2. That said, good programmers should always consider their alternatives
    and portablility is always one aspect that they should take into
    account and try to achieve if possible. Pointing out where a
    solution might not be portable, is therefore a reasonable addition
    to the discussion *if* a reasonable cross-platform alternative is
    given. Its not a bad thing to remind people that they may one day
    need to support another platform.
     
    Tim Harig, Jun 25, 2009
    #19
  20. Re: Graphic GUI C

    On 25 June, 20:13, (Kenny McCormack) wrote:
    > In article <4all.nl>,Richard Bos <> wrote:


    windows is not the only OS

    > >> > Yes, much as what you learn about life on planet Earth will be largely
    > >> > inapplicable when you take up residence on some other planet.

    >
    > >> What planet do you live on?

    >
    > A bit of clarification.  I'm not saying that Windows is the only
    > platform on which C prograqms can be compiled and/or run, as some of you
    > seem to be implying.  Obviously, such a position would be absurd.


    the original poster was asking about a graphical GUI, which eliminates
    a good chunk of the platforms out there


    > Nor am I saying that most (or even many) of the posters to CLC hold the
    > view that the sun rises and sets with Windows.  Such a position would be
    > equally absurd.  However, it is true that there are many people in the
    > real world who hold such a view [...] And I believe that OP in this
    > thread was one such person [...].  


    I think it highly likely. As a rule of thumb if they don't say
    what their platform is its highly likely its windows (because a
    lot of windows people don't even realise there *are* other platforms).


    > Note: You can try to nit-pick
    > this assertion, but I really don't care.  If you think it isn't the case
    > here, then pick any other similar thread (and there have been many over
    > the years) - where somebody came on here and made it clear that Microsoft
    > Windows was their universe, and yet they get the usual posts saying
    > "Well, that won't work everywhere, blah, blah, blah".


    so why not educate them? I've got no problem with pointing people
    at Petzold but why not also explain tothem that GUIs have portability
    issues. And in fact if we have guessed wrong then P will pretty well
    be a waste of space.

    Your posting history indicates that won't agree with me but I
    consider it a good thing to have a multiplicity of views.


    > My point is that saying "such and such only works on Windows", while
    > true (and perhaps profound, if the intended audience was one likely to find
    > it so), is irrelevant, when directed specifically to a person who has made
    > it clear that Windows is their universe.


    wasn't that clear

    > >He lives on only 30% of planet Earth, obviously.

    >
    > >Richard

    >
    > Funny you should say that, since it makes my point well.
    > In the course of my lifetime, I should think myself doing well if I do
    > end up touching anywhere near 30% of planet Earth.


    since 67% of it is ocean...

    > And that's the
    > point, that most people really only care about their little corner or
    > corners of the computing universe.  Those corners really are all that
    > matter (to them).


    so we educate them and the world becomesa better place
     
    Nick Keighley, Jun 26, 2009
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. paul.foreman

    GUI - GUI value passing

    paul.foreman, Oct 22, 2004, in forum: Java
    Replies:
    5
    Views:
    782
    Michael Rauscher
    Oct 25, 2004
  2. ulysses
    Replies:
    4
    Views:
    802
    Werner Schiendl
    Oct 22, 2003
  3. 50 SOMETHING GAL
    Replies:
    3
    Views:
    416
  4. Andrew Lapidas

    PyGTK GUI update without signals from GUI

    Andrew Lapidas, Apr 13, 2008, in forum: Python
    Replies:
    0
    Views:
    428
    Andrew Lapidas
    Apr 13, 2008
  5. Stefan Ram
    Replies:
    3
    Views:
    509
    Arne Vajhøj
    Nov 20, 2011
Loading...

Share This Page