Antonio Linares wrote:Manuel,
No creo que sea buena idea redimensionar el listview puesto que las mini páginas no pueden redimensionarse (son bitmaps pertenecientes a un ImageList -salvo que este admita redimensionamiento) por lo que habria que volver a crearlas todas nuevamente en cada redimensión...
preferible mantener su ancho y evitar esperas ó parpadeos
Antonio Linares wrote:Te agradezco si me proporcionas un ejemplo de lo que comentas de las MDI, gracias
// Working with MDI enviroments
#include "FiveWin.ch"
#include "xbrowse.ch"
REQUEST DBFCDX
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oWndEdit, oBar, oIcon, oImage
local cName := "FiveWin power"
USE Clientes NEW SHARED VIA "DBFCDX"
DEFINE ICON oIcon RESOURCE "test"
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 TITLE "I am the MDI Frame" ;
MDI ;
ICON oIcon
SET MESSAGE OF oWnd TO "Main Window"
DEFINE BUTTONBAR oBar 2007 OF ownd
DEFINE BUTTON OF oBar GROUP ;
PROMPT "mdi" TOOLTIP "lanzar mdichild" ;
ACTION CreaMdiChild()
DEFINE BUTTON OF oBar GROUP ;
PROMPT "info" TOOLTIP "lanzar msginfo" ;
ACTION Msginfo("hola")
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID MsgYesNo( "Want to End ?" )
return nil
//----------------------------------------------------------------------------//
Function CreaMdiChild()
local oChild, oBrw
DEFINE WINDOW oChild TITLE "Basic Cell selector browse" MDICHILD OF oWnd
DEFINE BUTTONBAR oBar 2007 OF oChild
@ 0,0 XBROWSE oBrw OF oChild ALIAS Alias() AUTOCOLS
oBrw:CreateFromCode()
oBrw:cToolTip = "This is a test"
oChild:oClient := oBrw
oBrw:SetFocus()
RETURN NIL
METHOD Activate() CLASS TPreview
ACTIVATE WINDOW ::oWnd MAXIMIZED ;
ON RESIZE ( ::PaintMeta() , ::ChangeListView() )
......
METHOD ChangeListView() CLASS TPreview
local oRect := ::oWnd:GetCliRect()
local nHeight := oRect:nHeight
::oLvw:nHeight := nHeight - If( ::oWnd:oBar != nil, ::oWnd:oBar:nHeight() - 2,;
::oWnd:oTop:nHeight() ) - ;
If( ::oWnd:oMsgBar != nil, ::oWnd:oMsgBar:nHeight(),;
::oWnd:oBottom:nHeight() )
::oLvw:refresh()
Return nil
LRESULT WINAPI _WndFrameProc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
return DefFrameProc( hWnd, GetWindow( hWnd, GW_CHILD ), wMsg, wParam, lParam );
}
LRESULT WINAPI _WndFrameProc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
HWND hWndClient = GetWindow( hWnd, GW_CHILD );
char szName[ 20 ];
GetClassName( hWndClient, szName, 19 );
while( hWndClient && strcmp( szName, "MDICLIENT" ) != 0 )
{
hWndClient = GetWindow( hWndClient, GW_HWNDNEXT );
GetClassName( hWndClient, szName, 19 );
}
return DefFrameProc( hWnd, hWndClient, wMsg, wParam, lParam );
}
LRESULT WINAPI _WndFrameProc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
if( wMsg == WM_SETFOCUS )
return DefFrameProc( hWnd, GetWindow( hWnd, GW_CHILD ), wMsg, wParam, lParam );
else
return DefFrameProc( hWnd, NULL, wMsg, wParam, lParam );
}
LRESULT WINAPI _WndFrameProc( HWND hWnd, UINT wMsg, WPARAM wParam, LPARAM lParam )
{
return DefFrameProc( hWnd, GetWindow( hWnd, GW_CHILD ), wMsg, wParam, lParam );
}
METHOD Command( nWParam, nLParam ) CLASS TMdiFrame
local lToolBar := ( GetClassName( nLParam ) == "ToolbarWindow32" )
if ::oWndActive != nil
do case
case nWParam == 61472
::oWndActive:Minimize()
case nWParam == 61728
::oWndActive:Restore()
case nWParam == 61536
::oWndActive:End()
endcase
endif
do case
case ! lToolBar .and. nWParam - If( IsExe64(), 1791, 0 ) < 100 // MdiChild Menu Selection
nWParam -= 1791
if nWParam >= 1 .and. nWParam <= Len( ::oWndClient:aWnd )
::oWndClient:aWnd[ nWParam ]:SetFocus()
endif
otherwise
::Super:Command( nWParam, nLParam )
endcase
return 0
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 66 guests