Hi!
I just wanted to ask if there are any easy-to-follow free documentations, free e-books or videos that explain in detail how to program Win32 GUI applications. Thanks!
Moschops, I want something that describes it in C++ but WinProg only provides C. C and C++ are similar but as I am nearly an intermediate I prefer to have only C++, otherwise I get confused.
win32 API is written in C, what do you expect ?
However, there are C++ frameworks like MFC, WTL that wraps win32 C api calls in C++ classes. However, it requires payed for versions of Visual Studio.
Or there are cross platform and free implementations like wxwidgets and qt, but these are usually require very large DLLs supplied with your application.
The simplest form of Windows programming will be C. You should then learn C first. But if you really know C++ already, you should know C or be very close. Maybe brush up a little on arrays and memory management? In general it shouldn't be too hard. Just remember a few tricks: STL's std::string.c_str() returns a C-string, equivalent to LPCSTR, std::wstring.c_str() does the same but in Unicode (LPCWSTR), and most implementations of the STL allow you to get a C-array from a std::vector<> by means of &vectorVariable[0].
Do yourself a favor, take those suggestions from webJose write them down on a sticky note and super glue it to your monitor. They will save you SO MUCH heart ache when you're working with Windows and since the strings class is C++, you'll never see those suggestions on MSDN.
There is really no reason you can't make your own classes for Win32 "objects". In fact I highley suggest doing this since nearly every struct has a related HANDLE\HINSTANCE etc. (that isn't part of the struct itself but is probably required for what you are trying to do) and calling CloseHandle() is a necessity for each instance of these HANDLE objects. This can easily be put into a destructor and I feel like doing so will teach you more about the API, and help keep everything neat and clean.
EDIT: Also remember that a HANDLE is a void pointer so don't try to copy it into your object otherwise closing it won't do any good.