Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbon Control and Progress OpenEdge 10.1A
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Control and Progress OpenEdge 10.1A

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


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Control and Progress OpenEdge 10.1A
    Posted: 18 November 2008 at 3:47am
Dear Support Team,
i try to get a RibbonBar with yout CommandBar OCX with Progress Open Edge 10.1A. Everything seems to work (I have to use the commandbarframe control) only the TitleBar does not change like in the example with Visual Basic (No extra Buttons like Min/Max/Close in Vista Style). Is there a possibility to kind of Bind the OCX to the Progress window so that it will hide the Standard (e.g. WindowsXP) and show the Vista Style Buttons. Can anyone Help ?
Kind Regards.
Normen Teuber 
Back to Top
rdhaan View Drop Down
Newbie
Newbie
Avatar

Joined: 11 December 2008
Location: Netherlands
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhaan Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2008 at 7:12am
Hi Normen,
 
Progress/Openedge create another Window in the 'Windows window'.
So, you will have to ask the parent of your Progress window for its handle:
 
RUN GetParent( win_Main:HWND, OUTPUT i_hWnd ).
ch_TBar:EnableOffice2007FrameHandle( i_hWnd ).
ch_TBar:EnableOffice2007Frame( TRUE ).
 
Then it works...
 
Rene.
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2008 at 8:29am
Hi,
thanks i tried this already with the Skins and it works but only with poor performance....
Sorry but it doesn't work because EnableOffice2007FrameHandle is not available for the commandbarframe control i use or is there a trick ?
Thanks for this hint.
KdRgds.
Normen
Back to Top
adwild2 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2008
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote adwild2 Quote  Post ReplyReply Direct Link To This Post Posted: 17 December 2008 at 7:22am

The solution above misses the GetParent procedure:

PROCEDURE GetParent EXTERNAL "user32.dll" :
    DEFINE INPUT    PARAMETER ch_Window AS LONG.
    DEFINE RETURN  PARAMETER ch_Parent AS LONG.
END PROCEDURE.
 
This will change the title bar style to the Office2007 theme.
 
But it still will NOT solve the initial problem. Because the Ribbonbar is placed in the 'Progress window' instead of the 'MS Windows window' the method EnableFrameTheme() tries to remove the titlebar from the incorrect window. The result is that the ribbonbar doesn't show the window title, the window buttons (minimize, maximize, close), and dragging the Ribbonbar moves the Progress window INSIDE the MS Windows-window.
 
To be able to use the Ribbonbar in a Progress application there should be a way to place the Ribbonbar in the Progress window, but bind it to a different window handle eg. with a property.
 
My question to the support team is if there already is a solution to this problem or if there is going to be.
 
Kind regards,
Arie
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A
Back to Top
adwild2 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2008
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote adwild2 Quote  Post ReplyReply Direct Link To This Post Posted: 06 January 2009 at 7:22am
Here an example of the problem when the ribbonbar is attached to the "Progress window". The window still contains a titlebar (which should be removed when using a ribbon) and when dragging the ribbon the "Progress window" inside the "Windows window" is moved which result in the following situation: 
 
If the ribbonbar is attached to the "Windows window" the titlebar is correctly removed. But then the "Progress window" is drawn over the ribbon so it isn't visible anymore:
 
 
How should the Codejock Ribbonbar be used in an OpenEdge Progress environment?
 
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2009 at 1:06pm

Do you use the CommandBarsFrame Control or the CommanBars ?

(I did not manage to get the ControlBars working only the ComandBarsFrame)
Rgds
Normen
 
Back to Top
adwild2 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2008
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote adwild2 Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2009 at 3:22am
I managed to add the Ribbonbar to a Progress window. I do this by attaching the Ribbon to the Windows-window and moving the Progress-window 142 pixels down using the SetWindowPos API. Here an example, I hope this will fix it for you too :
 

/* SetWindowPos() Constans */
&GLOBAL-DEFINE SWP_NOSIZE     1
&GLOBAL-DEFINE SWP_NOMOVE     2
&GLOBAL-DEFINE SWP_NOZORDER   4
  
