Help with Pretzold's tutorial

This is a discussion on Help with Pretzold's tutorial within the Windows Programming forums, part of the Platform Specific Boards category; Im currently at Chapter 10 Menus and Other Resources and having trouble compiling the examples. To add a resource and ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    758

    Help with Pretzold's tutorial

    Im currently at Chapter 10 Menus and Other Resources and having trouble compiling the examples.

    To add a resource and header file it says:

    "You do this by adding a resource script to the project. Select New from the File menu, select the Files tab, click Resource Script, and type ICONDEMO in the File Name field. Click OK. At this time, Developer Studio creates two new text files: ICONDEMO.RC, the resource script, and RESOURCE.H, a header file that will allow the C source code file and the resource script to refer to the same defined identifiers."

    Neither MSVC++6 nor MSVC2008 won't create me RESOURCE.H header file. What am i doing wrong?

    Thanks for any input!
    Compiler MSVC++ 2010 with Code::Blocks.

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Well, take it from the CD that came with the book.

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    758
    Yeah i could do that thanks, but that would be the easy way.

    I wanna learn to create a program like one should.
    Otherwise how will i write my own programs later?
    Compiler MSVC++ 2010 with Code::Blocks.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    manually create teh resource.h file. Thats how I have to do it.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    758
    I did. I copied the code using notepad, but Im getting a lot of undeclared identifier errors.
    Compiler MSVC++ 2010 with Code::Blocks.

  6. #6
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,235
    I think PETZOLD might be somewhat upset when you refer to him as a "pretzel" ;-)

  7. #7
    Registered User
    Join Date
    Dec 2007
    Posts
    758
    "I think PETZOLD might be somewhat upset when you refer to him as a "pretzel" ;-)"

    lol sorry 'bout that, unfortunately i cant edit the title anymore, maybe an admin would be so kind
    to do so.
    Compiler MSVC++ 2010 with Code::Blocks.

  8. #8
    Registered User
    Join Date
    Dec 2007
    Posts
    758
    Ok i managed to compile with VS 2008.
    I had to change #include "afxres.h" to #include <winresrc.h>.
    Compiler MSVC++ 2010 with Code::Blocks.

  9. #9
    Just a Human Anuradh_a's Avatar
    Join Date
    Jan 2008
    Posts
    50
    hi
    did you include the resource.h file in your code.
    I mean(if you are using MVC6)

    Code:
    #include "resource.h"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. My new website
    By joeprogrammer in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 03-17-2006, 06:38 PM
  2. Cprog tutorial: Design Patterns
    By maes in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2004, 01:41 AM
  3. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  4. Problem with tutorial (Vector class)
    By OdyTHeBear in forum C++ Programming
    Replies: 4
    Last Post: 12-18-2002, 01:49 PM
  5. My DirectInput tutorial....
    By jdinger in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-18-2002, 11:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21