Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2008 by Ivor Horton; ISBN: 9780470225905
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 4th, 2008, 10:42 PM
Registered User
 
Join Date: Nov 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Appreciation and Suggestions

Many years ago I worked extensively with C, but since then most of my programming experience has been with VB and VBA.
I decided to get back into C, so purchased Visual Studio 2008.
I bought a couple of books that claimed to explain how to use C++, but these covered only console applications. While console applications provide useful experience, they aren't what today's users require.
I bought Ivor Horton's book because it covered Windows applications. So far, I've studied the book up to Chapter 14 and have learned a lot by following Ivor's detailed instructions. I get the impression that Ivor ran out of time or enthusiasm when he got to Chapter 15 because that chapter provides only somewhat vague suggestions about how the code should be enhanced. I had to download the complete code from the web site and compare it line by line with my code to see what was needed.
One other problem is that Ivor's coding example is entirely devoted to graphics, there's almost no mention of text. That seems strange to me because I'm principally interested in creating applications that deal with data.
From what I understand at this point, C++ displays text in the default Windows font. I want to create forms using font faces, font sizes, and font styles I select. The book doesn't seem to provide information about this topic. I expected to be able to place a control on a form and select the font properties for that control in a manner similar to the way that can be done in VB and VBA. Perhaps that can be done but, if so, I haven't yet found a way to do it, and the book doesn't seem to provide any help. Nor have I found much help about this subject in Microsoft's sites
I'd appreciate any suggestions that might lead me to sources of information about dealing with text in MFC and Windows Forms applications.



 
Old November 29th, 2008, 04:00 AM
Authorized User
 
Join Date: Nov 2008
Posts: 15
Thanks: 1
Thanked 1 Time in 1 Post
Default

Hi Gordon,

The chapter 12 example made use of a DrawText function. The documentation also makes reference to a DrawTextEx function, with additional formatting options.

For the later MFC chapters projects, such as ch14, these functions exist under the pDC pointer passed to the OnDraw message handler: pDC->DrawText and pDC->DrawTextEx.

I haven't spent too much time on these myself, but the Visual Studio documentation has additional information (Help->Index). Paste this link into the URL bar of the help: ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/gdi/fontext_8ctw.htm and have a look. There are also lots of links under the "DrawText" index item.

There's also a topic on font and text functions here: ms-help://MS.VSCC.v90/MS.MSDNQTR.v90.en/gdi/fontext_9r77.htm

I can't tell you anything about forms, I've only been following the Native side of the book.

Hope this helps...





Similar Threads
Thread Thread Starter Forum Replies Last Post
any suggestions? Acar BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 May 27th, 2008 07:19 AM
All suggestions are welcome! Wooger Other Programming Languages 0 September 24th, 2007 09:47 AM
I Need Some Suggestions??? [email protected] ASP.NET 2.0 Professional 0 November 8th, 2006 02:14 AM
Some suggestions richard.york Forum and Wrox.com Feedback 0 October 13th, 2003 01:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.