By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,359 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

how to make a very complicated GUI

P: n/a
Hi - I am starting to look at doing something that I think will be
amazingly difficult. I ideally would like to do this in C, as that is
what I am best in. I can handle C++ but I am not particuarly fond of
that language. I also have extensive experience with Javascript, HTML,
and CSS. I used to do alot of Visual Basic 6, though it's been a while.

Here's a list of what I'd like to be able to include all in one screen:
-two way serial communication (using serial ports) (absolutely
essential feature)
-must work on Windows, Linux would be great but not essential
-ability to graph planes, points, lines, etc. in a 3-D field of some
sort. This isn't absolutely essential but would be really really nice
-ability to embed a webpage within the program. Specifically, I want to
have google maps embedded in the application. I also need to accomplish
some communication between google maps and the program - it won't be
static.
-all sorts of input things - buttons, slider bars, etc.
-lots of text feedback, the ability to graph would be great, etc.

I have a huge amount of C programming experience, but everything I do
is either run from a command line or is run on an embedded system.
Never done anything with a GUI except for when I did some VB6 apps.

Any suggestions on how to accomplish any of this? If at all possible I
want to have this all be done in C. Currently, I compile all my C
programs either through SSH on a linux system, or through Cygwin on my
own system. Thus I've never even, as far as I know, compiled a C
program for native windows.

Thanks!

-Mike

Jul 10 '06 #1
Share this Question
Share on Google+
16 Replies


P: n/a
nl******@gmail.com wrote:
Hi - I am starting to look at doing something that I think will be
amazingly difficult. I ideally would like to do this in C, as that is
what I am best in. I can handle C++ but I am not particuarly fond of
that language. I also have extensive experience with Javascript, HTML,
and CSS. I used to do alot of Visual Basic 6, though it's been a
while.

Here's a list of what I'd like to be able to include all in one
screen: -two way serial communication (using serial ports) (absolutely
essential feature)
-must work on Windows, Linux would be great but not essential
-ability to graph planes, points, lines, etc. in a 3-D field of some
sort. This isn't absolutely essential but would be really really nice
-ability to embed a webpage within the program. Specifically, I want
to have google maps embedded in the application. I also need to
accomplish some communication between google maps and the program -
it won't be static.
-all sorts of input things - buttons, slider bars, etc.
-lots of text feedback, the ability to graph would be great, etc.

I have a huge amount of C programming experience, but everything I do
is either run from a command line or is run on an embedded system.
Never done anything with a GUI except for when I did some VB6 apps.

Any suggestions on how to accomplish any of this? If at all possible I
want to have this all be done in C. Currently, I compile all my C
programs either through SSH on a linux system, or through Cygwin on my
own system. Thus I've never even, as far as I know, compiled a C
program for native windows.
You should ask in something microsoft.public.... not here.

You could also consider /fronting/ your application in VB and then write any
back-end stuff that requires it in C [compiled as DLLs]
--
==============
Not a pedant
==============
Jul 10 '06 #2

P: n/a
pemo said:
nl******@gmail.com wrote:
<snip>
>>
-must work on Windows, Linux would be great but not essential
<snip>
>>
I have a huge amount of C programming experience, but everything I do
is either run from a command line or is run on an embedded system.
Never done anything with a GUI except for when I did some VB6 apps.

Any suggestions on how to accomplish any of this? If at all possible I
want to have this all be done in C.
<snip>
>
You should ask in something microsoft.public.... not here.
Not here? Agreed. But why a Microsoft group?
You could also consider /fronting/ your application in VB and then write
any back-end stuff that requires it in C [compiled as DLLs]
Oh good heavens no. Especially if he wants it to run on Linux too (which he
mentions as a nice-to-have).

Far better choices:

* GTK+ (which allows him to work in C)
* C++ Builder (aka Kylix when under Linux)
* Heck, even Qt!

No, I'm not anti-VB, or perhaps it would be more accurate to say that I am
far less anti-VB than most anti-VB people; I just think it's the wrong
solution for the OP's circumstances.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 10 '06 #3

P: n/a
Richard Heathfield wrote:
pemo said:
>nl******@gmail.com wrote:
<snip>
>>>
-must work on Windows, Linux would be great but not essential
<snip>
>>>
I have a huge amount of C programming experience, but everything I
do is either run from a command line or is run on an embedded
system. Never done anything with a GUI except for when I did some
VB6 apps.

