Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > GUI Programming for Windows

Reply
Thread Tools

GUI Programming for Windows

 
 
TGOS
Guest
Posts: n/a
 
      03-04-2005

How do C programmers create a good-looking Windows GUI?

Using a cross-platform API would be cool, but gtk+ is out of question,
as it does not look really native on Windows (there is a "skin" that
makes it pretty native, but that it's like using Java Swing: Looks close
to native, but not really native and doesn't "feel" native to the user).

Using the Win32 API directly is *painful*.

wxWidgets is cool, but it's only C++. Qt is also very native from the
feeling, but also only C++.

Further it would be great if I don't have to "program" the GUI. In the
age of GUI editors, creating a GUI programatically will almost always
lead to a sub-optimal result. 90% of all GUIs in MacOS X are created
with the Interface Builder, a drag'n drop GUI editor (the easiest I
know) and the results are gigantic.

MS Visual C++ has such an editor, but it creates MFC Code, this is C++
again.

Regarding the choice of programming language: I like OO languages, I
really do. But I think C++ sucks, so does Smalltalk and C# (out of
question anyway, cause user must have .NET Framework installed, that is
not even part of WinXP unless you download the 21 MB and install it).

What I like is Java (out of question, JRE is equal to .NET Framework,
again not installed by default and a big download) and Obective-C
(almost only used for MacOS X. GCC can compile it, but GUI design
outside of MacOS is ugly, as the GUI looks worse than Motif).

For most tasks OO is overkill and C cuts it quice nicely. However what
if you need a GUI? Isn't there a programmer friendly API for creating
native Windows in plain C, that is nicer than the Win32 API, that is
free and maybe portable (whereby this is not really a demand)?

Any ideas?

--
TGOS
 
Reply With Quote
 
 
 
 
Ben Pfaff
Guest
Posts: n/a
 
      03-04-2005
TGOS <(E-Mail Removed)> writes:

> How do C programmers create a good-looking Windows GUI?


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.

--
Peter Seebach on C99:
"[F]or the most part, features were added, not removed. This sounds
great until you try to carry a full-sized printout of the standard
around for a day."
 
Reply With Quote
 
 
 
 
TGOS
Guest
Posts: n/a
 
      03-04-2005

On Fri, 04 Mar 2005 13:18:02 -0800 Ben Pfaff <(E-Mail Removed)> wrote
in comp.lang.c:

> TGOS <(E-Mail Removed)> writes:
>
>> How do C programmers create a good-looking Windows GUI?

>
> 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.


Yes, it is such a narrow topic, that it does not include Linux kernel
linked lists, still you answered that question. Just for the records,
your honor.

--
TGOS
 
Reply With Quote
 
nm@e.com
Guest
Posts: n/a
 
      03-05-2005
Ben Pfaff wrote:
> Apparently I have a rather large stick up my ass.

 
Reply With Quote
 
Joona I Palaste
Guest
Posts: n/a
 
      03-05-2005
TGOS <(E-Mail Removed)> scribbled the following:
> On Fri, 04 Mar 2005 13:18:02 -0800 Ben Pfaff <(E-Mail Removed)> wrote
> in comp.lang.c:
>> TGOS <(E-Mail Removed)> writes:
>>> How do C programmers create a good-looking Windows GUI?

>>
>> 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.


> Yes, it is such a narrow topic, that it does not include Linux kernel
> linked lists, still you answered that question. Just for the records,
> your honor.


IIRC the message about Linux kernel linked lists was about standard C.
The code just happened to be in the source of the Linux kernel. So
answering it was well within the topic of comp.lang.c.

--
/-- Joona Palaste ((E-Mail Removed)) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Bad things only happen to scoundrels."
- Moominmamma
 
Reply With Quote
 
jacob navia
Guest
Posts: n/a
 
      03-05-2005
Within your message you say you try to avoid the Win32 API.
Actually, this API is very easy to understand and use, and it
has several advantages over any framework.

1: It has remained stable since at least 15 years. You can compile
today a program written for windows 3.1 wth minimal changes after
more than 10 years
2: Since all windows is based on it, it is unlikely to change, and
it is a very stable base to build. Take, for instance, the IDE of
the lcc-win32 compiler system. It was written for windows 3.1 and
has remained the same in all this years of development.

