Archived

This topic is now archived and is closed to further replies.

Andre the Giant

Book Un-Recommendation and Win32 API questionn

Recommended Posts

Hello, First of all, I want to say that if you are considering buying a book on... well, anything (!), you can do a lot better then Sams Teach yourself Visual C++ in 24 hours. Yeah I know I know I should have been weary of any book that ended in "... in 24 hours", but this one is really bad. First of all, the title is very misleading. Ive read over 2/3 of the book, and I''d say that only about 2-5% of it is Actually about The visual c++ compiler. The rest is tutorials using windows programming and MFC. That is almost a good thing, because shortly after purchasing the book, I realized that I know all the basics of my MSVC++ compiler anyway, and I wanted to learn windows programming. I still think it is not a good book for that because it merely gives example after example without explaining how and why the examples work so it is not easy to create your own program that is not in the book. Its like explaining how to do take the square root of a number to a grade 5 student. You could either tell them that the square root of 4 is 2 and the square root of 9 is 3. Or you could take the better approach and tell them HOW to take the square root, so that If they wanted to take the square root of say, 5, they would be able to do it even though that was not one of your examples given. Aaaaanyway, The book has taught me all about the windows message system and how the wndProc has a big switch statement to check all the messages that you care about, but Im still not sure how to send a message myself. For example, If you catch the WM_SIZE event, you can get the new width and height that the user resized the window to. But what I would like to know, is how to programatically resize the window if I dont like the size that the user resized it to. I hope this isnt too confusing ,because im trying to write it quick. Thanks! Its not my fault I''''m the biggest and the strongest; I don''''t even exercise.

Share this post


Link to post
Share on other sites
look up SendMessage() and PostMessage()

I own "Teach yourself Visual C++ in 24 hours"... i bought it when i didnt know better. I still sometimes use it as an MFC reference though.

Share this post


Link to post
Share on other sites
One way to prevent the user from resizing your window is to handle the WM_SIZE message. There are other approaches to take as well, like making the program dialog based.

The book to learn windows programming is Charles Petzold''s "Programming Windows" - no MFC, no C++ - just straight C, straight Win32 api.

Share this post


Link to post
Share on other sites
Um, does the book not state in the introduction that it's a guide to learning the VC environment and MFC? Even if you didn't check, you got what you paid for. What were you expecting?

EDIT: Decide for yourself what the book is about:
quote:
From the Introduction of Sam's Teach Yourself Visual C++ in 21 Days, page 21:
Welcome to Visual C++. Over the next 21 Days, you will learn how to use the features that Microsoft has built into its C++ development environment to enable you to create very advanced applications for the Windows and NT platforms. When Microsoft's developers first came up with the idea behind Visual C++, the decided to take their world-class C++ compiler and create a development environment and set of tools that would enable developers to create Windows applications with a level of ease and speedthwas was unheard of among C++ development environments...


Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links


[edited by - zealouselixir on August 31, 2002 2:30:20 PM]

Share this post


Link to post
Share on other sites
Hint (I found this out the hard way): If the words "Gurus", "24 hours", or "Dummies" is in the title, you''re wasting your money.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Actually.. I bought DirectX 7 in 24 hours, it demonstrates how to use DirectX, with an explanation, and for further information it points you to the DX SDK documentation. It disn''t disappoint me.

Kur.

Share this post


Link to post
Share on other sites
The Gurus books aren''t bad if you supplement them with additional resources (even online resources). There is no single book that can include everything, but TOTWGPG has very thorough coverage of Win32 and DX.

The 24 Hours books are just another way to sell the same content that''s found in the 21 Days books. They aren''t terrible, but they''re not the best way to get started either.

The Dummies books by Dan Gookin were always the best, but even some of the modern ones are a light-hearted, solid introduction into the topics they cover.

You really can''t say that they aren''t wortht the price on the cover. They may not work for you, but it''s quite possible that some people (read: many people) will find them useful. If you''re going to make a judgement like that, at least take the time to suggest something better.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites