Export (0) Print
Expand All

Sample Resource-Definition File (Windows Embedded CE 6.0)

1/6/2010

The following code example shows a script file that defines the resources for an application named Shapes.

#include "shapes.h"

ShapesCursor CURSOR SHAPES.CUR
ShapesIcon ICON SHAPES.ICO

ShapesMenu MENU
{
  POPUP "&Shape"
  {
    MENUITEM "&Clear", ID_CLEAR
    MENUITEM "&Rectangle", ID_RECT
    MENUITEM "&Triangle", ID_TRIANGLE
    MENUITEM "&Star", ID_STAR
    MENUITEM "&Ellipse", ID_ELLIPSE
  }
}

The CURSOR Resource statement names the application's cursor resource ShapesCursor and specifies the cursor file Shapes.cur, which contains the image for that cursor.

The ICON Resource statement names the application's icon resource ShapesIcon and specifies the icon file Shapes.ico, which contains the image for that icon.

The MENU Resource statement defines an application menu named ShapesMenu, a pop-up menu with five menu items.

The body of the menu definition, enclosed by the curly braces or the BEGIN and END keywords, specifies each menu item and the menu identifier that is returned when the user selects that item. For example, the first item on the menu, Clear, returns the menu identifier ID_CLEAR when the user selects it. The menu identifiers are defined in the application header file, Shapes.h.

Community Additions

ADD
Show:
© 2015 Microsoft