Compiling Ribbon Markup

For the Windows Ribbon framework to consume the Ribbon markup file, the markup file must be compiled into a binary format resource file. A dedicated markup compiler, the UI Command Compiler (UICC), is included with the Windows Software Development Kit (SDK) (7.0 or later) for this purpose. In addition to compiling the binary version of the markup, the UICC generates an ID definition header (.h) file that exposes all markup elements to the Ribbon host application and a resource (.rc) file that is used to link image and string resources to the host application at build time.

Compiler Workflow

The workflow of the Ribbon markup compiler is illustrated in the following diagram.

Diagram showing the Ribbon markup compiler workflow.

Command-Line Syntax

The command-line syntax for the Ribbon markup compiler is shown in the following example.

UICC <ribbonFile> <binaryFile> [options]

Arguments and Options

The arguments and options for this tool are described in the following table.

Note  The command-line options listed must be specified in the order given.
/header:<headerFile> Generate a header file called <headerFile> that contains the markup Command ID resource symbols. If omitted, a header file is not generated.
/res:<resourceFile>Generate a resource file called <resourceFile> that links all image and string resources, the binary markup file, and the header file to the host application at build time. If omitted, a resource file is not generated.
/name:<ribbonName>The resource name for the binary markup file that is logged in the <resourceFile>. The default is APPLICATION_RIBBON.
/W{0\1\2}Filter the event messages based on severity.
0Error messages only.
1Error and Warning messages only.
2Default. Error, Warning, and Informational messages.




The following example demonstrates how to use the Ribbon markup compiler to generate a typical set of resource files for a Ribbon application.

UICC.exe RibbonMarkup.xml RibbonMarkup.bml /header:RibbonIds.h /res:RibbonUI.rc

Related topics

Declaring Commands and Controls with Ribbon Markup
Creating a Ribbon Application



Community Additions