473,395 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Creating a widget in C++ without using a toolkit

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

Feb 23 '07 #1
9 1958
On Feb 23, 2:50 pm, "NUPUL" <nupul.kukr...@gmail.comwrote:
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.

Feb 23 '07 #2
On Feb 23, 10:50 am, "NUPUL" <nupul.kukr...@gmail.comwrote:
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

Feb 23 '07 #3
On 23 Feb, 10:36, qasim.m...@gmail.com wrote:
On Feb 23, 2:50 pm, "NUPUL" <nupul.kukr...@gmail.comwrote:
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.
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.hit 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

Feb 23 '07 #4
"NUPUL" <nu***********@gmail.comwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...
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?
http://msdn2.microsoft.com

http://msdn.microsoft.com/library/de...eatewindow.asp
The work involved in creating a very clean, nice AND neat C++ wrapper for
the Windows C API is fairly trivial. IMHO at least!

:O
Feb 23 '07 #5
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...

;^(...
Feb 23 '07 #6
On Feb 23, 3:36 pm, qasim.m...@gmail.com wrote:
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

Feb 23 '07 #7
On Fri, 23 Feb 2007 03:17:50 -0800, NUPUL wrote:
On Feb 23, 3:36 pm, qasim.m...@gmail.com wrote:
>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.
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.

--
Lionel B
Feb 23 '07 #8
Chris Thomasson wrote:
>>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...

;^(...

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
Feb 23 '07 #9
"John Harrison" <jo*************@hotmail.comwrote in message
news:70*****************@newsfe5-win.ntli.net...
Chris Thomasson wrote:
>>>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...
;^(...
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...
Feb 25 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ralph Snart | last post by:
Is there a way to alternate table row colors without using the position() mod 2 trick? I'm in a series of nested xsl:for-each elements, about 3 deep, and I want to alternate the table row color...
2
by: raymond | last post by:
Hi, Is it possible to create a proxy client class or a web service method by VS.NET without using wsdl? My stupid client is using a xml schema (.xsd) to describe all their web service methods...
11
by: ulyses | last post by:
Let's assume I have following file: 2938929384902491233..... 923949919199191919112.... File contains INTs only. What is more they are huge. For example first row in file may contain integer...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
3
by: Jason James | last post by:
Hi all, my asp.net hoster does not provide me with access to the system.io library, so using a stringwriter as the output stream to write the XML needed for my RSS feed is looking very...
1
by: Rastra | last post by:
Hi, I am working on a ASP.NET project where I need to create and export data into excel format. I have done it by using Miscrosoft Componets for excel but now I need to do it without using...
9
by: TomLasky | last post by:
Hi everyone, I'm an old school vb6 user trying to transition to VB.NET. Can anyone suggest a better approach to constantly checking something without using a timer? I'm trying to constantly...
0
MrMancunian
by: MrMancunian | last post by:
How to create a database connection without using wizards Introduction I've seen a lot of questions on the net about getting data from, and saving data to databases. Here's a little insight how...
4
by: ndeeley | last post by:
Hi there, Simple question: how do I create CF charts without using CFCHART? My company uses CF4 which doesn't have this function, and they have no plans to upgrade! Thanks Neil
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.