PROCEDURE AddRibbonBar :
DEFINE       VARIABLE  i_hWnd             AS INTEGER      NO-UNDO.
   RUN GetParent( h_Window:HWND, OUTPUT i_hWnd ). /* Get Windows-window */
  /* Move Progress-window 142 pixels down (= height of Ribbonbar) */
   RUN SetWindowPos( h_Window:HWND, 0, 0, 142, 0, 0, {&SWP_NOSIZE} + {&SWP_NOZORDER}, OUTPUT ig_Tmp).
  
   ch_CommandBars:AttachToWindow( i_hWnd ).
   ch_RibbonBar:EnableFrameTheme().
  
END PROCEDURE.
 
PROCEDURE GetParent EXTERNAL "user32.dll" :
   DEFINE INPUT   PARAMETER ch_Window AS LONG.
   DEFINE RETURN  PARAMETER ch_Parent AS LONG.
END PROCEDURE.

PROCEDURE SetWindowPos EXTERNAL "user32.dll" :
   DEFINE INPUT  PARAMETER hwnd            AS LONG.
   DEFINE INPUT  PARAMETER hwndInsertAfter AS LONG.
   DEFINE INPUT  PARAMETER x               AS LONG.
   DEFINE INPUT  PARAMETER y               AS LONG.
   DEFINE INPUT  PARAMETER cx              AS LONG.
   DEFINE INPUT  PARAMETER cy              AS LONG.
   DEFINE INPUT  PARAMETER fuFlags         AS LONG.
   DEFINE RETURN PARAMETER ReturnValue     AS LONG.
END PROCEDURE.
 
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2009 at 5:40am
That doesn't work for me (OpenEdge 10.1A?) with 10.1A i have to youse the CommandBarsFrame control not the CommandBars contrrol. I tried everything but only recieve a "white stripe". Does anybody get things going with the CommandBars control not withe the CommandBarsFrame control ? (I think there might bei a difference )
 
Normen
Back to Top
rdhaan View Drop Down
Newbie
Newbie
Avatar

Joined: 11 December 2008
Location: Netherlands
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhaan Quote  Post ReplyReply Direct Link To This Post Posted: 25 February 2009 at 9:14am
Normen,
 
We use the CommandBars, not the CommandBarsFrame.
With a CONTROL-FRAME of 1 by 1 pixels and then using the AttachToWindow function is docks to the Windows window.
This works for the RibbonBar and also the CommandBar used as a Toolbar (wit then lowering the Progress windows 26 pixels).
 
Even when using the statusbar, is still works.
The only weird thing we had was that the Close and Maximize buttons didn't work with the SkinFrameWork
(before we docked the Toolbars to the 'Progress' window).
But after moving it to the Windows window the buttons work.
 
 
      CREATE CONTROL-FRAME ocx_Toolbar
      ASSIGN FRAME        = h_Frame
             ROW          = 1
             COLUMN       = 1
             HEIGHT       = 1
             WIDTH        = 1
             HIDDEN       = TRUE
             SENSITIVE    = TRUE.
      ASSIGN ocx_Toolbar:NAME = "ocx_Toolbar":U.

   ASSIGN cg_Tmp = SEARCH( "s-tbar10.wrx":U ).
   IF cg_Tmp = ? THEN
      RETURN "ERROR":U.
   ASSIGN chocx_Toolbar = ocx_Toolbar:COM-HANDLE
          lg_Tmp        = chocx_Toolbar:LoadControls(cg_Tmp,"ocx_CommandBars":U)
          NO-ERROR.
   ASSIGN ch_TBar = chocx_Toolbar:CommandBars NO-ERROR.
   IF l_Ribbon THEN
      RUN SetWindowPos( h_Window:HWND, 0, 0, 142, 0, 0, {&SWP_NOSIZE} + {&SWP_NOZORDER}, OUTPUT ig_Tmp).
   OR
      RUN SetWindowPos( h_Window:HWND, 0, 0, 26, 0, 0, {&SWP_NOSIZE} + {&SWP_NOZORDER}, OUTPUT ig_Tmp).
   ch_TBar:AttachToWindow( i_hWnd ).
 
 
