473,408 Members | 1,623 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,408 software developers and data experts.

how to make GUIs in C++

compman9902
105 100+
Thank you for looking at my post.
Okay, first of all I would like to point out that I have been all over the internet and the library and I cannot seem to get it through my head on how to make GUIs in C++.
Here is what I need help with. All I need is a simple GUI window about 100 x 200 pixles. In it, I need to show a constantly changing intiger. What would be the best is if this window would open up when a function was called and the intiger being passed to the function through the function header.
Please post code when you reply.
Thanks.
Jul 31 '07 #1
12 2166
sicarie
4,677 Expert Mod 4TB
Thank you for looking at my post.
Okay, first of all I would like to point out that I have been all over the internet and the library and I cannot seem to get it through my head on how to make GUIs in C++.
Here is what I need help with. All I need is a simple GUI window about 100 x 200 pixles. In it, I need to show a constantly changing intiger. What would be the best is if this window would open up when a function was called and the intiger being passed to the function through the function header.
Please post code when you reply.
Thanks.
You don't mention your OS. Look into the win32 api, and please look at the Posting Guidelines of the site, they clearly state that we will not give code - your responses will be proportionate to the effort you put into them. Asking for code gets a general wave of the hand towards a certain direction or reference. Posting what you have tried will get you specific references, and posting the code you have played around with will get that refined.
Jul 31 '07 #2
compman9902
105 100+
You don't mention your OS. Look into the win32 api, and please look at the Posting Guidelines of the site, they clearly state that we will not give code - your responses will be proportionate to the effort you put into them. Asking for code gets a general wave of the hand towards a certain direction or reference. Posting what you have tried will get you specific references, and posting the code you have played around with will get that refined.
Hmm.. Okay
Well, I run Windows XP and use Dev C++.
Aug 1 '07 #3
arunmib
104 100+
The standard template for "Windows Application" project in DevC++ will create a simple window by default.

Then in that you need "draw" the integer you want to show as countdown. For more information about programming for Windows GUI refer

http://msdn2.microsoft.com/en-us/library/ms632587.aspx

in general to display text (for eg) you need to take care of "WM_PAINT" message and it's realted APIs....

Hope this serves as an introduction and of some help....
Aug 1 '07 #4
compman9902
105 100+
The standard template for "Windows Application" project in DevC++ will create a simple window by default.

Then in that you need "draw" the integer you want to show as countdown. For more information about programming for Windows GUI refer

http://msdn2.microsoft.com/en-us/library/ms632587.aspx

Hope this serves as an introduction and of some help....
That actually dosn't help me very much.
I learn more by example then by anything else.
Thanks for the effort, though.
Aug 1 '07 #5
weaknessforcats
9,208 Expert Mod 8TB
That actually dosn't help me very much.
I learn more by example then by anything else.
Thanks for the effort, though.
Start reading books. Start with Programming Windows by Charles Petzold.

Your initial question is answered in about the first example.
Aug 1 '07 #6
sicarie
4,677 Expert Mod 4TB
That actually dosn't help me very much.
I learn more by example then by anything else.
Thanks for the effort, though.
I guess I'm missing why you can't come up with the example, either by searching those things, or by writing it yourself (an even better way to learn!)...

As I said, come with a specific question, get a specific resource answer. We're not going to put in all the effort, you are doing this project, you need to do most of the work.
Aug 1 '07 #7
arunmib
104 100+
That actually dosn't help me very much.
I learn more by example then by anything else.
Thanks for the effort, though.
Ok, to put things as an example "open the windows application in DevC++". Then do the painting part. For this handle the "WM_PAINT" message.
You can also take a look at "BeginPaint", "EndPaint" and it's related APIs to display text in the window.

So from this on, think how you can construct a simple application. Trust me, the method of intuitive construction of a program will be fun.

I hope, I haven't violated any rules and hope this is of some help to you.....If you still find it difficult, just buy some book on Windows Programming.
Aug 2 '07 #8
compman9902
105 100+
Start reading books. Start with Programming Windows by Charles Petzold.

Your initial question is answered in about the first example.
Okay, I got the book...
What example??
Aug 5 '07 #9
weaknessforcats
9,208 Expert Mod 8TB
There should be one like this.
Aug 5 '07 #10
weaknessforcats
9,208 Expert Mod 8TB
Okay, I got the book...
What example??
You got Programming Windows 5th Edition by Charles Petzold 1999
ISBN 1-57231-995-X ??
Aug 8 '07 #11
compman9902
105 100+
You got Programming Windows 5th Edition by Charles Petzold 1999
ISBN 1-57231-995-X ??
Yes, sir-ee.
That very one.
Aug 11 '07 #12
weaknessforcats
9,208 Expert Mod 8TB
Did you read to page 44 and get the example working?

That book as the Win32 API described and how to use it. A lot of Microsoft code is just wrappers for Win32. If you uinderstand how a Window is out together then these various wrappers like MFC and thew .NET Framework begin to make sense.

Unfortunately with Windows, some study is required. Several months most likely.

I realloy recommend starting at the beginning of that book and reading it and trying every example on your computer. It's only by doing that you learn Windows. No amount of explanation will help.
Aug 16 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: BOOGIEMAN | last post by:
Well that's it, how do I make Windows Application with Python ??? Is there simple way that works 100% ? How can I rework visual design done in VS 2003 to use it for my python program ?
7
by: Bob Swerdlow | last post by:
Anyone have opinions about whether we will be better off using PythonNet or wxPython for the GUI layer of our application on Windows? Our code is all Python and is now running on Mac OS X with...
354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
1
by: Stewart | last post by:
Hi all. Does anyone know where I can find a good tutorial on creating guis with CreateDialog? I normally use CreateWindow, but now I would like to know how to do it using the CreateDialog...
7
by: hankssong | last post by:
Hi everyone, I'm writing a program that can retrieve some specified info from a web page, such as python topics I interested on a bbs. Now I had written the python script (run in the background),...
16
by: nleahcim | last post by:
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...
44
by: jiang.haiyun | last post by:
Now i began to learn GUI programming. There are so many choices of GUI in the python world, wxPython, pyGTK, PyQT, Tkinter, .etc, it's difficult for a novice to decide, however. Can you draw a...
19
by: bagz | last post by:
Hi im looking for a relatively easy and straight forward c gui to use, but not sure which one to go for. All i have to do is create a little area with a few input fields for x,y,z start position...
3
by: meatstu | last post by:
Can you create GUIs such as textboxes using C++? I have only written basic classes as a small part of my uni course but would like to do more. I dont actually have any reason to do this I was just...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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,...
0
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...

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.