Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Custom control on ribbon
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom control on ribbon

 Post Reply Post Reply
Author
Message
cdman View Drop Down
Newbie
Newbie


Joined: 15 April 2008
Location: Canada
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote cdman Quote  Post ReplyReply Direct Link To This Post Topic: Custom control on ribbon
    Posted: 15 April 2008 at 2:45am
Hi,
 
I have a ribbon bar in VB6 - Active-x and I would like to add a large label and a shape to it. I've been reading the posts and have seen it suggested that I have to put them in a picturebox and then add the picturebox to the ribbon.
 
So I put the label and shape into a picturebox in design mode then I declared the control:
 
Dim ControlClock As XtremeCommandBars.CommandBarControlCustom
 
then I add the control to the group:
 
Set ControlClock = GroupDocumentViews.Add(XtremeCommandBars.XTPControlType.xtpControlCustom, ID_CLOCK, "", False, False)
 
and change the control handle to equal the picturebox handle:
 
ControlClock.Handle = picClock.hDC
 
but nothing gets added to the ribbon. I can not find an example of how to do this - just a general description of what to do.
 
 
Back to Top
younicke View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 March 2005
Status: Offline
Points: 107
Post Options Post Options   Thanks (0) Thanks(0)   Quote younicke Quote  Post ReplyReply Direct Link To This Post Posted: 15 April 2008 at 2:59am
ControlClock.Handle = picClock.hDC

this should be
ControlClock.Handle = picClock.hWnd

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.124 seconds.