Thread: Resource question

  1. #1
    Registered User
    Join Date
    Jan 2006

    Resource question

    Hey guys,

    I am trying to learn Windows programming. I found theForgers tutorial and I had a question about it. It says that in the resources.h header file you have to assign an integer to each resource when you define it, like...

    #define IDR_MYMENU 101
    #define IDI_MYICON 201
    #define ID_FILE_EXIT 9001
    #define ID_STUFF_GO 9002
    Are the number completely random? Can I enter anything (aside from negative numbers or decimals)? Is there a limit? Thanks.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    They aren't random, but they are arbitrary. However, there probably is some reserved area, I think below 100, for the system. Also, the upper limit might be as low as ~32000 (2^15-1), but that's only a worst-case scenario.
    All the buzzt!

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  2. Sorting out a resource manager
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 11-10-2008, 07:12 PM
  3. WIN32 API Controls used with Resource
    By parad0x13 in forum C++ Programming
    Replies: 0
    Last Post: 07-19-2008, 02:05 PM
  4. Loading an image in from a resource file
    By starcatcher in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 06:44 AM
  5. Lame question on dialog controls appearance
    By Templario in forum Windows Programming
    Replies: 2
    Last Post: 03-18-2003, 08:22 PM