impedir que una Window sea redimensionada

impedir que una Window sea redimensionada

Postby lucasdebeltran » Thu Feb 02, 2012 10:04 pm

¿Es posible?.

Gracias.
Last edited by lucasdebeltran on Fri Feb 03, 2012 12:42 pm, edited 2 times in total.
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: impedir que una Window sea redimensionada

Postby Willi Quintana » Fri Feb 03, 2012 1:08 am

Hola...
Prueba asi
Salu2

Code: Select all  Expand view

DEFINE WINDOW oWndA MDICHILD FROM 0,0 to 2,2 OF oWnd TITLE cTitle ICON "SVITE"
DEFINE DIALOG oDlg RESOURCE "UTILIDADES" OF oWndA
...
..
.
..
...
ACTIVATE DIALOG oDlg CENTER NOWAIT ;
                ON INIT ( oDlg:Move( 0, 0 ) ) ;
                VALID  (oWndA:End(), lSalir )
                oWndA:bGotFocus  = { || oDlg:SetFocus() }
ACTIVATE WINDOW oWndA ;
         ON INIT (oWndA:Move(0,0), oWndA:SetSize( oDlg:nWidth, oDlg:nHeight ) ) ;  
         ON RESIZE (oWndA:SetSize( oDlg:nWidth, oDlg:nHeight ) ) ;
         VALID (lSalir)
 
User avatar
Willi Quintana
 
Posts: 1019
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú

Re: impedir que una Window sea redimensionada

Postby carlos vargas » Fri Feb 03, 2012 4:35 am

please look data aMinMaxInfo An array holding the minmax info of the window
in twindows
Code: Select all  Expand view
// How to control authorized position, size and tracking dimensions
// Try to resize or maximize this window and see what happens!

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local oWnd

   DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
      TITLE "Welcome to FiveWin" ;
      COLOR "W+/B"

   @ 2, 2 SAY "Resize me" OF oWnd SIZE 100, 20

   oWnd:aMinMaxInfo = { 200, 200,;  // xMaxSize,      yMaxSize
                         50,  50,;  // xMaxPosition,  yMaxPosition
                         80,  80,;  // xMinTrackSize, yMinTrackSize
                        150, 150 }  // xMaxTrackSize, yMaxTrackSize

   ACTIVATE WINDOW oWnd MAXIMIZED

return nil
 
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1719
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: impedir que una Window sea redimensionada

Postby colthop » Fri Feb 03, 2012 6:14 am

Hola Lucas:

Yo las creo asi y no se pueen diemnsiona y tampoco sale si pulsas escape¨:

Code: Select all  Expand view
DEFINE WINDOW oDlgwVen OF oVentPrinc MDICHILD PIXEL FROM 0,0 TO 200,400 COLORS escri01, fondo01  STYLE nOr(WS_DLGFRAME)
  SET FONT OF oDlgwVen TO oFont
ACTIVATE WINDOW oDlgwVen NORMAL VALID (if (GetKeyState (VK_ESCAPE), .F.,oDlgwVen:End()))


Un saludo

Carlos
Colt Hop ED, S.L.
Carlos Blas Fernández Domínguez
Tlfo: 645847093
E-Mail: carlos@colthop.es

Nunca se termina de aprender, por eso necesito siempre ayuda.
colthop
 
Posts: 505
Joined: Sat Apr 22, 2006 9:09 am
Location: Madrid - España

Re: impedir que una Window sea redimensionada

Postby lucasdebeltran » Fri Feb 03, 2012 12:41 pm

Muchas gracias a todos.

Al final lo solventé con STYLE nOr(WS_DLGFRAME)

Pongo aquí los distintos estilos por si ayuda a otros:

Code: Select all  Expand view

WS_BORDER   Creates a window that has a border.
 

WS_CAPTION   Creates a window that has a title bar (implies the WS_BORDER style). Cannot be used with the WS_DLGFRAME style.
 

WS_CHILD   Creates a child window. Cannot be used with the WS_POPUP style.
 

WS_CHILDWINDOW   Same as the WS_CHILD style.


WS_CLIPCHILDREN   Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
 

WS_CLIPSIBLINGS   Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style only.
 

WS_DISABLED   Creates a window that is initially disabled.
 

WS_DLGFRAME   Creates a window with a double border but no title.
 

WS_GROUP   Specifies the first control of a group of controls in which the user can move from one control to the next with the arrow keys. All controls defined with the WS_GROUP style FALSE after the first control belong to the same group. The next control with the WS_GROUP style starts the next group (that is, one group ends where the next begins).
 

WS_HSCROLL   Creates a window that has a horizontal scroll bar.
 

WS_ICONIC   Creates a window that is initially minimized. Same as the WS_MINIMIZE style.


WS_MAXIMIZE   Creates a window of maximum size.
 

WS_MAXIMIZEBOX   Creates a window that has a Maximize button.
 

WS_MINIMIZE   Creates a window that is initially minimized. For use with the WS_OVERLAPPED style only.
 

WS_MINIMIZEBOX   Creates a window that has a Minimize button.
 

WS_OVERLAPPED   Creates an overlapped window. An overlapped window usually has a caption and a border.
 

WS_OVERLAPPEDWINDOW   Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles.
 

WS_POPUP   Creates a pop-up window. Cannot be used with the WS_CHILD style.
 

WS_POPUPWINDOW   Creates a pop-up window with the WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION style must be combined with the WS_POPUPWINDOW style to make the Control menu visible.
 

WS_SIZEBOX   Creates a window that has a sizing border. Same as the WS_THICKFRAME style.


WS_SYSMENU   Creates a window that has a Control-menu box in its title bar. Used only for windows with title bars.
 

WS_TABSTOP   Specifies one of any number of controls through which the user can move by using the TAB key. The TAB key moves the user to the next control specified by the WS_TABSTOP style.
 

WS_THICKFRAME   Creates a window with a thick frame that can be used to size the window.
 

WS_TILED   Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style.
 

WS_TILEDWINDOW   Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style.


WS_VISIBLE   Creates a window that is initially visible.
 

WS_VSCROLL   Creates a window that has a vertical scroll bar.

 
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 67 guests

cron