dialog resizable

dialog resizable

Postby Silvio.Falconi » 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

Image

How I must make ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Postby ukoenig » Wed Jul 03, 2019 7:03 am

Silvio,

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

Image

resized :!:
( only image, text centered )

Image

regards
Uwe :?:
Last edited by ukoenig on Wed Jul 03, 2019 9:15 am, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: dialog resizable

Postby Silvio.Falconi » Wed Jul 03, 2019 8: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Postby ukoenig » Wed Jul 03, 2019 8: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

Image

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

regards
Uwe :D
Last edited by ukoenig on Wed Jul 03, 2019 9:53 am, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: dialog resizable

Postby Silvio.Falconi » Wed Jul 03, 2019 9: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
Last edited by Silvio.Falconi on Wed Jul 03, 2019 9:48 am, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Postby ukoenig » Wed Jul 03, 2019 9:27 am

Silvio,

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

Image

Code: Select all  Expand view

#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 :D
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: dialog resizable

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7043
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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