enum { IDD = IDD_TAB_DIALOG);

This is a discussion on enum { IDD = IDD_TAB_DIALOG); within the Windows Programming forums, part of the Platform Specific Boards category; Hi everyone, I was wondering if someone could shed a light on what exactly is the function of enum { ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    enum { IDD = IDD_TAB_DIALOG);

    Hi everyone,
    I was wondering if someone could shed a light on what exactly is the function of enum { IDD = IDD_TAB_DIALOG); in the .h files when creating an MFC class. Thanks
    Amish

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,650
    It's just to abstract out "IDD_TAB_DIALOG" from the rest of the code. If you decide to change "IDD_TAB_DIALOG" to somthing else, you only have to do it in the one spot.

    You could remove it and replace all instances of "IDD" with "IDD_TAB_DIALOG" buy why bother.

    gg

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    Oh I see. Thanks
    Amish

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A basic question on enum
    By MasterM in forum C++ Programming
    Replies: 2
    Last Post: 06-12-2009, 09:16 PM
  2. enum [tag] [: type] Is this non-standard?
    By HyperShadow in forum C++ Programming
    Replies: 2
    Last Post: 12-09-2007, 09:29 PM
  3. enum switchcase and windows message q
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 11-27-2006, 12:16 PM
  4. Conflicting enum issue
    By 7force in forum C Programming
    Replies: 1
    Last Post: 07-05-2006, 03:51 AM
  5. Switch case and enum help
    By SomeCrazyGuy in forum C++ Programming
    Replies: 9
    Last Post: 04-21-2005, 08:53 PM

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