HTML as GUI

This is a discussion on HTML as GUI within the Tech Board forums, part of the Community Boards category; This is probably not the perfect category for this post but couldnt find any better. Anyway i was wondering if ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    Question HTML as GUI

    This is probably not the perfect category for this post but couldnt find any better.

    Anyway i was wondering if its possible to use HTML code for making the GUI of a c++ program or any other language?

    What i was thinking of was something that linked a HTML site to the program so for example if someone pressed a link the browser wouldnt load a new page but input a value to the program instead. It musnt nececarily be this way.

    I would be grateful for any respenses, and very grateful if they were positiv ones :P

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    58
    You could use just use Java, encoded into your page. Then essentially you would be running a program instead of just a webpage... Unless I'm not getting what your saying at all

  3. #3
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    >> Anyway i was wondering if its possible to use HTML code for making the GUI of a c++ program or any other language?

    Yes, any language can be used as long as a socket API is available (just about every language has one).
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    java or c#, jsp/jsf, asp etc. But you can probably create dynamic web-pages with a good knowledge of HTML with C++ like Sebastiani said, with sockets, just tossing back and forth information between the page and so forth, I don't know if you'll find tools that make it work as smoothly as other languages though. Also you can look into php, since that's what it's made for.
    Here to Deceive, Inveigle, Obfuscate Since 1945

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    What exactly do you want to do mogallin? The general answer is yes, as you've seen already from the answers. But if you provide a more detailed explanation of your plans, you will probably get a more to the point answer including the available technologies you need to study.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    It's very easy to create dynamic web pages via ASP.NET and AJAX.

  7. #7
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    Details

    what i was thinking was if i instead of learning java with GUI or GUI for c++ ( i know a tiny bit c++ and would like to continue larning it) it maybe would be possible to use HTML code for the GUI. So maybe a HTML link could do a input action istead of linking to another page;
    <a href="programname.input.'2'"> input 2 </a>
    or maybe something like that.

    This would be good if i had a program wanting the user to chose between 3 alternatives many times. Mostly to make non-programming-interested friends try the app, since they think command line interfaces are quite boring.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    I don't suggest you go that route with that type of HTML-C++ integration. It is certainly possible. But hard to develop although there are already some HTML parsing and rendering libraries for C++ integrated in C++ GUI libraries like wxWidgets or Qt. But... if you end up using those libraries, might as well use what they were designed for; and that is C++ GUI development.

    If you don't aim at learning C++ or Java, I'd suggest you gave Adobe AIR a shot. It provides programmers with yet another alternative for GUI development and it's a quiet interesting alternative for a few reasons, one of which is its tight web integration. You can run AIR applications standalone or as part of a website.
    Last edited by Mario F.; 07-26-2008 at 12:59 PM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    FOSS Enthusiast
    Join Date
    Jun 2008
    Location
    Germany
    Posts
    64
    the easiest method is writing a webserver for that specific html page, which shouldn't be a big deal if you're familiar with html. The difficult part is, that you'll need a good understanding of the C (or C++) programming language and berkeley sockets. Imho the learning effort is the same like creating a simple GUI using GTK+ (never used Qt or the Win API for GUIs so I can't compare them).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Please Help - C code creates dynamic HTML
    By Christie2008 in forum C Programming
    Replies: 19
    Last Post: 04-02-2008, 07:36 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

Tags for this Thread


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