Subscribe to RSS
The most famous library to create some GUI in C language is certainly GTK. With this library you can easily create some buttons (for your example). When a user clicks on the button, a signal is emitted and you can write a handler to do some actions. Dec 27, · gcc main.c -o p1 `pkg-config --cflags --libs gtk+` To run it write the following command./p1. Conclusion GTK+ has all the GUI segments one needs to make an expert looking interface. The essential thought of GUI occasion driven programming with GTK+ isn’t very different from the one appeared in the model.
Sign in Email. Forgot your password? Ask a Question. Please Sign up or sign in to vote. This includes making all necessary headers and macros. I cannot find a tutorial ho gives me any information on where to start, or they prompt e to download Qt, wxWidgets, or a similar program.
Can anyone help me? What I maje tried: I searched for around an hour looking gii any information, found none. Posted Aug am SomeRandomMan. Add a Solution. What x you tried? I have a hard time that in all of f infinite wisdom, there is nothing that can help you with something as simple as making a GUI. I did a quick google search and found tons of links about Qt, so either you how to do two braids to be more specific with what you want to accomplish or need go take a second look at doing a google search.
SomeRandomMan Aug pm. I do not mean using Qt or anything. I mean trying to make it entirely from scratch written entirely by me. Mohibur Rashid Aug pm. Windows or linux or what? Mohibur Rashid Aug am. Start from learning, how windows work. SomeRandomMan Aug am. Thank you. Philippe Mori Aug pm. Any useful GUI would require to write a lot of code so it make much more sense to use existing framework.
At least for Win32 API, it is hard to do a decent framework that work in an object-oriented way and hide idiosyncrasy of the API to make it less error-prone to use. For example, at API level owner-draw control messages are sent to the owner instead of the control so to make self-contained control, one have to implement some routing that will take care of that. Hoow know it would require a lot of code, that's part of why Ugi want to do it. I would suggest you to have a look at open source GUI libraries.
They hlw guide you. You are welcome! Philippe Mori Aug am. And what would you like your framework to do? Should it be a thin layer around part of the Win32 Maek or you want good encapsulation or something in between? Do guk want to use standard controls or do your own UI?
Look at : List of widget toolkits. This will give you an idea on existing frameworks. Top Rated Most Recent.
Accept Solution Reject Solution. Posted Aug pm CPallini. Maciej Los Aug am. Short And To The Point, a 5! Gul Aug am.
Effectively, that would be the starting point However, that code is essentially done in a procedural way q one want to do some object orientes framework, a lot more work is required.
Posted Aug pm Richard MacCutchan. Might be useful if one want to do a graphical interface of its own. Won't help much if one gii to use standard controls. Richard MacCutchan Aug am. You can use the standard controls, subclass them to change them to your own requirements, or even create completely new ones of your own.
Then design the visible elements and implement the drawing functions. A GUI usually has active elements e. So you must implement handling these states. A GUI must process different kinds of user input like from keyboard, mouse, or touch screen.
There are again system dependant interface for such devices. Upon user input specific actions must be performed. This is usually implemented by some kind of message processing and event handling. The above are just the basics. There is many more to do like handling overlapped and partial hidden elements when drawing.
Posted Aug pm Jochen Arndt. Many of these points are handled by the system if the GUI is based on standard controls. This look like a big guii complicated project. I recommend to start with 3 top level tasks: - General description. As you create sub-tasks, you enter in details and refine the description. Posted Aug pm Patrice T. Good advice but does not really answer the question.
Patrice T Aug am. Already got 3 Solutions! Just wanting to cover another aspect that I know first hand to matter in big projects and in little ones too. Cc one would prefer to use an existing framework. One could also write at the Win32 API level but I would not recommand that except for very simple applications First of all, you should examine existing options. Posted Aug am Philippe Mori.
Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in how to work effectively with others your account.
This email is in use. Do you un your password? Submit your solution! When answering what is the best media player for vista question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid. Related Questions. How can I write my own strlen function in c. Write a C program to perform the above data.
How do I write male code. How do I fix this GUI code for hangman. Layout: fixed fluid. Web01 2. Strip HTML. Encode HTML. Paste as-is. Code block.
The Win32 is a C runtime that allows you to write Windows GUI applications. Unfortunaltey it is not that easy to learn but the principle is quite simple. You create a window and then let the window have a message pump handling all messages that are sent to the . Aug 09, · Sir or Madam, I want to make a gui application in C in windows platform. When i google about it, i found that its a totally different language. Please help me. tell me,to make a GUI i have to study the win32 api programming, but i can't find any similarity between c and win32 api except preprocessing commands. please.. tell me. Aug 24, · For most windows desktop application, it probably make more sense to use C# and WPF as it is much more modern and it support MVVM pattern. With many C++ GUI frameworks based on Win32 API, you cannot set many "properties" like title, size, background color before the actual handle (HWND) is created with a few exceptions.
Join Stack Overflow to learn, share knowledge, and build your career. Connect and share knowledge within a single location that is structured and easy to search. Qt happens to provide just that and it's also cross-platform. Neither are cross-platform, however. That doesn't stop you from using some other GUI framework, of course, if you include it. There are plenty to choose from, including ones that are cross-platform.
Just because a language is system-independent, doesn't mean people haven't written frameworks for it that aren't system-independent. If You want multi platform application, You should concern using Qt.
It makes multi platform development easier by providing API for handling both Windows and Linux and others. You can use Qt in Visual Studio easily. And is really easy to learn. Check official Qt docs for integration tips.
OK, the point is that qt claims and prooves to be platform independent. How are we doing? Please help us improve Stack Overflow. Take our short survey. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. Ask Question. Asked 7 years ago.
Active 7 months ago. Viewed 38k times. Zgrkpnr Zgrkpnr 1, 4 4 gold badges 15 15 silver badges 30 30 bronze badges. MFC and the resource files are definitely not cross platform. Add a comment. Active Oldest Votes. Ayxan Haqverdili Kuba hasn't forgotten Monica Kuba hasn't forgotten Monica 88k 13 13 gold badges silver badges bronze badges.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast How to build and maintain online communities, from gaming to…. Level Up: Creative Coding with p5. Featured on Meta. Stack Overflow for Teams is now free for up to 50 users, forever. Outdated Answers: results from use-case survey.