Thread: Help with Pretzold's tutorial

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

    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!
    Using Windows 10 with Code Blocks and MingW.

  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
    932
    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?
    Using Windows 10 with Code Blocks and MingW.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    manually create teh resource.h file. Thats how I have to do it.

  5. #5
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    I did. I copied the code using notepad, but Im getting a lot of undeclared identifier errors.
    Using Windows 10 with Code Blocks and MingW.

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

  7. #7
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    "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.
    Using Windows 10 with Code Blocks and MingW.

  8. #8
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    Ok i managed to compile with VS 2008.
    I had to change #include "afxres.h" to #include <winresrc.h>.
    Using Windows 10 with Code Blocks and MingW.

  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, 07: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, 09:40 PM
  4. Problem with tutorial (Vector class)
    By OdyTHeBear in forum C++ Programming
    Replies: 4
    Last Post: 12-18-2002, 02: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