Basic Example of how to use SH_NAME_SORTER


Example 1.  Say you've added an SHBitChordSorter to the root node, but you haven't used SH_COMMAND_SETPARAMETERS to make that SHBitChordSorter the default sorter.  Nevertheless, you would like this one particular BMessage to be handled by the SHBitChordSorter, rather than the default sorter.  Here's how you do it:

    BMessage myMsg('Helo');    // Your BMessage here!
    myMsg.AddString(SH_NAME_SORTER, "bitchord");  // Note: Must match the name returned by
                                                  // SHBitChordSorter::GetName()
    myMsg.AddInt32(BCS_TO, 0x01);    // Or whatever addressing fields are used by an SHBitChordSorter
    root->PostMessage(&myMsg);