Any suggestions on how to accomplish any of this? If at all
possible I want to have this all be done in C.
<snip>
>>
You should ask in something microsoft.public.... not here.

Not here? Agreed. But why a Microsoft group?
True - any win32/gdi related group would be good for Windows - or any OpenGL
type thing if the 'Linux would be great' /firms up/.

<snip>

--
==============
Not a pedant
==============
Jul 10 '06 #4

P: n/a
Hi Mki, as u i just work to constructing programms to run over command
line and simuilars... but, i am a intusiastic for GUI, but i real like
to build my own GUIs for my progamans, but it is very hard for what
have you needing now, and then i have a sugestions:

first:

About how to use a GUI struture in Linux and Windows:
Many programms choose to use the Wxwindows, is a great and powerfull
library to be used, itīs great to programming using (C++) in a Cross
plataform awey!

Second:

so.. now about u use a serial inteface insted both M$ Windows and
Unix.. so, they work very diferente because they are manageb by
diferentes Filosophys, but i know that you can find some help about how
could you build a class to encapisulate it and inside of it use a
#ifdef WIN32 to separete what the compilers will use in each one of
Operating Systems.
Third:

I think that will be a great addiction to your self, try to learn
some thing about X11 and Xlib... itīs so primordial and never will
give you a combo box or a text box as well, but it is the way that Unix
X11 works. Itīs will geve a power to you DRAW your own object, like
the olde Turbo C Dos with graphics.h, but much more powerfull and
usefull. so.. going off... you can understand many things about how the
software engineers build the excentials odbejts... and, probably, you
will understand much more as you ara looking for..
fourth:

Now.. lets for a hard one.... lol.... Whaw should you use a Google
map enginne, so... u have to be very, very carefull about it, because
you will not heva a contract with they, but i have a invice to you.. in
macintosh have a some kind of aplication called "Dashboard" and there
are a plug-ins aplication writed in a web way, and so, enter in
www.apple.com, goes to OSX Download, and serch a some widghet to
work with google maps they are some one there and it is free to use...
perhaps if you try to see the souce code of it you will be able to
write a some kind of transaction to do it..... but to pay attention
about whaw it return de image, and find you have to be know if the
library that you will choused to build your GUI have some support for
this format.
So, have a nice trip throuw it

Gustavo Campos
HSBC/Losango Brasil
Lowlevel developpiment and Middleware

nleah...@gmail.com escreveu:
Hi - I am starting to look at doing something that I think will be
amazingly difficult. I ideally would like to do this in C, as that is
what I am best in. I can handle C++ but I am not particuarly fond of
that language. I also have extensive experience with Javascript, HTML,
and CSS. I used to do alot of Visual Basic 6, though it's been a while.

Here's a list of what I'd like to be able to include all in one screen:
-two way serial communication (using serial ports) (absolutely
essential feature)
-must work on Windows, Linux would be great but not essential
-ability to graph planes, points, lines, etc. in a 3-D field of some
sort. This isn't absolutely essential but would be really really nice
-ability to embed a webpage within the program. Specifically, I want to
have google maps embedded in the application. I also need to accomplish
some communication between google maps and the program - it won't be
static.
-all sorts of input things - buttons, slider bars, etc.
-lots of text feedback, the ability to graph would be great, etc.

I have a huge amount of C programming experience, but everything I do
is either run from a command line or is run on an embedded system.
Never done anything with a GUI except for when I did some VB6 apps.

Any suggestions on how to accomplish any of this? If at all possible I
want to have this all be done in C. Currently, I compile all my C
programs either through SSH on a linux system, or through Cygwin on my
own system. Thus I've never even, as far as I know, compiled a C
program for native windows.

Thanks!

-Mike
Jul 10 '06 #5

P: n/a
Ideally, I would like to have this be able to be compiled on Linux as
well as Windows, thus why I asked in a more neutral place. Surely there
are libraries compatible with both OSs?

pemo schrieb:
You should ask in something microsoft.public.... not here.

You could also consider /fronting/ your application in VB and then write any
back-end stuff that requires it in C [compiled as DLLs]
--
==============
Not a pedant
==============
Jul 10 '06 #6