This is all in Progress 10.2A (but in 10.1A it should work as well).
Product: Xtreme SuitePro (ActiveX) version 16.2.4.
Testing v18.0.060117

Platform: Windows 10 x64
Language: Progress OpenEdge 11.7 x64
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 3:06am
Hi rdhaan,
everything is fine - but, the ribbon is not visible...uploads/20090226_030353_sample.zip
I attached a small sample - where you can see what i mean. (hope so)
The Main code is in the Proecedure programminit.
Or do you have a working small exaple ? (it should contain the LoadDesignerBars method)
 
Regars
Normen
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 3:56am
Hi,
Try to increase size of form.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 4:04am

I have already tried to increase the size of the form, but it has no result.

(i added a screen, where you can see the results)
Back to Top
adwild2 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2008
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote adwild2 Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 4:31am
Changed your code a bit (the procedure "programminit"), and now it works for me. The ribbonbar is now created AFTER it is attached to the window. I disabled the xcb file from the commandbars designer because for some reason it removes the minimize, maximize and close buttons on the ribbon. I you want to use a status bar you also should decrease the height of the progress window. In the code there is a comment which describes this. If this code doesn't work for you there is probably something wrong with your .wrx file.
 

DEFINE VARIABLE   chPane AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE   ig_Tmp AS INTEGER    NO-UNDO.
DEFINE VARIABLE   cg_Tmp AS CHARACTER  NO-UNDO.
DEFINE VARIABLE   lg_Tmp AS LOGICAL    NO-UNDO.
DEFINE VARIABLE   i_hWnd AS INTEGER    NO-UNDO.
DEFINE VARIABLE   hFrame AS HANDLE     NO-UNDO.

ASSIGN hFrame = FRAME default-frame:HANDLE.
CREATE CONTROL-FRAME ocx_Toolbar
ASSIGN      FRAME        = hFrame
             ROW          = 1
             COLUMN       = 1
             HEIGHT       = 1
             WIDTH        = 1
             HIDDEN       = TRUE
             SENSITIVE    = TRUE.
ASSIGN ocx_Toolbar:NAME = "ocx_Toolbar":U
       cg_Tmp           = SEARCH( "ocx_toolbar.wrx":U )
       chocx_Toolbar    = ocx_Toolbar:COM-HANDLE
       lg_Tmp           = chocx_Toolbar:LoadControls(cg_Tmp,"ocx_CommandBars":U)
       ch_TBar          = chocx_Toolbar:CommandBars.

RUN GetParent( c-win:HWND, OUTPUT i_hWnd ). /* Get Windows-window */
RUN SetWindowPos( c-win:HWND, 0, 0, 142, 0, 0, {&SWP_NOSIZE} + {&SWP_NOZORDER}, OUTPUT ig_Tmp).
/*
To make the statusbar visible you also have to resize the Progress window.
Then you should remove {&SWP_NOSIZE} and give a width and height in the
5th and 6th argument of SetWindowPos.
*/
ch_TBar:AttachToWindow( i_hWnd ).

ASSIGN RibbonBar = ch_TBar:AddRibbonBar("RibbonBar")
       chpane    = RibbonBar:AddSystemButton().

/* ch_TBar:LoadDesignerBars("test_form.xcb" ). /* if enabled it removes the windows buttons (?) */ */
ASSIGN RibbonBar:ShowQuickAccess = FALSE.
       chStatusbar               = ch_TBar:StatusBar.
       chpane                    = chStatusBar:AddPane(0).

