473,799 Members | 3,080 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1971
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.publi c.*. Search and you will
find.

/Peter

Feb 23 '07 #3
On 23 Feb, 10:36, qasim.m...@gmai l.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.goo glegroups.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...@gmai l.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...@gmai l.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.comwr ote in message
news:70******** *********@newsf e5-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
6196
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 all the way through. position() resets to 1 whenever the inner for-each loops around, of course. Example code: <xsl:for-each select="/games/game) = 1]"> <xsl:sort select="platform"/>
2
10997
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 (and my webmethods) by Java (Apache toolkit) instead of using WSDL. What should I do? Thanks a lot! Raymond
11
2511
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 which size is 50MB and the second 30MB. Now we come to my problem. Is there possibility to swap this rows without using system memory (preferably in Unix/Linux)? Is there any function in C to do this?
3
2860
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 additionally pictures of the product are stored in an images subfolder and the database holds the file name of the relevant picture. The user can then click a button to display the picture in a pop-up window and also another button to email the potential...
3
1344
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 difficult. Can anyone suggest another way of dynamically creating and then serving my XML RSS feed without using system.io?
1
1544
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 Miscrosoft Componets for excel as server will not have MS Excel installed in it. If any one can provided me with any type of idea or code samples for doing it would be a great help. Thanks
9
1786
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 check a folder of text files to get the date modified of each file. I have no problems creating the filesystem object to extract the file info and dates. Currently using a timer I know is a poor approach to this but need some insight into a better way...
0
4760
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 to do that using .NET code. I prefer using code instead of wizards, because you are completely in charge of connections. This article is written for both Visual Basic.NET 2005 and C# 2005 and will discuss how to use an MS Sql database. OleDB works...
4
2664
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
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10228
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.