Print Page | Close Window

OpenEdge Minimize Restore Close Buttons Disabled

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=15393
Printed Date: 05 June 2024 at 10:32pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OpenEdge Minimize Restore Close Buttons Disabled
Posted By: pberox
Subject: OpenEdge Minimize Restore Close Buttons Disabled
Date Posted: 19 October 2009 at 7:43am
I am using rel 13.1 demo to evaulate the possibilty to have Office 2007 skin in our Progress OpenEdge (9.1e / 10.1c) applications.
 
The Minimize, Restore and Close button are Not active when the skin is applyed to a OpenEdge WINDOW.
the Close button works as expected with OpenEdge DIALOG.
 
I tried :
mySkin:AddWindowClass("ProMainWin","MDIClient").
 
The Minimize/Restore/Close work well but the menu is not displayed.
 
I tried also all the possible combination of  MySkin:ApplyOptions
the only working is MySkin:ApplyOptions = 14 ( xtpSkinApplyColors + xtpSkinApplyFrame + xtpSkinApplyMenu)
the MySkin:ApplyMetrics make strange windows resize.
 
thanks for your help,
Paolo
 
 
 



Replies:
Posted By: adwild2
Date Posted: 10 November 2009 at 7:41am
You should apply the skin to the Windows-window of the OpenEdge-window. The handle to the Windows-window can be retrieved with the GetParent function in user32.dll. To get the windows buttons working you should add a commandbars object to the window (it doesn't have to be visible).

Example:


PROCEDURE initialize-controls :
DEFINE       VARIABLE  ch_Skin           AS COM-HANDLE   NO-UNDO.
DEFINE       VARIABLE  ch_CommandBars    AS COM-HANDLE   NO-UNDO.
DEFINE       VARIABLE  i_hWnd            AS INTEGER      NO-UNDO.
DEFINE       VARIABLE  c_Tmp             AS CHARACTER    NO-UNDO.

   ASSIGN ch_Skin        = chocx_SkinFramework:SkinFramework
          ch_CommandBars = chocx_CommandBars:CommandBars.

   ASSIGN ch_Skin:ApplyOptions = 14.

   RUN GetParent( win_Main:HWND, OUTPUT i_hWnd ).

   ASSIGN c_Tmp = SEARCH( "c:\temp\Office2007.cjstyles":U ).
   ch_Skin:LoadSkin( c_Tmp, "NormalBlack.ini":U ).
   ch_Skin:ApplyWindow( i_hWnd ).

   ch_CommandBars:AttachToWindow( i_hWnd ).

   ASSIGN win_Main:HIDDEN = FALSE.

END PROCEDURE.

PROCEDURE GetParent EXTERNAL "USER32.DLL":
    DEFINE INPUT PARAMETER hwndChild  AS LONG.
   DEFINE RETURN PARAMETER hwndParent AS LONG.
END PROCEDURE.



-------------
Product: Xtreme SuitePro (ActiveX) version 13.0.0
Platform: Windows XP SP3 (32bit)
Language: Progress OpenEdge 10.2A


Posted By: pberox
Date Posted: 10 November 2009 at 7:43am
Thanks for the Help tip, I will try today!!! ;-)
 
Ciao,
Paolo


Posted By: oli.dune
Date Posted: 14 October 2010 at 3:51am
I there,

I tried to add a CommandBars control, the min/max/close buttons are available again, but the window's menubar is still hidden when the :AttachToWindow() method is invoked (although accelerators are still working).

Any advice?
Thanks in advance


-------------
Product: Xtreme SuitePro (ActiveX) version 16.4.0

Platform: Windows 10 (64bit)

Language: OpenEdge 11.7.4


Posted By: oli.dune
Date Posted: 29 November 2010 at 7:21am
Solution is to call :DeleteAll() right after :AttachToWindow().




-------------
Product: Xtreme SuitePro (ActiveX) version 16.4.0

Platform: Windows 10 (64bit)

Language: OpenEdge 11.7.4



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