English
Forum

Auto Paint with strange cls behaviour

 

GDL
Hi,

try straight with a farbigen Dialog-Window To hantieren.If I autopaint use, must I always the whole Window destroy , there with CLS always some Controls covers go.

on the side Gibts yet Problems, if the Dialog-Window yet ne Toolbar has.
CompileMarkSeparation
declare dlg&,toolbar&,button&
@Set(AutoPaint,1)
usermessages 16
window 0,0 - %maxx,%maxy
dlg&=create(window,%hwnd,,0,0,%maxx,%maxy)
farbe
sleep 1000
toolbar&=@Create(Toolbar,dlg&,0,0,1,0,0)
@Toolbar(AddTextButton,toolbar&,8,100,Sichern,Datei speichern)
@Toolbar(AddTextButton,toolbar&,7,200,hihi,Datei speichern)
button&=create(button,dlg&,bbb,100,400,100,30)

proc farbe

    startpaint dlg&
    cls RGB(144,80,0)
    endpaint

endproc

whilenot 0

    waitinput

    if %umessage = 16

        destroywindow(dlg&)
        end

    ELSEIF %wmPaint

        farbe

    endif

wend


Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/26/07  
 




Thomas
Freier
have 3 Lines eingefügt. is it the what You seek?
CompileMarkSeparation
 $H Windows.ph
declare dlg&,toolbar&,button&
@Set(AutoPaint,1)
usermessages 16
window 0,0 - %maxx,%maxy
dlg&=create(window,%hwnd,,0,0,%maxx-200,%maxy-200)
sleep 1000
toolbar&=@Create(Toolbar,dlg&,0,0,1,0,0)
@Toolbar(AddTextButton,toolbar&,8,100,Sichern,Datei speichern)
@Toolbar(AddTextButton,toolbar&,7,200,hihi,Datei speichern)
farbe
button&=create(button,dlg&,bbb,100,400,100,30)

proc farbe

    startpaint dlg&
    cls RGB(144,80,0)
    endpaint

endproc

whilenot 0

    ~InvalidateRect(dlg&, 0, 0)
    ~UpdateWindow(dlg&)
    waitinput

    if %umessage = 16

        destroywindow(dlg&)
        end

    ELSEIF %wmPaint

        farbe

    endif

wend

 
Gruß Thomas
Windows XP SP2, XProfan X2
07/26/07  
 




Dieter
Zornow
without Api can You it too so make
CompileMarkSeparation
declare dlg&,toolbar&,button&
@Set(AutoPaint,1)
usermessages 16
window 0,0 - %maxx,%maxy
dlg&=create(window,%hwnd,,0,0,%maxx,%maxy)
farbe
sleep 1000
toolbar&=@Create(Toolbar,dlg&,0,0,1,0,0)
@Toolbar(AddTextButton,toolbar&,8,100,Sichern,Datei speichern)
@Toolbar(AddTextButton,toolbar&,7,200,hihi,Datei speichern)
button&=create(button,dlg&,bbb,100,400,100,30)

proc farbe

    startpaint dlg&
    showwindow(Toolbar&,0)
    showwindow(button&,0)
    cls RGB(144,80,0)
    showwindow(Toolbar&,1)
    showwindow(button&,1)
    endpaint

endproc

whilenot 0

    waitinput

    if %umessage = 16

        destroywindow(dlg&)
        end

    ELSEIF %wmPaint

        farbe

    endif

wend


greetings from Bangkok

Dieter
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
07/27/07  
 




GDL
@Dieter,@Thomas

both versions functions partly.it come in both startup always fehlerhafte(see Image) Bildanzeigen and thereafter(to Überdeckungen,Decreasing and enhance) sporadisch this Error to.

to Toolbar. with this is the eigenartige behaviour too stayed.

1. click whom hihi TButton on (in the actual Program happens nothing)
2. let The left Mouse button go , stay but on the hihi TButton. now becomes How of Geisterhand the first TButton secure pressed and remaining as long as pressed To I with the mouse of hihi TButton runterfahre.
3. stay I with the mouse on the Hihi TButton and press it one second time then functions the TButton (in the eigendlichen Program)

this eigenartige behaviour power too this short Beispielcode.

Hello
Georg

86 kB
Hochgeladen:07/27/07
Downloadcounter100
Download
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/27/07  
 



there's not odd - the behaviour is utterly correctly and shows that the principle the Herummalens on the Parent of Controls naturally To Anzeigefehlern lead if one too reaches übermalt which Windows self in different Make neugezeichnet go.

what your there power is really ne Sauerei. your places figurative seen one riesiges leaf paper over The surface one Hochhauses and wundert you - the if someone the window opens - that the paper zerreist.

one ought to if at all only reaches texturieren which not already with Controls occupied are. there must one itself hold something dreamup or one überlässt these task the Windows itself! my hint would the Create one farbigen Statics as background (either einfarbig or with images verknüpft).
 
07/27/07  
 




GDL
On one Farbstatic from the SKControl react no Buttons, weder with clicked yet with getfocus.i made it yet always so, that I available Controls at Neustart wrecked and then Neuerstellte. only with ca. 500 Controls lasts the hold always.

Übrigens have I now The Toolbar from Winfellow übernommen. These goes on the Hwnd as well as on the Dialog-Window correct.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/27/07  
 



You should The Farbstatics neither as Parent deklarieren separate under lay / create. Parent should furthermore the Window his!
 
07/27/07  
 




Dieter
Zornow
Hello Georg,

with my example must You naturally The proc colour to the create the Completed: Second the Buttons Call, then ought to it weg. have I overlooking, I your code übernommen having.

greetings from Bangkok

Dieter
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
07/27/07  
 




GDL
Jo, have I straight Pinned and if I The Procedure 3times through let GEHTS too always correct.Wennas too ne Sauerei iss, hilfts me nothing, I get it differently not there.
and after too The prfellow Toolbar in my actual Program working be I again integrally happy. thanks over again all.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/27/07  
 



You get not differently there?

What is on it not-hinbekommbar first one Farbstatic To produce, and then The Buttons?
 
07/27/07  
 




GDL
@iF, with the the Static have I now too begriffen. only soetwas standing not in the Help or with the SKControl Help. these too the reason Why over ands over again to one XProfan book nachgefragt becomes.

I have me then one GW-Basic book (721 pages for 68DM) bought. alone The for me important Schnittstellenprogrammierung comprising there 23 pages.

I knows too the the cost/benefit factor with XProfan not straight super is.I say too sincere, I me zurzeit keines buy could.
I wanted to hold only a reason for name, Why always to one book demand becomes.

but I hope, that one GDL Querdenker you not To heavy on Trapp holds.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/27/07  
 




GDL
Schade I can't so quick type.my response heard to your.
 
Windows7 Xprofan 8,9,10 [...]  [...] 
07/27/07  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.134 Views

Untitledvor 0 min.
Selmo03/24/19
Ernst04/10/14
Andreas Koch12/19/11

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