P: n/a
"nl******@gmail.com" <nl******@gmail.comwrites:
Ideally, I would like to have this be able to be compiled on Linux as
well as Windows, thus why I asked in a more neutral place. Surely there
are libraries compatible with both OSs?
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,
locations of header files, configuring your C development
environment, or choosing or managing profiling tools,
debuggers, or code coverage tools. 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.

--
"You call this a *C* question? What the hell are you smoking?" --Kaz
Jul 10 '06 #7

P: n/a
<nl******@gmail.comwrote:
>... Surely there
are libraries compatible with both OSs?
<Off-topic>

There are several, some of the most widely used require C++:
Trolltech's QT - http://www.trolltech.com
WxWidgets - http://www.wxwidgets.org
Fox - http://www.fox-toolkit.org

The GIMP toolkit can be used from C:
http://www.gtk.org/

</Off-topic>

Roberto Waltman

[ Please reply to the group,
return address is invalid ]
Jul 10 '06 #8

P: n/a
Richard Heathfield schrieb:
Far better choices:

* GTK+ (which allows him to work in C)
* C++ Builder (aka Kylix when under Linux)
* Heck, even Qt!

No, I'm not anti-VB, or perhaps it would be more accurate to say that I am
far less anti-VB than most anti-VB people; I just think it's the wrong
solution for the OP's circumstances.

--
Richard Heathfield
Hi Richard - GTK sounds like a solid option since I could use C and do
it in both Linux and Windows. What compiler would I use with GTK in
Windows? I have never touched a Windows C compiler so I am very unsure
about how to do this.

Also, is there any built in functions in GTK to graph 3D functions? I
have found code for doing this using MS's Visual C++, but I would
ideally like to avoid that since it is, obviously, Windows only.

Thanks!

-Mike

Jul 10 '06 #9

P: n/a

Ben Pfaff schrieb:
"nl******@gmail.com" <nl******@gmail.comwrites:
Ideally, I would like to have this be able to be compiled on Linux as
well as Windows, thus why I asked in a more neutral place. Surely there
are libraries compatible with both OSs?

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,
locations of header files, configuring your C development
environment, or choosing or managing profiling tools,
debuggers, or code coverage tools. 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.

--
"You call this a *C* question? What the hell are you smoking?" --Kaz
I like how none of the examples you gave apply to my question. My
question is not compiler specific, os specific, or any of the others.
It is much more general, hence my placement in this newsgroup.

-Mike

Jul 10 '06 #10

P: n/a
"nl******@gmail.com" <nl******@gmail.comwrites:
Ben Pfaff schrieb:
>"nl******@gmail.com" <nl******@gmail.comwrites:
Ideally, I would like to have this be able to be compiled on Linux as
well as Windows, thus why I asked in a more neutral place. Surely there
are libraries compatible with both OSs?

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.
I like how none of the examples you gave apply to my question. My
question is not compiler specific, os specific, or any of the others.
It is much more general, hence my placement in this newsgroup.
Your question is OS-specific. You should know that: after all,
you mentioned two different OSes in the question itself.
--
"The lusers I know are so clueless, that if they were dipped in clue
musk and dropped in the middle of pack of horny clues, on clue prom
night during clue happy hour, they still couldn't get a clue."
--Michael Girdwood, in the monastery
Jul 10 '06 #11

P: n/a
"nl******@gmail.com" <nl******@gmail.comwrites:
Ben Pfaff schrieb:
[...]
>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.
[...]
I like how none of the examples you gave apply to my question. My
question is not compiler specific, os specific, or any of the others.
It is much more general, hence my placement in this newsgroup.
We try to keep comp.lang.c fairly narrowly focused on the standard C
language, excluding system-specific things like operating system
interfaces. For example, someone asking how to access the Windows
registry would be redirected to a Windows-specific newsgroup.

You're trying to write something that will work across multiple
systems, so it's not really system-specific, but the C language itself
has no support for GUIs.

Actually, though, it *is* system-specific; it's just specific to
multiple systems. Any code you write using a cross-platform GUI
library will work only on systems to which that library has been
ported.

If there were a newsgroup that discusses cross-platform GUI libraries,
it would be a good place for your question, but I don't think there is
such a newsgroup. We can only be of limited help here because we know
about the language, not necessariliy about non-standard libraries.