To master the API is just mastering some general principles and
then just reading the docs. For an introduction, read the windows
part of the lcc-win32 tutorial at

http://www.cs.virginia.edu/~lcc-win32


jacob
 
Reply With Quote
 
Joona I Palaste
Guest
Posts: n/a
 
      03-05-2005
jacob navia <(E-Mail Removed)> scribbled the following:
> Within your message you say you try to avoid the Win32 API.
> Actually, this API is very easy to understand and use, and it
> has several advantages over any framework.


It's also off-topic for comp.lang.c.

--
/-- Joona Palaste ((E-Mail Removed)) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Life without ostriches is like coffee with milk."
- Mika P. Nieminen
 
Reply With Quote
 
infobahn
Guest
Posts: n/a
 
      03-05-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
>
> Ben Pfaff wrote:
> > Apparently I have a [...]


In fact, he didn't. Your attribution is a lie.
 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      03-05-2005
jacob navia wrote:
> Within your message you say you try to avoid the Win32 API.
> Actually, this API is very easy to understand and use, and it
> has several advantages over any framework.
>
> 1: It has remained stable since at least 15 years. You can compile
> today a program written for windows 3.1 wth minimal changes after
> more than 10 years


So what about the additions in Win32s, and the additions after that in
Win95...

A small quote from the Visual Studio help where it is talking about
porting and upgrading...

The key areas of 16-bit code affected by the changes are:
o Window procedure declarations
o Near and far type declarations
o Data types
o Messages
o Calls to API functions
o WinMain function

Other bits it says are that you have to examine every usage or the WORD
type to see if it should be something else.

Another quote:
But you may need to revise your code if you call API functions in any
of the following categories:
o Graphics functions
o Functions accessing "extra" window data
o MS-DOS system calls
o File Operations
o Far-pointer functions
o Functions getting list and combo box contents

Not forgetting the code that was broken by Windows XP SP2

> 2: Since all windows is based on it, it is unlikely to change, and
> it is a very stable base to build.


Well, MS seem to think there are more potability problems between Win
3.x and 32 bit windows than you do.

> Take, for instance, the IDE of
> the lcc-win32 compiler system. It was written for windows 3.1 and
> has remained the same in all this years of development.


So you only use the simple stuff. There is a lot that has changed as
well, and if you want to take advantage of newer versions there is a lot
of stuff added.

> To master the API is just mastering some general principles and
> then just reading the docs. For an introduction, read the windows
> part of the lcc-win32 tutorial at
>
> http://www.cs.virginia.edu/~lcc-win32


All of which is off topic. Talk about Windows stuff in Windows groups or
your own groups. This group is for standard C not misinformation about
Windows (which I use regularly and for which I have an MSDN
subscription) nor for pushing your compiler.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      03-05-2005
On Sat, 05 Mar 2005 00:38:10 +0100, in comp.lang.c , TGOS
<(E-Mail Removed)> wrote:

>
>On Fri, 04 Mar 2005 13:18:02 -0800 Ben Pfaff <(E-Mail Removed)> wrote
>in comp.lang.c:
>
>> TGOS <(E-Mail Removed)> writes:
>>
>>> How do C programmers create a good-looking Windows GUI?

>>
>> 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.

>
>Yes, it is such a narrow topic, that it does not include Linux kernel
>linked lists,


Actually, it does include linked lists. For the record.

And by the way, you may want to consider how foolish it is to get upset
when people point out you're in the wrong queue. Its not their fault you
stood at the wrong bus-stop.


--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ann: lesson 5 in Windows API level GUI programming "Window messagebasics" Alf P. Steinbach C++ 0 01-08-2012 05:18 AM
Ann: lesson 4 in Windows API level GUI programming "Dialogs and resources" Alf P. Steinbach C++ 7 01-04-2012 03:40 PM
Tutorials on Windows GUI programming with Python, please? Thomas Eyde Python 19 11-14-2004 08:51 PM
GUI - GUI value passing paul.foreman Java 5 10-25-2004 08:06 AM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM



Advertisments