Print Page | Close Window

Custom control on ribbon

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=10231
Printed Date: 08 October 2024 at 1:35am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Custom control on ribbon
Posted By: cdman
Subject: Custom control on ribbon
Date 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.
 
 



Replies:
Posted By: younicke
Date Posted: 15 April 2008 at 2:59am
ControlClock.Handle = picClock.hDC

this should be
ControlClock.Handle = picClock.hWnd




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net