dialog resizable

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

dialog resizable

Post by Silvio.Falconi »

I wish have a dialog resizable but without "X" close button
the user must clode the dialog from button

Image

How I must make ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: dialog resizable

Post by ukoenig »

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
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Post by Silvio.Falconi »

thank wich is the command ?
it's possible also on Window ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: dialog resizable

Post by ukoenig »

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
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Post by Silvio.Falconi »

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.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: dialog resizable

Post by ukoenig »

Silvio,

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

Image

Code: Select all

#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
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Post by Silvio.Falconi »

here not work perhaps I wrong something
do you use a particular set of the dialog ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: dialog resizable

Post by Silvio.Falconi »

this run Perfectly

procedure DisableX2(ODLG)
local hMenu
hMenu := GetSystemMenu(oDlg:hWnd,.f.)
RemoveMenu( hMenu, 6, MF_BYPOSITION)
return
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply