i want to study win32 programming(windows form applications) please advise me good sites or good book (language c++)
Window form applications generally refers to .NET (C#, VB.NET, etc). However, if you want to do win32 windows applications, this is a solid introduction, which I used when learning:
http://www.charlespetzold.com/pw5/
Edit:
Now that I think about it, I also learned Win32 from this source, which is free, and available online:
http://www.relisoft.com/book/
This is the guy we all learned C++ from:
http://www2.research.att.com/~bs/
I'm a new user here, so I can't post another link, but look at his FAQ for ideas on how to learn C++.
C Only
http://www.winprog.org/tutorial/
http://www.functionx.com/win32/index.htm
http://zetcode.com/tutorials/winapi/
C and C++
http://www.tenouk.com/abouttenouk.html
Related
I'm developing my first Windows desktop application and I'm trying to figure out what the best approach would be to create the program's GUI.
I know, I know... I feel stupid for asking considering the amount of data on the subject on SO. However most answers seem outdated and I'm not sure if they fit my specific project. Also tutorials for Windows 8 'metro apps' are clogging my Google search results, which is NOT what I'm looking for.
I use Visual Studio. I've followed tutorials. I have basic knowledge of C and Java and extensive experience with PHP. I'm excited to learn C++, so I'm not looking for GUIs to create a GUI (like WinForms). I also don't care about managed code and portability for now, especially since I'm trying to avoid dependencies (i.e. users having to install .NET). As long as it runs smoothly on Vista and up, I'm happy.
The application
The software will teach basic physics to kids. I'd like to create a main area and a sidebar. The main area will feature a physics animation, say a bouncing ball, along with some Q&A. Users can zoom in to the animation to measure some stuff and answer the question. Users can track their progress in the sidebar. That's pretty much it.
What I've found so far
I'm getting a bit frustrated with MSDN. Most of their examples are given in four different languages (C#, C++, etc). I can't seem to get more than a bit of Hello World code from them.
I found a GDI API on MSDN and it seems like a good start for me. However I've read quite a few answers on SO saying creating layouts in pure C++ is really hard, that we're better of using frameworks like ATL and WTL. Since I'm also going to create (somewhat interactive) animations, I've wondered whether I should use gaming-targeted APIs like Direct2D.
Since all of this is new to me, and there are a lot of options, I don't know where to start for my particular application. Any tips would be greatly appreciated!
Using the raw Win32 API (no additional downloads or third-party helpers):
Here's a good primer (introduces dialog boxes, text boxes, buttons, etc): theForger's Win32 API Tutorial
And here's where you go from there (numeric up-downs, list boxes, combo boxes, tooltips, and more): Common Controls on MSDN. Most of these require you to #include <commctrl.h>.
I also found this to be a good resource that covered what the other two didn't: Win32 Developer - Window Assets
But the Win32 API doesn't seem like it does exactly what you want. A physics app for kids should have a more visual GUI than the API can provide. Good luck, though!
If you're ok with adding additional Frameworks, I'd suggest looking at Qt.
It allows to create the GUI from code only, has a good structure, and has an Interface for 2D drawing, if required.
If you are concerned about dependencies, you only have to include the Qt DLLs to your executables; no installation is required for the user.
To get started, see my (old) tutorial "Lessons in Windows API Programming".
But you really need a good book, such as edition 5 or earlier of Charles Petzold's classic "Programming Windows".
The problem with latest edition is that it's for C# and .NET, with Charles grabbing the tail of the "new way" at just the wrong time…
Disclaimer: I haven't checked the details of edition numbers.
Using the Windows API is the simplest, but producing advanced GUIs can take a very long time. Microsoft Foundation Class is a way to make the Windows API more user friendly and OOP. Does anyone have any experience with MFC?
Why not use some 2D C++ game engine, like HGE: http://hge.relishgames.com/overview.html.
What is the easiest way for GUI database programming using C++ and where I can find a lot of tutorials and documentation?
I looked at Qt, but didn't find good tutorials on doing that.
What do you think of MFC? Any resources to recommend for this?
Any ideas?
Thanks.
If you are on Windows I would definitely use Windows Forms. Otherwise, as you have mentioned: QT (I find QT documentation to be pretty good).
If you're just targetting Windows, I'd seriously look at Embarcadero C++ Builder.
The C++ compiler is not as compliant as some, but the VCL framework is ideal for GUI development, and comes with database-aware components straight out of the box.
Since you mention MFC, I assume you're on Windows. Why not Visual Studio C++ Express? It has a GUI builder that creates basic WinForms. There's plenty of documentation and tutorials on MSDN, especially for database interaction (as long as your database is Access, SQL Server, etc). While not fully featured, it is free.
As you know, many programs are written in C++.
Some of these have fancy GUI with non-classical-Windows style ( think to Photoshop, 3ds max, maya etc )..now my question is: how are they done? In pure Win32 API? MFC? DirectX/OpenGL? or other?
I can reach similar results with C#/WPF but how can I do it in C++?
Read Programming Windows by Petzold
In my experience, it seems to be the most practical way to learn Win32 programming.
If you care about cool effects, Petzold can definitely help you. After you're somewhat familiar with win32, you can skip to the chapter in Petzold to bitblt'ng and doing animation. I had to do some fancy animated graphs in a win32 app once, and I pretty much used Petzold (and some MSDN) as my primary reference.
It really depends on the application and the team that made it. So the answer is all of the above. If you see them doing something that looks off-beat and it looks the same on both windows and mac (assuming its cross platform) they have probably built their own GUI engine. Doing that lets them do custom things to suit their product.
What are some good websites for Win32 SDK programming tutorials?
The generally accepted bible for Win32 is the Petzold book:
http://www.amazon.com/Programming-Windows%C2%AE-Fifth-Microsoft/dp/157231995X
It's not online, but worth purchasing if you're serious about Win32, IMHO.
The best online tutorial with regards to native Win32 programming would have to be The Forger's Win32 API tutorial.
This is my favorite: Win32 Programming by Rector & Newcomer It is massive and goes through all the basic concepts down to the nuts and bolts about Win32 programming.
BTW: Newcomer has a website also with examples (although more related to MFC) here
Absolutely Programming Windows, 5th edition by Charles Petzold.
If you really need a simple starter that will guide you through the basics. You can read "Windows Programming from the Ground Up" by Herbert Schildt. It will be a good forerunner to Charles Petzold. I read Herb Schildt first and then Charles Petzold, and I really was able to understand what Petzold was talking very easily.
Yes, Petzold book (98), Richter book (4), Win32 group for undocumented apis and Windows source code (wine, etc), and Russinovich book also..
Autohotkey source code: http://www.autohotkey.com/download/
Avoid tutorials (by kids for kids)
Read the Petzold + Richter + Adv. Win32 Group (news://nntp.aioe.org/comp.os.ms-windows.programmer.win32)
And avoid Newcomer (newbie in Win32, knows MFC only...)
You can find all the references and getting started tutorials for Win32 SDK programming at MSDN.
I am about to reenter the MFC world after years away for a new job. What resources to people recommend for refreshing the memory? I have been doing mainly C# recently.
Also any MFC centric websites or blogs that people recommend?
The best: The Code Project
For blogs: Your best bet would be the Visual C++ Team Blog.
For books: Programming Windows with MFC is one of the best book on the subject.
For tutorials: Simply search google for various tutorials on MFC.
There's lots of useful information here:
http://www.flounder.com/mvp_tips.htm
I would highly recommend my all-time favorite book: MFC Internals: Inside the Microsoft© Foundation Class Architecture
It is not a 'how-to' book — it is a 'how does it work' book.
Its been a long time since i did any MFC but back then it used to be
"MFC internals" + debug into the MFC code and find what happens which used to be the best resources on MFC
Samples used to be available from Code Project to quickly get you going.
The vital "how do I?" book is http://www.amazon.com/gp/reader/0201185377/ref=sib_dp_pt#reader-link
Codeproject is also invaluable, although many of the 3rd party controls there nowhave counterparts in the new MFC feature pack.
Books are one thing, but I always found that practice was the key with MFC. CodeGuru was my favourite destination to answer anything MFC-related.
There's also that new website. What's it called...that's it - StackOverflow!