Perhaps your best bet would be to post to a system-specific newsgroup
for each of the systems you're interested in (e.g., Windows and
Linux). Or possibly comp.programming might be a good place.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 10 '06 #12

P: n/a
nl******@gmail.com wrote:
Hi - I am starting to look at doing something that I think will be
amazingly difficult. I ideally would like to do this in C, as that is
what I am best in. I can handle C++ but I am not particuarly fond of
that language. I also have extensive experience with Javascript, HTML,
and CSS. I used to do alot of Visual Basic 6, though it's been a while.

Here's a list of what I'd like to be able to include all in one screen:
-two way serial communication (using serial ports) (absolutely
essential feature)
-must work on Windows, Linux would be great but not essential
-ability to graph planes, points, lines, etc. in a 3-D field of some
sort. This isn't absolutely essential but would be really really nice
-ability to embed a webpage within the program. Specifically, I want to
have google maps embedded in the application. I also need to accomplish
some communication between google maps and the program - it won't be
static.
-all sorts of input things - buttons, slider bars, etc.
-lots of text feedback, the ability to graph would be great, etc.

I have a huge amount of C programming experience, but everything I do
is either run from a command line or is run on an embedded system.
Never done anything with a GUI except for when I did some VB6 apps.

Any suggestions on how to accomplish any of this? If at all possible I
want to have this all be done in C. Currently, I compile all my C
programs either through SSH on a linux system, or through Cygwin on my
own system. Thus I've never even, as far as I know, compiled a C
program for native windows.

Thanks!

-Mike
look at www.wxwidgets.org :)
>
Jul 10 '06 #13

P: n/a
nl******@gmail.com said:
Hi Richard - GTK sounds like a solid option since I could use C and do
it in both Linux and Windows. What compiler would I use with GTK in
Windows?
No idea. I know it's available on Windows, but I don't know whether it uses
Borland or Microsoft object format. (Heck, I don't even know if the formats
are still incompatible!)

What I /do/ know is that your question is now so Windows-specific that it is
probably better asked in the comp.os.ms-windows.programmer.win32 newsgroup.
I have never touched a Windows C compiler
Lucky chap.
so I am very unsure about how to do this.
The first step is to find a compiler that is compatible with the Windows
version of the GTK+ library. You will almost certainly be able to find a
free compiler that meets your need.
Also, is there any built in functions in GTK to graph 3D functions?
comp.os.linux.development.apps would be a good place to ask this. I know, I
know - all you wanted was to bake a cake, and you have to go to the kitchen
shop for the mixer and the cake-tray, the supermarket for the flour, eggs,
and sugar, and Thornton's for some decent chocolate. You'll wear out your
shoe-leather... :-)

<snip>

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Jul 10 '06 #14

P: n/a
On Mon, 10 Jul 2006, Ben Pfaff wrote:
* 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.
Suggested addition:

* Library-specific questions, such as how to use GLib,
Kazlib, libavl, libsndfile, GMP, GNU GSL, djbfft, CLAPACK, CBLAS,
libtomcrypt, etc.

Tak-Shing
Jul 10 '06 #15

P: n/a
Tak-Shing Chan <t.****@gold.ac.ukwrites:
On Mon, 10 Jul 2006, Ben Pfaff wrote:
> * 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.

Suggested addition:

* Library-specific questions, such as how to use GLib,
Kazlib, libavl, libsndfile, GMP, GNU GSL, djbfft, CLAPACK, CBLAS,
libtomcrypt, etc.
Thanks. I've added that to my local copy.
--
"To get the best out of this book, I strongly recommend that you read it."
--Richard Heathfield
Jul 12 '06 #16

P: n/a

Tak-Shing Chan wrote:
On Mon, 10 Jul 2006, Ben Pfaff wrote:
* 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.

Suggested addition:

* Library-specific questions, such as how to use GLib,
Kazlib, libavl, libsndfile, GMP, GNU GSL, djbfft, CLAPACK, CBLAS,
libtomcrypt, etc.
Cool, I'm in list of random OSS projects :-) Now I know I've gone
mainstream.

half kiddin!

Tom

Jul 12 '06 #17

This discussion thread is closed

Replies have been disabled for this discussion.