Resource question

This is a discussion on Resource question within the Windows Programming forums, part of the Platform Specific Boards category; i have been reading some tutrial about resources etc but there is something he never explained like Code: /*resource.rc*/ #include ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    187

    Resource question

    i have been reading some tutrial about resources etc but there is something he never explained like
    Code:
    /*resource.rc*/
    #include "resource.h"
    IDR_MYMENU MENU
    BEGIN
        POPUP "&File"
        BEGIN
            MENUITEM "E&xit", ID_FILE_EXIT
        END
    
        POPUP "&Stuff"
        BEGIN
            MENUITEM "&Go", ID_STUFF_GO
    		MENUITEM "&Do", ID_STUFF_DO
            MENUITEM "G&o somewhere else", 0, GRAYED
        END
    END
    
    IDB_MSKIN BITMAP DISCARDABLE "Skin.bmp"
    why does he add & before stuff and before &file and after G&o etc why does he does that
    in normal c this should be shown as & but it didnt show in the string ??

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,834
    Read the spec for resource files.
    The & tells you which letter to press if you want to drive the menu from the keyboard.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 01: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, 03:05 PM
  4. Loading an image in from a resource file
    By starcatcher in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 07: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

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