Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / RibbonSimple / ReadMe.txt
diff --git a/research/transmission_spectroscopy/TOF/Win32++/samples/RibbonSimple/ReadMe.txt b/research/transmission_spectroscopy/TOF/Win32++/samples/RibbonSimple/ReadMe.txt
new file mode 100644 (file)
index 0000000..e3fc2ba
--- /dev/null
@@ -0,0 +1,58 @@
+SimpleRibbon Example\r
+====================\r
+This project demonstrates how to add a ribbon to a simple window. The \r
+application uses TRACE to send text to the output window when a ribbon button\r
+is pressed. It also detects changes to the ribbon height and adjusts the \r
+view window accordingly.\r
+\r
+The ribbon buttons are defined in the Ribbon.xml. This file must be compiled \r
+using uuic. To compile Ribbon.xml, add it to the set of files to be compiled,\r
+and modify its properties, specifying the "Custom Build Step" parameters as\r
+described below.\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
+\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 a simple window, inherit CView from both CWnd and CRibbon. We\r
+also need to add the Ribbon.xml file containing the definitions for our ribbon\r
+to the project. To create and interact with the ribbon, we override the relevant\r
+functions from both 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.    
\ No newline at end of file

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