Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - CommandBars 13.2.1
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CommandBars 13.2.1

 Post Reply Post Reply
Author
Message
Alpicus View Drop Down
Groupie
Groupie


Joined: 09 December 2009
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alpicus Quote  Post ReplyReply Direct Link To This Post Topic: CommandBars 13.2.1
    Posted: 11 December 2009 at 6:17am

Hi,

I'm using Visual Objects 2.8 (www.cavo.com). I've created a MDI window with CommandBars and configure one of the button (controlpopup) as XTP_ID_WINDOWLIST to list the child windows but when I display a child window, it's not displayed in the controlpopup button, there is just a blank square under the button like when there is no item under a popup !?!?

Below the code :
DEFINE XTP_ID_WINDOWLIST := 35000

oSwitch := oGroupDisFolders:Add(xtpControlPopup, 99999, "Switch", FALSE, FALSE)

oSwitch:CommandBar:Controls:Add(xtpControlButton, XTP_ID_WINDOWLIST, "Item 1", FALSE, FALSE)

Do you have any idea ?

Thanks and Best Regards,

Phil

Back to Top
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2010 at 7:23am
You should use a "special control" for Window list.
This is a sample code for Ribbon, but should be work with normal commandbar, also:
 
Dim ControlPopup As CommandBarPopup 
Dim GroupWindow1 As RibbonGroup 
Public Const ID_GROUP_WINDOW = 136
Public Const ID_WINDOW_SWITCH = 143
 
Set GroupWindow1 = TABHome.Groups.AddGroup("Window", ID_GROUP_WINDOW)
Set ControlPopup = GroupWindow1.Add(XtremeCommandBars.XTPControlType.xtpControlPopup, ID_WINDOW_SWITCH, "Switch window", False, False)
ControlPopup.CommandBar.Controls.Add XtremeCommandBars.XTPControlType.xtpControlButton, XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST, "Item 1", False, False

 
HTH
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
Alpicus View Drop Down
Groupie
Groupie


Joined: 09 December 2009
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alpicus Quote  Post ReplyReply Direct Link To This Post Posted: 07 February 2010 at 8:06am
Hi Gibra,
 
It's exactly what I did but no item is displayed in the popup control. What are the conditions for CommandBars to recognize the MDI child windows ? Which style must they own ?
 
Thanks for ur replies,
Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows Vista SP2 (32bit)
Language: Visual Objects 2.8
Back to Top
gibra View Drop Down
Senior Member
Senior Member


Joined: 31 October 2008
Location: Italy
Status: Offline
Points: 288
Post Options Post Options   Thanks (0) Thanks(0)   Quote gibra Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2010 at 7:34am
Are you sure to use the correct code?
 
The Window List control must be this:
XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST
 
I don't know if work if you doesn't specific the XTPCommandBarsSpecialCommands...
 
Show modified code you use now.
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8
Back to Top
Alpicus View Drop Down
Groupie
Groupie


Joined: 09 December 2009
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote Alpicus Quote  Post ReplyReply Direct Link To This Post Posted: 09 February 2010 at 7:49am
Hi Gibra,
 
XTP_ID_WINDOWLIST is a constant representing an Int (in this case 35000) and depending on the language, you have to use the full path like in VB "XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_WINDOWLIST" or simply the constant itself without the whole path "XTP_ID_WINDOWLIST"
 
As an example I use also "XTP_ID_RIBBONCUSTOMIZE" (Int : 9607) without the full path and it working great.
 
You can find this by following the reference of the constant. Here is the code in C# :

using System;

using System.Runtime.InteropServices;

namespace XtremeCommandBars

{

[Guid("ABDCCDFF-A6AC-46F6-A791-69522EC9F482")]

public enum XTPCommandBarsSpecialCommands

{

XTP_ID_CUSTOMIZE_ADDORREMOVE = 9122,

XTP_ID_CUSTOMIZE_RESET = 9123,

XTP_ID_TOOLBAR_EXPAND = 9148,

XTP_ID_TOOLBAR_HIDE = 9149,

XTP_ID_WORKSPACE_CANCEL = 9159,

XTP_ID_RIBBONCONTROLTAB = 9604,

XTP_ID_RIBBONCUSTOMIZE = 9607,

XTP_ID_WINDOWLIST = 35000,

XTP_ID_CUSTOMIZE = 35001,

XTP_ID_WORKSPACE_ACTIONS = 35002,

XTP_ID_FILE_MRU = 35003,

XTP_ID_TOOLBARLIST = 59392,

}

}

 

I wonder if my problem is more about how the CommandBars recognize a child window so it can list it in the CommandBarPopup. If a member of the development team can confirm this, it will be great...

Product: Xtreme SuitePro (ActiveX) version 13.2.1
Platform: Windows Vista SP2 (32bit)
Language: Visual Objects 2.8
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.156 seconds.