Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / RibbonFrame / ReadMe.txt
diff --git a/research/transmission_spectroscopy/TOF/Win32++/samples/RibbonFrame/ReadMe.txt b/research/transmission_spectroscopy/TOF/Win32++/samples/RibbonFrame/ReadMe.txt
new file mode 100644 (file)
index 0000000..4d8e563
--- /dev/null
@@ -0,0 +1,55 @@
+RibbonFrame Example\r
+===================\r
+This project demonstrates how to add a ribbon to a Frame window. The ribbon\r
+buttons are defined in an Ribbon.xml. This application adds a ribbon to the\r
+Scribble sample. The ribbon is only supported on Windows 7 OS (and above). If\r
+the ribbon isn't supported by the operating system, the traditional menu and \r
+toolbar are displayed instead. \r
+\r
+How it works\r
+============\r
+Microsoft's RibbonUI framework uses COM to implement the ribbon. The COM \r
+interfaces involved are IUIApplication and IUICommandHandler. The Win32++ \r
+CRibbon class inherits from both IUIApplication and IUICommandHandler. \r
+\r
+To add a ribbon to your frame, inherit CMainFrame from CRibbonFrame, and add\r
+the Ribbon.xml file containing the definitions for your ribbon to the project. \r
+CRibbonFrame inherits from both CFrame and and CRibbon. To create and\r
+interact with the ribbon, we override the relevant functions from both \r
+IUIApplication and IUICommandHandler.\r
+\r
+The functions you may wish to override are:\r
+IUIApplication::OnCreateUICommand \r
+  Called for each Command specified in the Ribbon markup to bind the Command \r
+  to an IUICommandHandler.  \r
+IUIApplication::OnDestroyUICommand \r
+  Called for each Command specified in the Ribbon markup when the Ribbon host \r
+  application window is destroyed.  \r
+IUIApplication::OnViewChanged \r
+  Called when the state of a View changes.\r
+IUICommandHandler::Execute \r
+  Executes or previews the Commands bound to the Command handler.  \r
+IUICommandHandler::UpdateProperty\r
+  Sets a property value for a bound Command, for example, setting a Command to \r
+  enabled or disabled depending on the state of a View.  \r
+\r
+This example demonstratues how to override IUICommandHandler::Execute to respond\r
+to button clicks on the ribbon, and IUICommandHandler::UpdateProperty to\r
+configure parts of the ribbon.\r
+  \r
+Prerequisites:\r
+==============\r
+1. Windows 7 operating system\r
+2. Microsoft Windows SDK v7.0 \r
+3. Visual Studio 2005, 2008 or 2010 (full or Express Edition)\r
+\r
+Compiling Instructions\r
+======================\r
+To compile Ribbon.xml, specify it's custom build properties as follows:\r
+\r
+Command Line  uicc.exe ..\src\Ribbon.xml ..\src\Ribbon.bml /header:..\src\RibbonUI.h /res:..\src\RibbonUI.rc\r
+Outputs       Ribbon.bml;RibbonUI.rc;RibbonUI.h \r
+\r
+Note: Ensure that the following VC++ Directories are configured:\r
+Executables directory:         C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\r
+Include directory:             C:\Program Files\Microsoft SDKs\Windows\v7.0\Include\r

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