The CmdScreenTipAttach()
method invokes CmdScreenTipSet()
with he bClone
parameter set to false.
Here is the source code of this method:
void CExtCustomizeCmdTreeNode::CmdScreenTipAttach(
CExtCustomizeCmdScreenTip * pCmdScreenTip,
bool bBasic // = true
)
{
ASSERT_VALID( this );
CmdScreenTipSet( pCmdScreenTip, false, bBasic );
}
In both cases, your code allocates the
CExtCustomizeCmdScreenTip
object using C++
new
operator and initializes it. If you use
CmdScreenTipAttach()
, you should simply forget about deleting the screen tip information object. If you invoke the
CmdScreenTipSet()
method with the
bClone
parameter set to
true,
then your code is responsible for deleting the
CExtCustomizeCmdScreenTip
object. Cloning in this case may be convenient when you need to initialize several very similar screen tips for neighboring buttons in the ribbon control.