English
Forum

PicButton and @GetFocus functions not together

 

Sato
Pinto
Hello on all sides
Normaleweise use I a Presentation of Andreas Miethe circa bmps on Buttons To lay, but now wished I XProfan PicButton testing and place solid the it with GetFocus not functions but well with clicked whom I in my Program not benefit can. gives it a Solution PicButton and @Getfocus ??
CompileMarkSeparation
declare ende&
cls
ende& = @Create("hPic",-1,"termo2.bmp")
@Create("PicButton",%hWnd,ende&,444,205,55,32)

while 1

    waitinput

    if clicked (ende&)

        if @GetFocus (ende&)

            break

        endif

    endwhile

    DeleteObject ende&
    end

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
08/04/08  
 




Jörg
Sellmeyer
Hello Sato,
The problem isn't Clicked, separate your code.

you have The variable the Bildhandle zugeordnet. you mußt but whom Button inquire, if you a Raktion having want:
CompileMarkSeparation
declare ende&
cls
Var hpic& = @Create("hPic",-1,"termo2.bmp")
ende&=@Create("PicButton",%hWnd,ende&,444,205,55,32)

while 1

    waitinput

    if @clicked (ende&)

        break

    endif

endwhile

DeleteObject hpic&
end
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/04/08  
 




Sato
Pinto
Hello Jörg

thanks, functions with small Korrektur
CompileMarkSeparation
var ende& = @Create("hPic",dll%,#122)
ende& = @Create("PicButton",_dlg&,hpic&,444,205,32,32)
nicht end
re>

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
08/04/08  
 




Jörg
Sellmeyer
Hello Sato,

No, so is it still not correctly.. You points the variables ende& now two Objects To. the is not. so can You, the Bildhandle end the program not any more enable. you have now too the Button the incorrect lever transfer. Perhaps only one Kopierfehler?
Create("HPIC",...) must a Own Variable having (in my example hPic&) and the Button must ditto a Own Variablenbezeichnung receive.
in a, why you now _dlg& drin have, but I suspect, the Button should on one dialog lying.

Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/04/08  
 



Jörg Sellmeyer
the is not. so can You, the Bildhandle end the program not any more enable. you have now too the Button the incorrect lever transfer.


as i meant the one GRUNDSÄTZLICH everything again destroy ought to what too created, meant You, that this about one rumour be because it too z.B. wealthy a Parent of Controls To destroy.

you should always everything again destroy what created. WIE one it destroy (z.B. over the parent) is another thing...

PS: I know the Sato here whom Error but vlt. from anderem Grunde installed having - But imho too Sato was to the You meant that the Parentzerstören ausreicht.

Beginner should always in the back of the head having that the Own Program too The Order wiederherzustellen has. If windows hiervon a Großteil in the meantime self undertaking, then likes the not more than helpful his.
 
08/04/08  
 




Jörg
Sellmeyer
Hello David,
in the first have I from you too yet none code seen, in the You any Controls destroy, secondly goes it not for a Control separate for a GDI-Objekt, namely the Bildhandle. The go of my Wissens Windows self-contained treats and occupy to termination the Progamms furthermore memory.
i'm furthermore sure, that one Buttons and others "normale" Fensterobjekte not explizit manage must. whether the with Handles for Bitmaps u.s.w. the case is would Perhaps time a attempt worth.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/04/08  
 



Yes we talk tidy together past. It's all right too I do not therefore, that Controls any particular destroy belong.

it went me only therefore one Totalanfänger einmalig declared to have, that one items, which one created, ("gefälligst") again eliminating ought to.

the one Controls destroy can, in the to the Parent destroy, speaks there not against it, since the Controls hierbei Yes likewise destroy go. "Immer" works the imho but neither, faith then not, if the Parentcontrol not the own Process angehört. (i'm me hierbei but really not sure, my but Schonmal a Negativerfahrung made to have)

Jörg Sellmeyer
Hello David,
in the first have I from you too yet none code seen, in the You any Controls destroy,


Nunu!
CompileMarkSeparation have I certainly Schonmal posted.

Jörg Sellmeyer
secondly goes it not for a Control separate for a GDI-Objekt, namely the Bildhandle. The go of my Wissens Windows self-contained treats and occupy to termination the Progamms furthermore memory.


hang imho from the Windowsversion ex. under XP can well nothing whom own Process survive let except Files, means too z.B. no hPics. hPics of Bitmaps* survive (naturally) the destroy of Bitmaps*.

*Statics
 
08/04/08  
 




Jörg
Sellmeyer

It's all right too I do not therefore, that Controls any particular destroy belong.


OK, then talk we not together past.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/04/08  
 




Sato
Pinto
Hello people

Please therefore not excite, it's not worth.....

Jörg, Yes _dlg& is a dialog lever, the Button lying on the dialog.
I have whom incorrect copy and past erwischt, in my code is it so
CompileMarkSeparation
var hpic& = @Create("hPic",dll%,#122)
ende& = @Create("PicButton",_dlg&,hpic&,444,205,32,32)
beim verlassen des Dialogs habe ich
deleteobject hpic&
deleteobject e
/pre>

and hope the it so correctly is

greeting
Sato
 
Sato Pinto
WIN XP Home
XPROFAN 11
08/04/08  
 




Jac
de
Lad

CompileMarkSeparation
var hpic& = @Create("hPic",dll%,#122)
ende& = @Create("PicButton",_dlg&,hpic&,444,205,32,32)
beim verlassen des Dialogs habe ich
deleteobject hpic&
DestroyWIndow(ende&)/pre>
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
08/04/08  
 




Jörg
Sellmeyer
and again the Vollständigkeit halber:
the DestroyWindow(ende&) isn't necessary. If the dialog destroy becomes, b.z.w. the Mainwindow end the Program go automatically any Controls with destroy and occupy no Resources More.
the Bitmaphandle must on destroy go, there otherwise the memory for not again released becomes.

and excite go we certainly not, gell David?

...

David??

...

...

D A V I D !!!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/04/08  
 



i'm completely spare each Verstandes and eachone excitement.
 
08/04/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.561 Views

Untitledvor 0 min.
GDL08/26/15
RICOSCH11/30/13
Uwe Lang01/01/12
Mirko12/23/11
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