English
Source / code snippets

create TabControl

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
TabControl erstellen
seterrorlevel 2
window 50,50-400,300
declare a%,a$,End%,color&,color%,füllen%,Tab%[9],Tab%,Tab#
def @GetColor(1) !USER32,GetSysColor
def @DrawEdge(4) !USER32,DrawEdge
settruecolor 1

proc SetTab

    parameters Xpos%,Ypos%,Breite%,Höhe%,Namen$,Vorgabe%,Mode%
    windowstyle 512
    Tab%[0]=createwindow(%hwnd,Setup-Test,Xpos%,Ypos%,Breite%,Höhe%)

    if Mode%

        Tab%[9]=@control(SysTabControl32,,$50010200,7,11,sub(Breite%,20),sub(Höhe%,80),Tab%[0],999,%HInstance)

    else

        Tab%[9]=@control(SysTabControl32,,$50010000,7,11,sub(Breite%,20),sub(Höhe%,80),Tab%[0],999,%HInstance)

    endif

    dim Tab#,250
    long Tab#,200=1
    a%=0
    a$=@substr$(Namen$,1,,)

    while len(a$)

        string Tab#,mul(a%,20)=a$
        long Tab#,212=add(mul(a%,20),Tab#)
        sendmessage(Tab%[9],4871,a%,add(Tab#,200))
        inc a%
        a$=@substr$(Namen$,add(a%,1),,)

        if Mode%

            Tab%[a%]=control(Dialog,,$50001003,1,42,sub(Breite%,24),sub(Höhe%,125),Tab%[9],1001,%hinstance)

        else

            Tab%[a%]=control(Dialog,,$50001003,1,21,sub(Breite%,24),sub(Höhe%,105),Tab%[9],1001,%hinstance)

        endif

        @showwindow(Tab%[a%],0)

    endwhile

    sendmessage(Tab%[9],4874,sub(sendmessage(Tab%[9],4868,0,0),1),add(Tab#,230))
    startpaint Tab%[9]
    Color%=4
    füllen%=1
    case @lt(Color%,30):Color&=@GetColor(color%)
    case @equ(Color%,30):Color&=@rgb(255,0,0)
    case @equ(Color%,31):Color&=@rgb(0,255,0)
    case @equ(Color%,32):Color&=@rgb(0,0,255)
    usebrush füllen%,color&
    usepen 0,1,color&
    rectangle long(Tab#,238),long(Tab#,242)-Breite%,0
    endpaint
    sendmessage(Tab%[9],4876,sub(Vorgabe%,1),0)
    Tab%=Vorgabe%
    showwindow(Tab%[Tab%],5)
    dispose Tab#

endproc

proc GetTab

    casenot equ(%message,78):return

    ifnot equ(add(sendmessage(Tab%[9],4875,0,0),1),Tab%)

        showwindow(Tab%[Tab%],0)
        Tab%=add(sendmessage(Tab%[9],4875,0,0),1)
        showwindow(Tab%[Tab%],5)

    endif

endproc

proc karte_1

    createbutton(Tab%[1],Karte1,10,50,50,20)

endproc

proc karte_2

    createbutton(Tab%[2],Karte2,110,50,50,20)

endproc

proc karte_3

    createbutton(Tab%[3],Karte3,210,50,50,20)

endproc

proc karte_4

    createbutton(Tab%[4],Karte4,10,30,50,40)

endproc

proc karte_5

    createbutton(Tab%[5],Karte5,110,30,50,40)

endproc

proc karte_6

    createbutton(Tab%[6],Karte6,210,30,50,40)

endproc

usefont ms sans serif,15,7,0,0,0
setdialogfont 1
SetTab 150,150,300,200,Test 1,Test 2,Nochn Test,Test 4,Und noch einer,Test 6,1,1
settext Tab%[0],Setup
a%=createbutton(Tab%[0],Ende,50,150,50,20)
karte_1
karte_2
karte_3
karte_4
karte_5
karte_6

whilenot End%

    getmessage
    GetTab
    locate 1,1
    print Aktuelle Karte:,Tab%

    if getfocus(a%)

        destroywindow(Tab%[0])
        End%=1

    endif

endwhile

Print
a class=s4 href='./../../Function-References/XProfan/end/'>end waitkey
 
07/15/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.764 Views

Themeninformationen

this Topic has 1 subscriber:

unbekannt (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