English
Forum

Flackerfreies Redraw

 
- Page 1 -



Normann
Strübli
Moin moin,

is already a little bit since since then I intensiver with XProfan
engage have means hopefully no stupid question:

it circa a Statusbar in the Mainwindow, The I with
Fenstergrößenänderung new draw would like.
unfortunately flackert the whole awful, there there still sure
a better Solution?

the Subclassing should receive stay.
 $H windows.ph
 $H messages.ph
'Statusbar
DEF CreateStatusWindow(4) ! "comctl32","CreateStatusWindow"
Declare Dialog&,Status&,SText$,Positions#
Declare CLASSNAME$,PROGRESSHandle&,HWND&,ProgressZähler&
Dim Positions#,16
Long Positions#,0=250
Long Positions#,4=500
Long Positions#,8=-1
'**********************

SUBCLASSPROC

    declare dis#,rect#,tcitem#,b#,t$,mx%,my%,i%,o%

    if &sWnd=%HWnd

        if %sMessage= ~wm_size

            SetWindowPos Status& = 0,0 - 0,0; 0'Redraw Statusbar

        ElseIf %sMessage= ~wm_sizing

            SetWindowPos Status& = 0,0 - 0,0; 0'Redraw Statusbar

        EndIf

    ENDPROC

    CLS
    Var TEXT$ = ""
    Status&=CreateStatusWindow($50000920,@ADDR(TEXT$),%HWND,1000)
    Sendmessage(Status&,$404,3,Positions#)
    Dispose Positions#
    SubClass %HWnd, 1

    While 1

        Waitinput

    EndWhile

    subclass %HWnd,0
    End
 
02/03/23  
 



« this Posting watts as Solution marked. »


H.Brill
the Flackern arise by the inquire the ~wm_sizing.
that is, jedesmal, if The mouse the window in the Size
changed, itself means moving, goes too The Message ~wm_sizing one.

but the do you need really not. there reicht too the
end the movement to that Repaint. means red the ~wm_sizing
simply lane.

enclosed The Verschlimmbesserung, where The actually wide the Fensters
too The length the boxes in the Statusbar new setting.
 $H windows.ph
 $H messages.ph
'Statusbar
DEF CreateStatusWindow(4) ! "comctl32","CreateStatusWindow"
Declare Dialog&,Status&,SText$,Positions#
Declare CLASSNAME$,PROGRESSHandle&,HWND&,ProgressZähler&
Dim Positions#,16
Long Positions#,0=250
Long Positions#,4=500
Long Positions#,8=-1
'**********************

SUBCLASSPROC

    declare Positions#, dis#,rect#,tcitem#,b#,t$,mx%,my%,i%,o%

    if &sWnd=%HWnd

        if %sMessage= ~wm_size

            SetWindowPos Status& = 0,0 - 0,0; 0'Redraw Statusbar
            Dim Positions#, 16
            Long Positions#, 0 = Width(%HWnd, 0) / 4
            Long Positions#, 4 = Width(%Hwnd, 0) / 2
            Long Positions#, 8 = -1
            SendMessage(Status&, $404, 3, Positions#)

        ElseIf %sMessage = ~wm_sizing

            SetText %HWnd, "Fensterbreite : " + Str $(Width(%HWnd))

        EndIf

    ENDPROC

    CLS
    Var TEXT$ = ""
    Status&=CreateStatusWindow($50000920,@ADDR(TEXT$),%HWND,1000)
    Sendmessage(Status&,$404,3,Positions#)
    Dispose Positions#
    SubClass %HWnd, 1

    While 1

        Waitinput

    EndWhile

    subclass %HWnd,0
    Dispose Positions#
    End

i think, this is what you mean.
PS : The Statusbar there too integrate as Status Window in Profan.
Create("StatusWindow",n1,s[,n2,B])
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
02/04/23  
 




Normann
Strübli
Moin,

in the Grunde completely clear - Have I abgeändert and the whole was nevertheless
on the flackern.
I had so plenty there - and herprobiert and then this example
from my code zusammengestellt, there was setwindowpos then
sowohl with ~wm_size as well as ~wm_sizing drin

you have me nevertheless on The Solution brought, because it Yes in your
modified example not flackert.

I had one überlappendes Static Control - really I had The höhe
the Statusbar abgezogen, by a small mistake in writing was this
worth but 0.
happens well if one too long whom Error on the incorrect place seek.

Vielen Thanks again !!!
 
02/04/23  
 




Georg
Teles
Nabend, inside the SUBCLASS missing incidentally one EndIf, to that Error comes not, Why too always not

ditto does the same following code, if someone to XProfan 11 without SubClassing operates
 $H windows.ph
 $H messages.ph
'Statusbar
DEF CreateStatusWindow(4) ! "comctl32","CreateStatusWindow"
Declare Dialog&,Status&,SText$,Positions#,OldWndProc&
Declare CLASSNAME$,PROGRESSHandle&,HWND&,ProgressZähler&
Dim Positions#,16
Long Positions#,0=250
Long Positions#,4=500
Long Positions#,8=-1
'**********************

Proc ChangeControl

    Parameters hWnd&, Message&, wParam&, lParam&
    declare Positions#, dis#,rect#,tcitem#,b#,t$,mx%,my%,i%,o%

    if hWnd&=%HWnd

        if Message&= ~wm_size

            SetWindowPos Status& = 0,0 - 0,0; 0'Redraw Statusbar
            'Dim Positions#, 16
            'Long Positions#, 0 = Width(%HWnd, 0) / 4
            'Long Positions#, 4 = Width(%Hwnd, 0) / 2
            'Long Positions#, 8 = -1
            'SendMessage(Status&, $404, 3, Positions#)

        ElseIf %sMessage = ~wm_sizing

            SetText %HWnd, "Fensterbreite : " + Str $(Width(%HWnd))

        EndIf

    EndIf

    Return ~CallWindowProc(OldWndProc&, hWnd&, Message&, wParam&, lParam&)

ENDPROC

Set("FastMode", 1)'FastMode
CLS
Var TEXT$ = ""
Status&=CreateStatusWindow($50000920,@ADDR(TEXT$),%HWND,1000)
Sendmessage(Status&,$404,3,Positions#)
Dispose Positions#
OldWndProc& = ~GetWindowLong(%hWnd, ~GWL_WNDPROC)' save old WindowLong
~SetWindowLong(%hWnd, ~GWL_WNDPROC, @ProcAddr("ChangeControl", 4))' set new WindowLong

While 1

    Waitinput

EndWhile

~SetWindowLong(%hWnd, ~GWL_WNDPROC, OldWndProc&)' restore WindowLong
Dispose Positions#
End

Regards
 
Alle Sprachen
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

02/05/23  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.111 Views

Untitledvor 0 min.
Sven Bader11/24/23
Axel Berse08/13/23
Wilfried Friebe05/28/23
Rainer Hoefs05/02/23
More...

Themeninformationen



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