hey! i thought about posting this in the windows programing forum, but sence this is pretty much a beginners question i ask here.
i did some console application tutorials, and played around with it (made a calculator, and a simple quiz) but i got bored, so i decided to move on to windows programming!
i have looked around but it was hard to find any easy to understand beginner tutorials, so i wondered if you could help me?
i dont want a tutorial that tells me how to do, but a tutorial that tells me why i do it, if you understand.
My advice to anyone who wants to learn windows programming has always been start with “Programming Windows” by Charles Petzold.
Synopsis
Look it up in Petzold remains the decisive last word in answering questions about Windows development. And in PROGRAMMING WINDOWS, FIFTH EDITION, the esteemed Windows Pioneer Award winner revises his classic text with authoritative coverage of the latest versions of the Windows operating system once again drilling down to the essential API heart of Win32 programming. Topics include: The basics input, output, dialog boxes An introduction to Unicode Graphics drawing, text and fonts, bitmaps and metafiles The kernel and the printer Sound and music Dynamic-link libraries Multitasking and multithreading The Multiple-Document Interface Programming for the Internet and intranets Packed as always with definitive examples, this newest Petzold delivers the ultimate sourcebook and tutorial for Windows programmers at all levels working with Microsoft; Windows 95, Windows 98, or Microsoft Windows NT;. No aspiring or experienced developer can afford to be without it. An electronic version of this book is available on the companion CD.
If you want to do Windows Programming. Then you either need to pick a language that has a GUI toolkit integrated (.NET, Java, Delphi etc) or you have to learn a C++ toolkit.
A good easy toolkit to learn first is the FLTK (Fast Light Tool Kit). It's a good beginner toolkit that will allow you to build some basic user interfaces. If you want something a bit more substantial than WxWidgets is definitely a top choice. It's been around along time and is multi-platform too. Both are Open Source and have pretty good documentation.
Zaita wrote:
> If you want to do Windows Programming. Then you either need to pick a
> language that has a GUI toolkit integrated (.NET, Java, Delphi etc) or you
> have to learn a C++ toolkit.
Err, that would be wrong, C and the platform SDK will do.
You don't even need a platform SDK for Win32 development. And this is a C++ forum, not a C forum ;)
To start on Windows. You just need a Windows compiler. The Windows header file has all of the definitions to access the required API. It's possible, but you are really going to be re-inventing the wheel. You will acquire a much better base understand if you use a 3rd party GUI Toolkit than if you are trying to code your windows and catch the callbacks yourself.
Yea, .NET isn't a language, but all of the languages can be directly converted to each other and compile to the same byte code. I pointed it out because it has integrated GUI Toolkit.
You will acquire a much better base understanding by using a 3rd party GUI tool kit! What a load of...How can you get a better base understanding by looking at somthing that is overlayed.
It will be easier to understand how windowing works, how the objects interact with each other, building objects and to get functionality off the ground. Not to mention not as much code to write.
Having to write many many classes that generate your GUI natively under Win32 is going to require alot of code. While this has its purpose (3D Graphic engines etc) for application development it's really an impractical approach.
wxWidgets will give you a structure similar to Java (Swing?) in that it has a layout manager and is fairly easy to get code going quickly.
.NET 1.0/2.0 has Windows Forms for GUI generation. .NET 3.0 supports windows forms but also has WPF.
If you want to go with natively coding Windows controls. Win32API is going to be your best friend. I could provide code on creating windows and handling events if you'd like. I can also provide wxWidget code, and probably FLTK if I still have some lying around.
Unfortunately, I am unfamiliar with how Vista handles this stuff natively.
I hope you haven’t taken anything personally. The reason I pulled you on your original statement was; that as this is a beginner’s forum you may have more influence on peoples thinking than you may realise and an inaccurate statement of fact needed to be addressed.
If a person wants to learn Windows™ programming, I would still maintain that it would probably be best to learn from the ground up with the Windows API* (after all Windows™ programming isn’t just about the user interface). This is from my own personal experience (and that of a lot of people I have talked to over the years); I started at a more abstract level and regretted it. Once I understood what was going on with Windows™ I could better understand why the framework I was using did X, Y, and Z.
______________
*NB: Using the term Windows API or Win API more accurately reflects the overall API as there is/was Win16, win32 and win64 APIs.
I have use Windows™ (meaning Microsoft Windows operating systems) to distinguish between the general windows/windowing concept and the OS.
i am using visual C++ 2008, and it have a tool kit, for creating forms, controls, and so on!
also i have looked at the winAPI, but its not what i need!
i know how to create the controls, and so on but i need to know what code i should put in there!
everything i need is some tutorials on windows programming, that is not API tutorials.
You say you are using VC 2008, what project type are you using? If you are using a CLR project type, for example 'Windows Forms Application' then you will be doing .net programming with C++/CLI. I may be mistaken but I seem to remember that even Microsoft don't recommend learning .net programming with C++/CLI if you have no prior experience of either Windows API programming or .net programming with another language. I have not come across any descent tutorials for this. You could have a look around, google CLR C++/CLI.
You also say you know how to create the controls, and so on but i need to know what code i should put in there! I don't really understand, do you mean that you know how to put controls on the form but don't know how to handle the events to make them work for you?
yes actually that was my problem, but i figured it out.
and yes, i do work with the "windows form applicaion" template. is it that bad to do the drag'n drop thingy? but, if i use the API to create the forms, and controls will i then use the same code as i do now, for the event handlers?
and where do i find a good tutorial to learn the windows API? and witch template should i use, for API programing?
I too am learning C++ and I have to write a windows app with a GUI, I am using MS visual C++ express. what would be the best approach from here? I have been going through some tutorials learning C++, but now using the MS visual C++ express IDE it gets complicated. I'm not sure how to program a GUI.