2 button appears in my get. How do I get rid/hide the small one? I already tried placing btnget.ch before and after fivewin.ch but it didn't help
TIA
function AutoResize(nTop,nLeft, oDlg, oFold)
local i,nRatioX,nRatioY, nLen := len(oDlg:aControls), oCtrl, aRect
local cClass, aRes_
default nTop := 0
default nLeft := 0
aRes_ := ClosestRes(GetSysMetrics(SM_CYSCREEN))
nRatioX := aRes_[1]/800 //GetSysmetrics(0)
if nRatioX <= 1
//<=800*600, not needed
return nil
end
nRatioY := aRes_[2]/600 //GetSysmetrics(1)
for i := 1 to nLen
oCtrl = oDlg:aControls[i]
cClass := oCtrl:classname()
aRect = GetCoors( oCtrl:hWnd )
if cClass == "TCOMBOBOX"
oCtrl:Move( aRect[1]*nRatioX, aRect[2]*nRatioY)
elseif cClass $ "TWBROSE,TCBROWSE,TSBROWSE"
aeval(oCtrl:aColSizes, {|val, pos| oCtrl:aColSizes[pos] *= nRatioX })
oCtrl:Move( aRect[1]*nRatioX, aRect[2]*nRatioY, (aRect[4] - aRect[2])*nRatioX, (aRect[3] - aRect[1])*nRatioY, .t. )
else
oCtrl:Move( aRect[1]*nRatioX, aRect[2]*nRatioY, (aRect[4] - aRect[2])*nRatioX, (aRect[3] - aRect[1])*nRatioY, .t. )
if cClass == "TFOLDER"
aeval(oCtrl:aDialogs, {|oTDlg| Autoresize(oCtrl:nFdHeight-1,1, oTDlg, oCtrl)})
endif
endif
next
aRect = GetWndRect( oDlg:hWnd )
oDlg:Move( nTop,nLeft,oDlg:nWidth*nRatioX, oDlg:nHeight*nRatioY, .T. )
if !empty(oFold)
oDlg:SetSize(oFold:nWidth()-5, oFold:nHeight()-oFold:nFdHeight-4)
endif
if oDlg:lCentered
WndCenter( oDlg:hWnd )
else
if Empty( oDlg:cResName )
oDlg:Move( oDlg:nTop, oDlg:nLeft )
endif
endif
return nil
//-----------------------------------------------------------------------------------------
function ClosestRes(nHgt)
// find a value that can maintain the ratio 800:600 (4:3), so the screen
// won't look too odd on a widescreen monitor
local x, nWid
do while nHgt % 3 != 0
nHgt--
enddo
x := nHgt/3
nWid := x*4
return {nWid, nHgt}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 100 guests