Hello everyone.
I've been studying C++ for almost a year and it's been really interesting process due to some good tutorials. But unfortunately there's no good tutorial available on Win32Api programming. I've been searching through google thoroughly in vain. The ones i've found are not satisfactory. They are short and sketchy.
If you can provide me with a reference or just advise me a book which covers the topic fully it is greatly appreciated.
Is #1 tutorial http://www.winprog.org/tutorial/ not good enough? I have heard good things about it and I glanced at it really quick and seems quite decent. Plus, it is the first Google result when searching for "win32api programming tutorial".
I thought the same thing webjose. That looks like a decent tutorial to me. Of course you realize I'm not as 'hard core' on the TCHAR thing as you and disch are, so their use of char's for everything doesn't bother me a bit. I guess you missed that.
Anyway, the way to go if one is serious about it is Charles Petzold.
@freddie1: I did not see the code much. I saw the topics covered. I saw the basics of window classes, the window procedure, resources, etc. I did not check that the code actually made good use of the Win API, but if you say it uses char's when it should have used TCHAR's then this is the last time I ever recommend it!!! hehe.
A word is 2 bytes, yes; a dword, or double word is 4, and a qword or quad word is 8.
The quote you show is not correct. Each style may be a word, yes, but only one could ever be set to 1, otherwise all styles would have the same value. Each style probably has just one BIT set to 1.
As for the OR operator, look up bitmasked values. One works with bitmasked values using bitwise operations, like the bitwise OR operator you see there.
webJose is right. Each style does have one bit set to 1.
The easy way to check it out, if you use visual studio, is that you move your cursor to the style macro, say, CS_HREDRAW, right click and choose "go to definition". You'll see the actual value for the style macro defined in some system header file. Convert it to binary number, and you'll see that webJose is correct.
"go to definition" can be useful in other cases as well, when you have no idea about some weird symbol.