Frame-Window Resources

If an application specifies FCF_ACCELTABLE, FCF_ICON, FCF_MENU, FCF_STANDARD, FS_ACCELTABLE, FS_ICON, or FS_STANDARD when creating a frame window, the application must provide the resources to support the specified style. Failure to do so causes the window creation to fail. Depending on the style, a frame window might attempt to load one or more resources from the application's executable files.

The following table shows the frame-control flags and frame-window styles that require resources:

┌────────────────────┬────────────────────┬────────────────────┐
│Flag                │Style               │Description         │
├────────────────────┼────────────────────┼────────────────────┤
│FCF_ACCELTABLE      │FS_ACCELTABLE       │Requires an         │
│                    │                    │accelerator-table   │
│                    │                    │resource. The frame │
│                    │                    │window uses the     │
│                    │                    │accelerator table to│
│                    │                    │translate WM_CHAR   │
│                    │                    │messages to         │
│                    │                    │WM_COMMAND, WM_HELP,│
│                    │                    │or WM_SYSCOMMAND    │
│                    │                    │messages.           │
├────────────────────┼────────────────────┼────────────────────┤
│FCF_ICON            │FS_ICON             │Requires an icon    │
│                    │                    │resource. The frame │
│                    │                    │window draws the    │
│                    │                    │icon when the user  │
│                    │                    │minimizes the       │
│                    │                    │window.             │
├────────────────────┼────────────────────┼────────────────────┤
│FCF_MENU            │FS_MENU             │Requires a          │
│                    │                    │menu-template       │
│                    │                    │resource. A frame   │
│                    │                    │window uses the menu│
│                    │                    │template to create a│
│                    │                    │menu containing the │
│                    │                    │commands and menus  │
│                    │                    │specified by the    │
│                    │                    │resource.           │
├────────────────────┼────────────────────┼────────────────────┤
│FCF_STANDARD        │FS_STANDARD         │Requires a          │
│                    │                    │menu-template       │
│                    │                    │resource            │
│                    │                    │(FCF_STANDARD only),│
│                    │                    │an accelerator-table│
│                    │                    │resource, and an    │
│                    │                    │icon resource.      │
└────────────────────┴────────────────────┴────────────────────┘

You can use the resource compiler to add icon, menu, and accelerator-table resources to the application's executable file. Each resource must have a resource identifier that matches the resource identifier specified in the FRAMECDATA structure passed to WinCreateWindow or in the idResources parameter of WinCreateStdWindow.

Note: For detailed information about icon, menu, and accelerator-table resources, see Mouse Pointers and Icons, Menus, and Keyboard Accelerators, respectively.