Merge branch 'master' of git.ucc.asn.au:/matches/honours
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / RibbonFrame / ReadMe.txt
1 RibbonFrame Example\r
2 ===================\r
3 This project demonstrates how to add a ribbon to a Frame window. The ribbon\r
4 buttons are defined in an Ribbon.xml. This application adds a ribbon to the\r
5 Scribble sample. The ribbon is only supported on Windows 7 OS (and above). If\r
6 the ribbon isn't supported by the operating system, the traditional menu and \r
7 toolbar are displayed instead. \r
8 \r
9 How it works\r
10 ============\r
11 Microsoft's RibbonUI framework uses COM to implement the ribbon. The COM \r
12 interfaces involved are IUIApplication and IUICommandHandler. The Win32++ \r
13 CRibbon class inherits from both IUIApplication and IUICommandHandler. \r
14 \r
15 To add a ribbon to your frame, inherit CMainFrame from CRibbonFrame, and add\r
16 the Ribbon.xml file containing the definitions for your ribbon to the project. \r
17 CRibbonFrame inherits from both CFrame and and CRibbon. To create and\r
18 interact with the ribbon, we override the relevant functions from both \r
19 IUIApplication and IUICommandHandler.\r
20 \r
21 The functions you may wish to override are:\r
22 IUIApplication::OnCreateUICommand \r
23   Called for each Command specified in the Ribbon markup to bind the Command \r
24   to an IUICommandHandler.  \r
25 IUIApplication::OnDestroyUICommand \r
26   Called for each Command specified in the Ribbon markup when the Ribbon host \r
27   application window is destroyed.  \r
28 IUIApplication::OnViewChanged \r
29   Called when the state of a View changes.\r
30 IUICommandHandler::Execute \r
31   Executes or previews the Commands bound to the Command handler.  \r
32 IUICommandHandler::UpdateProperty\r
33   Sets a property value for a bound Command, for example, setting a Command to \r
34   enabled or disabled depending on the state of a View.  \r
35 \r
36 This example demonstratues how to override IUICommandHandler::Execute to respond\r
37 to button clicks on the ribbon, and IUICommandHandler::UpdateProperty to\r
38 configure parts of the ribbon.\r
39   \r
40 Prerequisites:\r
41 ==============\r
42 1. Windows 7 operating system\r
43 2. Microsoft Windows SDK v7.0 \r
44 3. Visual Studio 2005, 2008 or 2010 (full or Express Edition)\r
45 \r
46 Compiling Instructions\r
47 ======================\r
48 To compile Ribbon.xml, specify it's custom build properties as follows:\r
49 \r
50 Command Line  uicc.exe ..\src\Ribbon.xml ..\src\Ribbon.bml /header:..\src\RibbonUI.h /res:..\src\RibbonUI.rc\r
51 Outputs       Ribbon.bml;RibbonUI.rc;RibbonUI.h \r
52 \r
53 Note: Ensure that the following VC++ Directories are configured:\r
54 Executables directory:  C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\r
55 Include directory:              C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\r

UCC git Repository :: git.ucc.asn.au