FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour dialog resizable
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
dialog resizable
Posted: Tue Jul 02, 2019 10:00 AM
I wish have a dialog resizable but without "X" close button
the user must clode the dialog from button



How I must make ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 07:03 AM
Silvio,

it is possible.
What do You want to show inside the dialog ( resized )



resized :-)
( only image, text centered )



regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 08:41 AM

thank wich is the command ?
it's possible also on Window ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 08:47 AM
Silvio,

a function is needed because it is to special
It is a extended / modified solution from a Antonio-sample.
Working with dialog or windows works the same.
The dialog just needed to be defined as window with no other changes



Still I don't know what You want to show :-)

regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 09:17 AM

Uwe,
on Window I tried with
DEFINE WINDOW ::oWnd BRUSH obrush STYLE WS_POPUP
and the user must click on a button to exit from ::oWnd
but I cannot show the caption and menu pulldown ( no good)

on DIALOG it is different because I need to have

DEFINE DIALOG oDlg TITLE aTitle[nMode] SIZE 1120,650 ;
PIXEL TRUEPIXEL RESIZABLE FONT oFont

but I not want the "X" because the user could press it and then the procedure not save any data

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 09:27 AM
Silvio,

I remember a function < DisableX >
( tested and works )



Code (fw): Select all Collapse
#define MF_BYPOSITION       1024 
#define MF_DISABLED         2

....
ACTIVATE DIALOG oDlg CENTER ;
ON INIT DisableX( oDlg, .T. )
....

// FUNCTION DisableX(oWin, lDisable) - To Disable 'X' Button of a Dialog   

FUNCTION DisableX(oWin, lDisable)
LOCAL hMenu  := 0
LOCAL nCount := 0

DEFAULT lDisable := .T.

IF lDisable
     hMenu  = GetSystemMenu(oWin:hWnd, .F.)
     nCount = GetMItemCount(hMenu)
     IF oWin:ClassName() = "TDIALOG"
          RemoveMenu(hMenu, 1, nOR( MF_BYPOSITION, MF_DISABLED) )
     ELSE
          RemoveMenu(hMenu, nCount - 1, nOR( MF_BYPOSITION, MF_DISABLED) )   // Close Button
     ENDIF
     DrawMenuBar( oWin:hWnd )
ELSE
     GetSystemMenu( oWin:hWnd, .T. )
     DrawMenuBar( oWin:hWnd )
ENDIF
IF oWin:bValid = nil
     oWin:bValid := (.F.)
ENDIF

RETURN nil


regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 11:22 AM

here not work perhaps I wrong something
do you use a particular set of the dialog ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: dialog resizable
Posted: Wed Jul 03, 2019 11:35 AM

this run Perfectly

procedure DisableX2(ODLG)
local hMenu
hMenu := GetSystemMenu(oDlg:hWnd,.f.)
RemoveMenu( hMenu, 6, MF_BYPOSITION)
return

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion