Creating a widget in C++ without using a toolkit

N

NUPUL

Hi,

The Qt toolkit claims to be completely written in C++. What I would
like to know is how do I draw a window with a button (or any widget
for that matter) using C++, without using the Qt library? i.e. do I
need to use some specific C++ library for such graphical programs? If
so, which one and where can I get more information about it? Or does
one have to link with the OS-specific APIs for the same?

I presume it would be a taxing task, but I still would like to know.

Thanks.

Nupul
 
Q

qasim.manu

Hi,

The Qt toolkit claims to be completely written in C++. What I would
like to know is how do I draw a window with a button (or any widget
for that matter) using C++, without using the Qt library? i.e. do I
need to use some specific C++ library for such graphical programs? If
so, which one and where can I get more information about it? Or does
one have to link with the OS-specific APIs for the same?

I presume it would be a taxing task, but I still would like to know.

Thanks.

Nupul

You can certainly make windows in c++ without using any toolkit. Aa
far as i remember there used to be a include file named <graphics.h>
which has very basic elements with which you can make sophisticated
windows and visual effects. However the task is really paintaking and
time consuming.
 
P

peter koch

Hi,

The Qt toolkit claims to be completely written in C++. What I would
like to know is how do I draw a window with a button (or any widget
for that matter) using C++, without using the Qt library? i.e. do I
need to use some specific C++ library for such graphical programs? If
so, which one and where can I get more information about it? Or does
one have to link with the OS-specific APIs for the same?

Unless you want to write it all from scratch (and today, noone does
that), you will need to write your code against some API. The Qt is
one such API, and e.g. Windows and Linux have other, lower level APIs
to do the same stuff.
All of this is off-topic here, however, so I would suggest your ask
your question in a newsgroup where this would be on topic. For
microsoft the groups could be microsoft.public.*. Search and you will
find.

/Peter
 
G

Gavin Deane

You can certainly make windows in c++ without using any toolkit.

But not without using non-standard extensions specific to your OS.
Aa
far as i remember there used to be a include file named <graphics.h>
which has very basic elements with which you can make sophisticated
windows and visual effects. However the task is really paintaking and
time consuming.

Wherever you found <graphics.h> it was not part of C++. It was part of
some 3rd party library.

To the OP: You cannot do what you want in standard C++, which knows
nothing about graphics or windows. As you suspected, you need to use
OS-specific features (which will be different for a different OS). You
should be able to find a newsgroup dedicated to programming on your
particular OS, where you will be able to get help on using those
features.

Gavin Deane
 
C

Chris Thomasson

C

Chris Thomasson

The work involved in creating a very clean, nice AND neat C++ wrapper for
the Windows C API is fairly trivial.

Well, one of my prior jobs depended on me being able to create robust GUI
out of "vanilla" win32 C API's... May not be trivial for everybody, but for
me, sadly, it is...

;^(...
 
N

NUPUL

You can certainly make windows in c++ without using any toolkit. Aa
far as i remember there used to be a include file named <graphics.h>
which has very basic elements with which you can make sophisticated
windows and visual effects. However the task is really paintaking and
time consuming.

AFAIR graphics.h is a part of the C library (and that too that of
turbo C), right? Please correct me if i am wrong. Because I remember
using such a header in the days of turbo c, but have never come across
one for C++.

Regards,

Nupul
 
L

Lionel B

AFAIR graphics.h is a part of the C library (and that too that of
turbo C), right? Please correct me if i am wrong.

It's not part of the standard C library.
Because I remember
using such a header in the days of turbo c, but have never come across
one for C++.

Nor is it part of the standard C++ library.
 
J

John Harrison

Chris said:
Well, one of my prior jobs depended on me being able to create robust GUI
out of "vanilla" win32 C API's... May not be trivial for everybody, but for
me, sadly, it is...

;^(...

Wasn't trivial for Microsoft. They tried and came up with MFC!

I guess you're a genius and a hard worker to boot but I think it's
actually quite a lot of work, and the Win32 API doesn't make it easy.

john
 
C

Chris Thomasson

John Harrison said:
Wasn't trivial for Microsoft. They tried and came up with MFC!

MFC == crap... Yup.. Well, shoot, I guess that's a good point!

:O
I guess you're a genius and a hard worker to boot but I think it's

I don't claim to be a so-called "genius"... Anyway, nobody has to be a
"genius" to program the win32 api...
and the Win32 API doesn't make it easy.

The thread synchronization API's can be improved upon, however, the GUI
stuff, IMHO, is fairly straightforward...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top