RibbonBar:EnableFrameTheme().

Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2009 at 10:28am
Hi,
maybe i am to inexperienced. Everything works fine (loadDesignBars works fine ?!) but the Statusbar is not working.
Can you send me a example code for this ? (resize the window doesn't work)
KdRgds.
Normen
 
 
Back to Top
adwild2 View Drop Down
Groupie
Groupie
Avatar

Joined: 17 December 2008
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote adwild2 Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 3:12am
I see the above code is not working with a statusbar. This is because progress tries to resize the progress window to the size of the windows window. You have to overrule this in the resize event of the commandbars.
 
First an updated version of the code i wrote you first. This will correctly set the statusbar.
 

 
DEFINE VARIABLE   chPane AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE   ig_Tmp AS INTEGER    NO-UNDO.
DEFINE VARIABLE   cg_Tmp AS CHARACTER  NO-UNDO.
DEFINE VARIABLE   lg_Tmp AS LOGICAL    NO-UNDO.
DEFINE VARIABLE   i_hWnd AS INTEGER    NO-UNDO.
DEFINE VARIABLE   hFrame AS HANDLE     NO-UNDO.

ASSIGN hFrame = FRAME default-frame:HANDLE.
CREATE CONTROL-FRAME ocx_Toolbar
ASSIGN      FRAME        = hFrame
            ROW          = 1
            COLUMN       = 1
            HEIGHT       = 1
            WIDTH        = 1
            HIDDEN       = TRUE
            SENSITIVE    = TRUE.
ASSIGN ocx_Toolbar:NAME = "ocx_Toolbar":U
       cg_Tmp           = SEARCH( "ocx_toolbar.wrx":U )
       chocx_Toolbar    = ocx_Toolbar:COM-HANDLE
       lg_Tmp           = chocx_Toolbar:LoadControls(cg_Tmp,"ocx_CommandBars":U)
       ch_TBar          = chocx_Toolbar:CommandBars.
      
RUN GetParent( c-win:HWND, OUTPUT i_hWnd ). /* Get Windows-window */
RUN SetWindowPos( c-win:HWND, 0, 0, 142, 0, 0, {&SWP_NOSIZE} + {&SWP_NOZORDER}, OUTPUT ig_Tmp).
ch_TBar:AttachToWindow( i_hWnd ).

/* Create ribbonbar */
ASSIGN RibbonBar                 = ch_TBar:AddRibbonBar("RibbonBar")
       chpane                    = RibbonBar:AddSystemButton()
       RibbonBar:ShowQuickAccess = FALSE.
      
ch_TBar:LoadDesignerBars("test_form.xcb" ).


/* Set statusbar */
ASSIGN chStatusbar                      = ch_TBar:StatusBar
       chStatusbar:Visible              = TRUE
       chpane                           = chStatusBar:AddPane(1)
       chpane:TEXT                      = "Hello world":U.

chStatusbar:SetPaneStyle( 1, 134217728).    /* Stretchable */
chStatusbar:AddPane( 59137 ). /* CAPS */
chStatusbar:AddPane( 59138 ). /* NUM  */

/* Enable theme */
RibbonBar:EnableFrameTheme().

 
 
Now you have to add a procedure for the commanbars resize event:
 

 
PROCEDURE ocx_Toolbar.CommandBars.Resize :
DEFINE VARIABLE   i_Tmp AS INTEGER    NO-UNDO.
/*
142 = height of ribbon
22  = height of statusbar
*/
RUN SetWindowPos( c-win:HWND, 0, 0, 0, c-win:WIDTH-PIXELS, c-win:HEIGHT-PIXELS - 142 - 22, {&SWP_NOMOVE} + {&SWP_NOZORDER}, OUTPUT i_Tmp).
 
END PROCEDURE.
 
 
Good luck.
Grtz Arie
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A
Back to Top
NormenT View Drop Down
Groupie
Groupie


Joined: 12 November 2008
Location: Germany
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote NormenT Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2009 at 12:06pm
Hi Arie,
thanks for your help.
Do you have a skype or messenger Account where i can contact you ? (i hope it is allowed to ask for)
I git some little very progress - specific Question maybe you can help ?
(Skype: Normen_T)
KdRgds and a nice Weekend
Normen
 
Product: Xtreme SuitePro ActiveX v12.1.0
Language: Progress OpenEdge 10.1A & 10.2A
Platform: Windows XP (32 Bit) - SP 3
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.