windows programming

This is a discussion on windows programming within the Windows Programming forums, part of the Platform Specific Boards category; hiii, This is naidu.I am a beginner to VC++ programming. So please help me by telling the meaning of "AFX_WINGREET_H__E7D60DA4_9891_11D1_80FC_00C0F6A83 ...

  1. #1
    naidu
    Join Date
    Oct 2004
    Posts
    10

    windows programming

    hiii,

    This is naidu.I am a beginner to VC++ programming.
    So please help me by telling the meaning of
    "AFX_WINGREET_H__E7D60DA4_9891_11D1_80FC_00C0F6A83 B7F__INCLUDED_".
    this is appeared in my "Wingreet.h "header file s first line,when i created my first program "Wingreet" in VC++.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,532
    Invariably, header files look like this
    Code:
    #ifdef SOMETHING
    #define SOMETHING
    // body of header file goes here
    #endif
    SOMETHING will not be defined the first time the file is included, so the body of the header file is included, and SOMETHING becomes defined.
    If you try and include the file again, then SOMETHING will already be defined and the body of the header file will be skipped (you've already included it)

    It basically means you can
    Code:
    #include "Wingreet.h"
    #include "Wingreet.h"
    without the compiler complaining about things being redefined or redeclared.

  3. #3
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    and the actual string is generated by Visual C++ to be guaranteed unique for each generation so you can have identically named but different headerfiles in different applications without clashes.

    AFX_<filename>_<GUID>_INCLUDED where GUID is generated by GuidGen (or whatever the Microsoft equivalent is) based on your network card MAC address, a timestamp, and some other stuff.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows 98/2000 programming in Windows XP
    By Bill83 in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2005, 02:16 PM
  2. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  3. dual boot Win XP, win 2000
    By Micko in forum Tech Board
    Replies: 6
    Last Post: 05-30-2005, 02:55 PM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 05:31 PM

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