English
Forum

Editfeld on Window adjust

 

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
 
06/16/16  
 




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
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

06/16/16  
 




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
 
06/16/16  
 




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
 
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

06/16/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.681 Views

Untitledvor 0 min.
Frank Reibold11/25/22
iF10/31/20
Torben Nissen04/26/20
Peter Max Müller10/07/17
More...

Themeninformationen

this Topic has 2 subscriber:

Georg Teles (2x)
Joerg (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie