I have a function that shows a bigger image in a window. With the older libs (date 23-03-2018) it worked fine when I use the next code:
- Code: Select all Expand view
FUNCTION RK_FotoGroot(cFoto)
*to show a big picture
LOCAL oWndFoto, oBtnZoom
LOCAL oFoto
LOCAL nWidth := 0
LOCAL nHeight := 0
LOCAL nFotoWidth
LOCAL nFotoHeight
DEFINE DIALOG oWndFoto TITLE 'grote foto' ;
FROM 0, 0 TO 800, 800
@ 40, 10 IMAGE oFoto FILENAME cFoto OF oWndFoto SIZE 1000, 1000
nFotoWidth := oFoto:GetWidth()
nFotoHeight := oFoto:GetHeight()
oFoto:SetSize( nFotoWidth, nFotoHeight )
oFoto:SetScaling( 1 )
oWndFoto:SetSize( nFotoWidth + 20, nFotoHeight + 40 )
@ 10, 10 BUTTON oBtnZoom PROMPT 'Ok' OF oWndFoto ACTION oWndFoto:End()
oBtnZoom:SetPos( 5, oWndFoto:nWidth / 2 - oBtnZoom:nWidth / 2 )
ACTIVATE DIALOG oWndFoto
RETURN NIL
That gives the next result:
With the newest lib this gives another result:
If I look in the source of Windows.prg there si something strnage too?
- Code: Select all Expand view
METHOD ChangeSize(nNewHeight, nNewWidth) INLINE WinSizeChange(::hWnd, nNewHeight, nNewWidth )
METHOD SetSize( nWidth, nHeight ) INLINE WinSetSize( ::hWnd, nWidth, nHeight )
METHOD SetSizeChange(nNewHeight, nNewWidth ) INLINE WinSetSizeChange(::hWnd, nNewHeight, nNewWidth )
As you can see METHOD ChangeSize and SetSize first have Height and than Width, While SetSize works with Width and than Height.
Is this as it is ment to be?