Thread: C++ Gui

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    64

    C++ Gui

    Hello,

    I don't know if this is the place to ask this question, so please let me know. I developed my own CAD tool and the code is all written in C++. There is nothing graphic about it. I'm just looking for a software that is easy to use which allows me to convert the program from being code-based to a more user-friendly GUI. Is there any such software? What is the easiest and fastest way to acheive my goal?

    Thanks in advance.

    Bill

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    There is nothing graphic about it. I'm just looking for a software that is easy to use which allows me to convert the program from being code-based to a more user-friendly GUI.
    i dont think such a tool exist. if you have a non graphic program and you want it to magically convert it to a GUI program, how does this conversion program know what goes where? what color things will be? fonts? size? etc etc.

    youll have to use GUI libraries and create your own program. there ARE tools to create c++ GUIs without having to code them, you can drag and drop more or less. thatll setup the layout, you still have to code any threads and action listeners, etc.

    search some search engine for c++ GUI toolkits to find one for your OS.
    good luck

  3. #3
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    No such, program to convert one into another type. You have to manually change the code to support a specific GUI (Win32 is an example). You can keep most of your base code. You can use Windows Forms to make Windows Programs easier, but nothing exists to convert it.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Programming is still something the computer can't handle itself.

    Now start learning Win32 API and soon you will be ready with your program.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  5. #5
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    The unfortunate disadvantage of Windows programming is that, of course, it only works on Windows. If you want a portable GUI program that runs on other systems such as Linux, you'll have to use a different solution, like GTK+.

    In any case, GUI programming is a lot more complicated than console programming.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  6. #6
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Also your best bet is to seperate all your interface code from your code that does the work.

    Basically you will make a library out of your code, then create an interface on top of that library. That way you or others could put a differen't interface on it if they so chose.

  7. #7
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    similar to the MVC model, will take more work and planning but is better.

    bill, if your interested search for the MVC (model-view-controller) model

  8. #8
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    There are two types of programs:
    • Programs that can be either console or GUI, but GUI version is just a bit easier to use like exe packers, compilers, database programs.
    • Programs that ARE meant to be GUI, like image editors or web browsers
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  9. #9
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    There are several console browsers, they are great when you are on a limited connection and want to browse pages fast.

    You do have a point. But, if the OP already has a CLI(Command Line Interface... not that other BS) version then obviously he knows where his program stands.

  10. #10
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    There are several console browsers, they are great when you are on a limited connection and want to browse pages fast.
    ...so it will not download flash animations, pictures, css. This is good for web pages with very few graphic elements
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  11. #11
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    You mean the majority of webpages worth much. Keep in mind what the net was originally intended for.

  12. #12
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Keep in mind what the net was originally intended for.
    What the net is still intended for
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  13. #13
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    The unfortunate disadvantage of Windows programming is that, of course, it only works on Windows.
    Oh yeah like POSIX API works on non-unix systems.
    You mean the majority of webpages worth much. Keep in mind what the net was originally intended for.
    Picture galleries?
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  14. #14
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Oh yeah like POSIX API works on non-unix systems.
    Cygwin, MinGW, DJGPP, and other Windows ports of GCC support POSIX very well.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  15. #15
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    The internet originally developed in order to provide a way for scientists and other officials that needed a faster (SIC) way of sharing information. HTML didn't even format like it does now a days, it was mearly a way to describe text.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert Windows GUI to Linux GUI
    By BobS0327 in forum Linux Programming
    Replies: 21
    Last Post: 11-27-2005, 04:39 AM
  2. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 04:22 PM
  3. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 03:22 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 08:03 PM
  5. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM