I wish have a dialog resizable but without "X" close button
the user must clode the dialog from button
How I must make ?
#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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 118 guests