June 13, 2024, 01:08:23 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Ribbon examples for Windows7

Started by sapero, May 31, 2009, 05:10:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

May 31, 2009, 05:10:10 PM Last Edit: June 01, 2009, 03:08:38 AM by sapero
These 5 samples demonstrate the Windows Ribbon API, markup, and features, taken from the latest download notification.
EDIT: removed 'invalid' directory from archive.

sapero

June 09, 2009, 01:36:38 PM #1 Last Edit: June 10, 2009, 05:02:41 AM by sapero
I have next two examples, and a micro ribbon implementation for XP users.

In this attachment you'll find three projects:
ribbonwrapper - a COM server dll with custom implementation of ribbon tabs, groups and buttons, nothing more, just pure calculations and drawing. You can register this dll if you wish but this is not required, both examples can create the required object by loading the dll and calling DllGetClassObject.
The LoadUI method does not load the compilled markup file, instead it searches for and loads the xml file from executable directory.

demoapp - a ultra mini application that shows how the ribbon interface is working. It will not work on Windows7, just on XP with this "wrapper".
ebdemoapp - Emergence version.

If you think that I'm breaking the law by implementing a custom ribbon interface, please let me know.

sapero

June 10, 2009, 04:54:02 AM #2 Last Edit: June 10, 2009, 05:03:25 AM by sapero
You may notice Emergence example is crashing if you close the window. This is because the base classes are calling FreeHeap in the Release method if reference count decreases to zero. Aurora is using heap for new/delete and Ebasic uses global memory.
If you have downloaded headers from 9th june 2009, please update to 10th. I've changed FreeHeap to __DELETE in the base classes.

I have updated also the wrapper examples. Small buttons are now handled properly. In the Aurora version I've changed Domodal to ShowDialog, because OnClose was not called.

DominiqueB

Hello,

can't recompile the ripponwrapper.awp project because from deff.inc

#include "..\\projects\\xml\\lib\\xml.inc"

doesn't exist ?

Thank's

Dominique

sapero

Dominique, the XML libray you can download here or in the attached set of files (updated recently).

But you will be unable to compile this (wrapper) code without modifications. I'm using a custom extensions to the parser (it modifies the code before it gets compilled) to use try/catch blocks and NEW without parentheses, and the #region tool.
See in CUIFramework::GetView for "try" block, and ClassFactory::CreateInstance for customized NEW.

If you really want to compile it, please download the archive below, copy all files to wrapper directory and add the two libs to wrapper project.

EDIT: reuploaded, fixed (probably crashing) FindClose for the default compiler configuration.