Hi,
There is a window (TWindow) in the style (WS_BORDER, WS_MINIMIZEBOX, WS_SYSMENU), I need to prohibit moving the window borders with the mouse (resizing the window). How to do it ?
Resizing the window
- cmsoft
- Posts: 1297
- Joined: Wed Nov 16, 2005 9:14 pm
- Location: Mercedes - Bs As. Argentina
- Been thanked: 2 times
Re: Resizing the window
Code: Select all | Expand
#include "Fivewin.ch"
static nW, nH
function Main()
local oWnd
DEFINE WINDOW oWnd TITLE "No resize" ;
NOZOOM FROM 05,05 TO 20,60
nW := oWnd:nWidth
nH := oWnd:nHeight
oWnd:bResized := { || NoResize(oWnd) }
ACTIVATE WINDOW oWnd
static function NoResize(oWnd)
oWnd:SetSize(nW, nH)
oWnd:Refresh()
return nil
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Resizing the window
Please also try:
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oWnd
DEFINE WINDOW oWnd NOZOOM NOMINIMIZE FROM 0,0 TO 400,600 PIXEL
oWnd:aMinMaxInfo := { nil, nil, nil, nil, 600, 400, 600, 400 }
ACTIVATE WINDOW oWnd CENTERED
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Resizing the window
Is it possible to make a TWindow without caption and sysmenu (WS_POPUP) and a frame so that it can be stretched with the mouse ?
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Resizing the window
Code: Select all | Expand
DEFINE WINDOW oWnd STYLE WS_THICKFRAME FROM 0,0 TO 400,600 PIXEL
oWnd:bRClicked := { || oWnd:End() }
ACTIVATE WINDOW oWnd CENTERED
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: Resizing the window
Yes, the WS_THICKFRAME style is suitable, only the frame turns out to be wide and not beautiful 
