- Install TR1 feature pack, note that feature pack installation needs VS2008 to be installed, will not work with VS2005 or install VS2008 SP1.
- So in your VS9 installation directory there is a samples directory, unzip “AllVCLanguageSamples.zip”. After installing Vs2008 SP1 the sample directory may no longer have feature pack samples, but don’t worry I’ve uploaded this to my blog. Download samples(Save as zip).
- You will see pretty cool samples for VC after unzipping, some are old and some are updated
- Hey I think scribble has been updated with ribbon bar support I guess.
- Move to this directory -> AllVCLanguageSamplesC++MFCVisual C++ 2008 Feature Pack, this is where all feature pack samples are located!
- To see an office 2007 demo, goto directory MSOffice2007Demo
- Compile, run and have fun
- See ribbons in full flow.
- One sample that I would recommend is the “NewControls” sample. Almost all new controls are implemented in this sample. Check out for some surprises!
So this was the samples part! So how can I create my own man! So here is the process…
Start devenv.exe, create a new project, of type SDI/MDI!
Check out the regions encircled in orange, it’s powerful.
Click on finish and there you have your first ribbon bar application, isn’t this cool guys, now here are some snapshots of the resulting UI without writing a single line of code.
See our first shot and the drop down to the right of this shot, we got this drop down menu because we had “Enable visual style switching” checked in our main dialog, so we can switch between different type of office themes…
1. Office 2007 Black theme!
Some tid bits on switching themes
CMFCVisualManager does visual management stuff.
// To set Win2000 look and feel call
CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManager));
// To change to office XP look and feel call…
CMFCVisualManager::SetDefaultManager (RUNTIME_CLASS (CMFCVisualManagerOfficeXP));
2. Office 2007 Silver theme
You should be seeing a small toolbar at the top, it’s called the quick access toolbar, that’s kinda cool, with all commands that are to be quickly accessed like save, new etc.
3. Office 2007 Blue theme
See the drop down menu to customize quick access toolbar. I just love these new stuff. But I shouldn’t get excited these are just eye candy stuff, real stuff will be following. I did try these apps a bit and my first feeling is that it’s fast.
4. Office 2007 Aqua theme
We can also move around the quick access toolbar control, if you remember we have the statusbar switching thingie in our view menu, well now it’s right in front of us on the ribbon bar, see the checkbox, just switch it off, that’s it.
Pretty cool eye candy stuff so far, I will try to go into more detail on some of these controls.
Now lets try out visual studio templates. See my first screenshot, there is a combo called “Visual studio templates and color” selected appropriate one for yourself also select project style(see my first screenshot) as Visual Studio and rest as usual with office ribbon bars enabled…
Without a single line of code this is what I get, I’ve got to say Microsoft did a great job!
From what I’ve seen off property windows, they are strictly following OO to insert new property items, here is an article on getting started with property sheet.
So far good enough, it’s going to be fun. Hey do give your feedback too!