English
Forum

New object class create

 

Jörg
Sellmeyer
If I a class have and New one new Objekt prepares have:
is it possible the Objekt To destroy and the equal Bezeichner again New(...) To use?

If I z. B. with
TB# = New(RGHToolbar,%hwnd,hToolbarBmp&,0,tbHight%,ID%,0)
a Toolbar create.
and the with
DestroyWindow(TB#.GetHandle())
abschieße, Gibts to new:
TB# = New(RGHToolbar,%hwnd,hToolbarBmp&,0,tbHight%,ID%,0)
a Error Message.
DeleteObjekt TB# or Clear TB# bring too nothing, b. z. w. Error Message.
CompileMarkSeparation
Declare appexit%,TB#
 $H WINDOWS.PH
 $H commctrl.ph
 $I RGHTOOLBAR.INC
Def GetSysColor(1) !USER32,GetSysColor
Def TBClicked(1) Abs(%menuitem) = &(1)
UserMessages 16

Proc MyToolBar

    TB# = New(RGHToolbar,%HWnd,0,2,0,2000,0)
    TB#.AddButton(0,2000,Button 1)
    TB#.Separator()
    TB#.AddButton(10,2001,Button 2)
    TB#.AddButton(10,2002,Button 3)
    TB#.Separator()
    TB#.AddButton(3,2003,Button 4)
    TB#.AddButton(4,2004,Button 5)
    TB#.CheckButton(2004,1)
    TB#.HideButton(2004)
    TB#.Separator()
    TB#.AddButton(3,2005,Ende)

EndProc

WindowTitle Test
WindowStyle $023A
SetTrueColor 1
Window 100,100-270,64
Cls GetSysColor(15)
UseFont MS Sans Serif,13,0,0,0,0
SetDialogFont 1
MyToolBar

WhileNot appexit%

    WaitInput
    Case Or(%umessage = 16,appexit% > 0):Break

    If TBClicked(2005)

        appexit% = 1

    ElseIf TBClicked(2000)

        DestroyWindow( TB#.GetHandle())
        DeleteObject TB#bewirkt nichts
        Clear TB#Fehlermeldung
        MyToolBarFehlermeldung

    ElseIf TBClicked(2001)

        WindowTitle Button 2 gedrückt

    ElseIf TBClicked(2002)

        WindowTitle Button 3 gedrückt

    ElseIf TBClicked(2003)

        Engage% = 1
        TB#.HideButton(2003)
        TB#.ShowButton(2004)

    ElseIf TBClicked(2004)

        Engage% = 0
        TB#.HideButton(2004)
        TB#.ShowButton(2003)

    EndIfclass=s4 href='./../../Function-References/XProfan/wend/'>Wend


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




RGH
Hello Jörg,
one Objekt becomes likewise like a area with Dispose released. means simply Dispose TB# behind DestroyWindow(TB#.GetHandle()) insert and it works!

The function NEW power first of all the same thing How DIM, and calls subsequently whom Konstruktor on. therefore should too any with NEW begot Objects to use with DISPOSE released go.

Greeting
Roland
(in the middle into Urlaubsvorbereitungen)
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
08/25/06  
 




Jörg
Sellmeyer
sometimes Have I Real one shelf before the head!
thanks Roland.
plenty Fun in the leave!
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
08/25/06  
 



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.184 Views

Untitledvor 0 min.
Jörg Sellmeyer01/24/13
Michael Borowiak07/23/11

Themeninformationen

this Topic has 2 subscriber:

Jörg Sellmeyer (2x)
RGH (1x)


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