| |
|
|
Joerg | Hello dear XProfan Gemeinde,
I come not behind, I here wrong make... the Editfeld should itself properly adjust, if the user The Size the Fensters changes. the works too integrally well. After the minimize isr the area though To high. the same happens, if one whom downstairs edge the Fensters To plot to supra zieht. I steh' on the pipeline...
thanks you!! Jörg
(XProfan X3.1/Win10)
declare prog_ende%, wide%, hoehe%, fensterhoehe%, fensterbreite%, m_edit&
fensterbreite% = 800
fensterhoehe% = 600
Window Style 527
Window fensterbreite%, fensterhoehe%
m_edit& = Create("MultiEdit",%hWnd, "", 20, 20, 740, 490)
WhileNot prog_ende%
Waitinput
If (%key = 2)
prog_ende% = 1
ElseIf (%key = 4)
'****************************************************************
wide% = Width(m_edit&,1) - (fensterbreite% - Width(%hWnd,1))
hoehe% = Height(m_edit&,1) - (fensterhoehe% - Height(%hWnd,1))
SetWindowPos m_edit& = 20,20 - wide%,hoehe%
fensterbreite% = Width(%hWnd,1)
fensterhoehe% = Height(%hWnd,1)
'****************************************************************
EndIf
EndWhile
END
|
|
|
| |
|
|
|
Georg Teles | Hmm naja if You The Changes at enhance see want, then empfielt itself a Callback-function - have your code time extended
$H windows.ph
$H Messages.ph
Declare OldWndProc&
'---------------------------------------------------------------------
declare prog_ende%, wide%, hoehe%, fensterhoehe%, fensterbreite%, m_edit&
fensterbreite% = 800
fensterhoehe% = 600
'-CallBack routine----------------------------------------------------
Proc ChangeControl
Parameters hWnd&, Message&, wParam&, lParam&
Declare btnHeight&
If Message& = ~WM_SIZE
wide% = Width(m_edit&,1) - (fensterbreite% - Width(%hWnd,1))
hoehe% = Height(m_edit&,1) - (fensterhoehe% - Height(%hWnd,1))
SetWindowPos m_edit& = 20,20 - wide%,hoehe%
fensterbreite% = Width(%hWnd,1)
fensterhoehe% = Height(%hWnd,1)
EndIf
Return ~CallWindowProc(OldWndProc&, hWnd&, Message&, wParam&, lParam&)
ENDPROC
'---------------------------------------------------------------------
Set("FastMode", 1)
'---------------------------------------------------------------------
Window Style 527
Window fensterbreite%, fensterhoehe%
m_edit& = Create("MultiEdit",%hWnd, "", 20, 20, 740, 490)
'----------------------------------------------------------------------
OldWndProc& = ~GetWindowLong(%hWnd, ~GWL_WNDPROC)
~SetWindowLong(%hWnd, ~GWL_WNDPROC, @ProcAddr("ChangeControl",4))
'----------------------------------------------------------------------
WhileNot prog_ende%
Waitinput
If (%key = 2)
prog_ende% = 1
EndIf
EndWhile
'-Urspruengliche ProgramMainRoutine again produce------------------
~SetWindowLong(%hWnd, ~GWL_WNDPROC, OldWndProc&)
'----------------------------------------------------------------------
END
Regards |
|
|
| |
|
|
|
Joerg | Hello Georg,
thanks for your trouble, the sees very well from. but the Problem minimize etc. (s.o.) is so unfortunately not fixed...
greetings!! Jörg |
|
|
| |
|
|
|
Georg Teles | Achja overlooking, my Error
attempt time with solid sizes, sees circa some Pixel unschön from, You must here but from whom Fenstergrößen some take away, zB. if You Statuszeile have its Höhe detect, one Menu etc its Höhe detect and everything take away from the Fensterhöhe bspw
Proc ChangeControl
Parameters hWnd&, Message&, wParam&, lParam&
Declare btnHeight&
If Message& = ~WM_SIZE
wide% = Width(%hWnd,1) - 60'here -40 for edge left & right or. yet whom "Fensterrand" whom must one yet detect
hoehe% = Height(%hWnd,1) - 100'here -40 edge left & right, possible Höhe the Statuszeile dazunehmen and Menu etc.
SetWindowPos m_edit& = 20,20 - wide%,hoehe%
EndIf
Return ~CallWindowProc(OldWndProc&, hWnd&, Message&, wParam&, lParam&)
ENDPROC
as example have The solid values -60 and -100 taken
Regards |
|
|
| |
|
|