With GUI programming most tutorials and information i find all suggest using new programs such as QT or Widgets to help with the process, why don't people program GUI's in a regular C++ IDE. Is it just too hard or not possible? If anyone knows of a tutorial that can walk me through some GUI programming in a C++ IDE i would be grateful. Thanks
why don't people program GUI's in a regular C++ IDE
. It seems you know very little about how GUI's are actually developed, it's not just as simple as using pure C++ to write a gui. You need to
a) handle a window with C++ cannot do
b) render graphics to the screen, which C++ also cannot do
c) handle events
stuff like this requires the use of libraries and frameworks such as SFML, SDL, OpenGL, Win32 API, etc.. etc.. . There isn't going to be a tutorial on 'writing a GUI' in just c++, you will need to have an in depth understanding of C++ and a graphical framework to work with. If you are interested in this stuff head over to SFML to learn more about graphics, we're a helpful community
A) With the WINAPI WinMain you can create a window handler.
HINSTANCE hThisInstance
B) You can create shapes, apply colors, create buttons and apply images to these things, why can C++ not render graphics?
If C++ wasnt meant to handle new window creation why doe sit have the library #include <windows.h>.
Your correct my knowledge is limited and probably has holes in, these are just nooby questions im sure :D So thanks for taking the time to explain things to me.
including windows.h does not mean c++ was written with the WIN32 API, that header is available for you because of windows. the WINAPI is one of many approaches to rendering graphics to the screen. It is not the job of C++ to supply you means to writing graphics, that would severely limit the language. instead you have 3rd party libraries(such as WINAPI) that allow you to use C++ to write graphics.
Of course you can create applications in C++, it would be useless otherwise, but you cannot specifically create shapes, colors, buttons, images and such. What you are talking about it not directly included in c++ but rather you are probably referencing the WINAPI
Oh i am using Code:Blocks, is WINAPI an outside library that's included with C:B? So is WINAPI similar to QT? If i am looking for tutorials for C++ GUI-ing, i should be looking for WINAPI tutorials?
WINAPI is packaged with windows, so if you have a windows machine windows.h will be accessible and usable, it is provided my Microsoft for building windows specific applications. I would highly recommend you do not start with WINAPI however, it can be extremely complex and tough to grasp for beginners. Code blocks is simply an IDE, it doesn't give you any extra c++ functionality.
Look at QT, a cross-platform friendly UI framework for C++. You can look up tutorials and references on their site in order to build UI's for your application. It is very user friendly and I believe is what you are looking for. What do you planning on developing a UI for?
A game eventually, but i was just looking to learn, i was looking to learn about the best way to create a new window with interactive features. Thanks for your great explanations so far they have been very helpful.