English
Forum

Static tab and Edit

 
- Page 1 -



Rolf
Koch
Huhu people,

today Have I time ne question:
has of/ one ne idea:
@Control(STATIC,txt$,$54000106,x%,y%,wide%,high%,fenster&,$7918,%hinstance)
there lying Edits on it. Logischerweise can I these not the Tabtaste start. logical, because its no dialog what about me can this part none 512it worth settle.
too one Exwert $200 not working.
I need the part but. unfortunately works it with Getkeystate(9) neither.
is hold stupid, if one not the Tabtaste between whom Edits there and herspringen can.
Have everything attempts.

but, have another bisschen hope , there nothing unmöglich is.

Rolf
 
02/05/05  
 



 
- Page 2 -



Uwe
''Pascal''
Niemeier
Hello Rolf!

It should several groups of Elementen at a single blow one- or ausgeblendet go (z.B. with Reiterwechsel in a tab-Control)?

how'bout with rahmenlosen Dialogen instead of Statics?

Perhaps could one The Statics too one Subclassing unterziehen, if only The side-effects not wären...

SeeYou
Pascal
 
02/07/05  
 




Rolf
Koch
Hi Pascal,

Yes would too a Possibility, if one so simply and beautiful like a Static whom Dialogen of dwell from a weisse Backgroundcolor give could. From dwell from = by Style and only not by Startpaint - Endpaint *würg*

Rolf
 
02/07/05  
 



Rolf - you are still with the Thread.pcu intimate - Why take The not for - The is still How for created. I can you naturally too one small demonstration for supplying.

salvo, iF
 
02/07/05  
 




Rolf
Koch
Hi If,

clear be I so intimate, even very intim
means meinste there Repaint?
I had extra *würg* with Startpaint written. I hate Startpaint and Endpaint. utterly tedious

but How said: take we the Topic later over again on, there it in the momentum still not so important is. it be because another interested itself furthermore for Fragestellung - except Startpaint LOL
Rolf
 
02/07/05  
 




Jörg
Sellmeyer
Hello Rolf,
how'bout because so:

Cls
dlg&=Createdialog(%hwnd...)
Static&=Control(Static,dlg&,....)
this Static one Bitmap with lever zaubern, goes indeed with Bitmap
memory. One 1 x 1 Pixel reicht already for a weißen background
Button&=CreateButton(%dlg,...)

so have You The Controls on the dialog and the Static gives you whom weißen background
Greeting
Jörg
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
02/07/05  
 




Rolf
Koch
thanks too you for response.

however very so (similar see it Yes from).
i'm one Staticfetischist and therefore work I only with Bitmaps on Statics.
I need no Bitmap on the Staticteil. Since I by Style the Staticcontrol in knows color. need means not yet time one Pixel graphic.
means: Control(STATIC,txt$,$54000106,x%,y%,wide%,high%,fenster&,$10000,%hinstance) would knows = Whiterect
or
54000105 = Grayrect
or
54000104 = Blackrect.
you see, It's all right indeed without Bitmap. I wealth you have unfortunately my question not understood. How I what create an so on is Yes clear . Schätzungsweise have You first below started To reading, there see it to another trouble from .
It's all right solely around the trouble on Statics erstellten Edits The Tabtaste abzufragen.

foreseen of it remaining in this drop still the trouble

my Creation:

dialog create
Static on it (in weisem Style)
Controls on it
and schätzungsweise there no Solution for the trouble, it be whom by Subclass., that one The Tabtaste there into Editfeldern address can.

but How said: power you now not insane. must hold now first what other program.

[quote:1267241905]
Cls
dlg&=Createdialog(%hwnd...)
Static&=Control(Static,dlg&,....)
this Static one Bitmap with lever zaubern, goes indeed with Bitmap
memory. One 1 x 1 Pixel reicht already for a weißen background
Button&=CreateButton(%dlg,...)
[/quote:1267241905]
Jo might I kennen - so works ROC, NOCTRAMIC (very plenty) and some of my Beispielcodes still.

Rolf
 
02/08/05  
 



Moin Rolf, I once more....

time look, whether I you bislang correctly. understood have:
so far are you already...
CompileMarkSeparation
Declare Static&,Edits&[5],fenster&,Focus%,txt$
WINDOWSTYLE 31
WINDOWTITLE "STATIC Control und Tabtaste",TXT$
Window 0,0-640,440
LET FENSTER&=@Control("Dialog","",$54000000,10,10,210,300,%HWND,$7917,%hinstance)
LET TXT$="Test"
LET STATIC&=@Control("STATIC",txt$,$54000106,0,0,210,300,fenster&,$7918,%hinstance,$10000)
LET EDITs&[1]=@CREATEEDIT(STATIC&,"",10,10,200,25)
LET EDITs&[2]=@CREATEEDIT(STATIC&,"",10,50,200,25)
LET EDITs&[3]=@CREATEEDIT(STATIC&,"",10,90,200,25)
LET EDITs&[4]=@CREATEEDIT(STATIC&,"",10,130,200,25)
LET EDITs&[5]=@CREATEEDIT(STATIC&,"",10,170,200,25)
@SETFOCUS(EDITs&[1])
LET FOCUS%=1

Whilenot %MENUITEM=-2

    Waitinput

WEND


The SKCONTROL.DLL have I now time omitted - so know I not from - WS_TABSTOP here as an afterthought into Controls einzufügen might but really no trouble his - or still?
which Problems have you got with the dialog as underground, Why to the lane, and which Problems there with WINDOWSTYLE 512?

 
02/08/05  
 




Rolf
Koch
Hi AH,

jo komischerweise works there now The Tabtaste. I had too $10000 taken.
Perhaps lying it now still only yet on whom SKEdits.
but really well so. Perhaps can I it Yes then (if I there weitermache) so umsetzen. and evtl. whom SKControls whom Stile procure.

Thx
Rolf
 
02/08/05  
 




Michael
Dell
Hi,

Have too another example with WS_EX_CONTROLPARENT, wisely though not whether with the whom SKEdits too runs:
CompileMarkSeparation
Bitte tabulator Taste betätigen
Def GSC(1) !"USER32.DLL","GetSysColor"
Declare dlg1&,st1&,txt1&,ed1&,ed2&,ed3&,tst&
WindowStyle 538
Cls
dlg1& = Create("Dialog",%HWnd,"Test Dialog - Bitte tabulator Taste betätigen",40,40,400,300)
st1&  = Control("Static","Dies ist ein Test!",$54010106,40,40,200,150,dlg1&,$10001,%HInstance,$050080) WS_EX_CONTROLPARENT =$050080
st1&  = Control("Static","Dies ist ein Test!",$54010106,40,120,200,150,%HWnd,$10001,%HInstance,$050080) WS_EX_CONTROLPARENT =$050080
txt1& = Create(  "Text",st1&,"Dies ist ein Test!",10, 10,180, 16)
ed1&  = Create(  "Edit",st1&,            "Edit 1",10, 40,180, 18)
ed2&  = Create(  "Edit",st1&,            "Edit 2",10, 70,180, 18)
ed3&  = Create(  "Edit",st1&,            "Edit 3",10,100,180, 18)
Sleep 1000
ShowWindow(st1&,0)
Sleep 1000
ShowWindow(st1&,1)

WhileNot Or(Equ(%Key,2),Equ(%MenuItem,-2))

    WaitInput

EndWhile

DestroyWindow(dlg1&)
End

Greeting

Michael...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
02/08/05  
 




Rolf
Koch
Yes, Michael, works too fine!
As I said: then depends it of (with tab u.s.w) another factor ex.
will be then over again detailiert nachschauen, Why this not so goes. but Perhaps goes it Yes so now with the Examples, come only not moreover To testing

Rolf
 
02/08/05  
 




CB
Hi,

would like you all thank - you have me very helped, a problem To eliminating. in the principle I ment around the same Ausgangssituation How with Rolf - only with Tabcontrols. How with the SKControls goes, can I you unfortunately neither say, I wealth but, Sebastian becomes there sure what tricksen can.
even if you the no new Erkenntnisse bring becomes, mail I time my structure (the primary fixierte 1. tab Although a wildly structure, moreover have I of Frank and Pascal too others Solutions get, but these is hold of me - I deck me now time only ungern with strangers feathers):
CompileMarkSeparation
DEF SetWindowLong(3) ! "User32","SetWindowLongA"
DEF GetWindowLong(2) ! "User32","GetWindowLongA"
DEF &WM_CLOSE $010
DEF &WM_COMMAND $0111
DEF &TCM_SETITEMSIZE $01329
DEF &TCS_FIXEDWIDTH  1024
DEF &TCM_GETITEMCOUNT $01304
DEF &GWL_STYLE  -16
DEF MakeLong(2) Or(&(1),&(2)<<16)
DEF GetSysColor(1) !"USER32","GetSysColor"
UserMessages &WM_COMMAND,&WM_CLOSE
Declare Ende&,TabControl&,TabItems&,AllTabsBut&,AktivesTab&,Ende&,Tab2&
Declare EditTab1&,EditTab2_1&,EditTab2_2&,EditTab3&,EditTab4&,EditTab5&,EditTab6&
Declare Control1&,Control2&,Control3&,Text1&

PROC TAB1AKTIV

    ShowWindow(AllTabsBut&,1)
    ShowWindow(Control1&,1)

ENDPROC

PROC TAB1INAKTIV

    ShowWindow(AllTabsBut&,0)
    ShowWindow(Control1&,0)

ENDPROC

PROC TAB2AKTIV

    ShowWindow(Control2&,1)

ENDPROC

PROC TAB2INAKTIV

    ShowWindow(Control2&,0)

ENDPROC

PROC TAB3AKTIV

    ShowWindow(Control3&,1)

ENDPROC

PROC TAB3INAKTIV

    ShowWindow(Control3&,0)

ENDPROC

PROC TAB4AKTIV

    ShowWindow(EditTab4&,1)

ENDPROC

PROC TAB4INAKTIV

    ShowWindow(EditTab4&,0)

ENDPROC

PROC TAB5AKTIV

    ShowWindow(EditTab5&,1)

ENDPROC

PROC TAB5INAKTIV

    ShowWindow(EditTab5&,0)

ENDPROC

PROC TAB6AKTIV

    ShowWindow(EditTab6&,1)

ENDPROC

PROC TAB6INAKTIV

    ShowWindow(EditTab6&,0)

ENDPROC

WindowStyle 538
Cls
TabControl& = Create("TABCTRL",%hwnd,"TAB 1",0,0,width(%HWND),height(%HWND))
Tab2& = InsertTab(TabControl&,1,"TAB 2")
InsertTab(TabControl&,2,"TAB 3")
InsertTab(TabControl&,3,"TAB 4")
InsertTab(TabControl&,4,"TAB 5")
InsertTab(TabControl&,5,"TAB 6")
SetWindowLong(TabControl&,&GWL_STYLE,OR(GetWindowLong(TabControl&,&GWL_STYLE),$0440))
TabItems& = 1
SendMessage(TabControl&,&TCM_SETITEMSIZE,0,MakeLong(Width(TabControl&),20))
==== Elemente Tab 1 ====
Control1& = Control("Static","",$50000006,20,30,600,410,%HWND,1001,%hInstance,$050080)
EditTab1& = Create("Edit",Control1&,"Edit in Control 1",50,50,150,19)
Text1& = Create("Text",Control1&,"Dzt. ist nur Tab 1 sichtbar",170,325,170,15)
AllTabsBut& = Create("Button",%HWND,"Show all tabs",50,350,100,20)    gesonderte Behandlung, deswegen dem Hauptfenster zugeordnet
==== Elemente Tab 2 ====
Control2& = Control("Static","",$50000006,25,50,250,200,%HWND,2001,%hInstance,$09)
Control2& = Control("Static","",$50010106,25,50,250,200,%HWND,2001,%hInstance,$050080) WS_EX_CONTROLPARENT =$050080
EditTab2_1& = Create("Edit",Control2&,"Edit 1 in Control 2",50,100,150,19)
EditTab2_2& = Create("Edit",Control2&,"Edit 2 in Control 2",50,125,150,19)
==== Elemente Tab 3 ====
Control3& = Control("Static","",$50000007,30,90,250,200,%HWND,3001,%hInstance,$050080)
EditTab3& = Create("Edit",Control3&,"Edit in Control 3",50,150,150,19)
==== Elemente Tab 4 ====
EditTab4& = Create("Edit",%HWND,"Normales Tab 4",50,200,150,19)
==== Elemente Tab 5 ====
EditTab5& = Create("Edit",%HWND,"Normales Tab 5",50,250,150,19)
==== Elemente Tab 6 ====
EditTab6& = Create("Edit",%HWND,"Normales Tab 6",50,300,150,19)
TAB1AKTIV
TAB2INAKTIV
TAB3INAKTIV
TAB4INAKTIV
TAB5INAKTIV
TAB6INAKTIV
AktivesTab& = GetActiveTab(Tabcontrol&)
AktivesTab& = 0
EnableWindow Tabcontrol&,0

PROC TABS_erweitern

    EnableWindow Tabcontrol&,1
    WindowStyle erweitern um feste Breite (alle Tabreiter sind gleich breit)
    SetWindowLong(TabControl&,&GWL_STYLE,OR(GetWindowLong(TabControl&,&GWL_STYLE),OR(&TCS_FIXEDWIDTH,$0440)))
    Anzahl der Tabreiter ermitteln
    TabItems& = SendMessage(TabControl&,&TCM_GETITEMCOUNT,0,0)
    Breite und Hoehe setzen (Par1 bei MakeLong ist die Breite, Par2 bei Makelong ist die Höhe)
    SendMessage(TabControl&,&TCM_SETITEMSIZE,0,MakeLong(Width(TabControl&)/TabItems&,20))
    AktivesTab& = 0
    ShowWindow(Text1&,0)

ENDPROC

Whilenot Ende&

    Waitinput
    AktivesTab& = GetActiveTab(Tabcontrol&)   Ermittelt das selektierte Tab

    If %UMessage = &WM_CLOSE

        Ende& = 1

    ElseIf %UMessage = &WM_COMMAND

        If &ULParam = AllTabsBut&

            TABS_erweitern
            TAB1INAKTIV
            TAB2AKTIV
            TAB3INAKTIV
            TAB4INAKTIV
            TAB5INAKTIV
            TAB6INAKTIV
            TAB1AKTIV                           das kapier ich zwar nicht so ganz, aber es geht nur so,
            TAB2INAKTIV                         sonst wird der Inhalt von Tab1 nicht gleich angezeigt!
            ShowWindow(AllTabsBut&,0)

        EndIf

    EndIf

    If tabchanged(TabControl&)                Tab gewechselt?

        If AktivesTab& = 0

            TAB1AKTIV
            ShowWindow(AllTabsBut&,0)
            TAB2INAKTIV
            TAB3INAKTIV
            TAB4INAKTIV
            TAB5INAKTIV
            TAB6INAKTIV

        ElseIf AktivesTab& = 1

            TAB1INAKTIV
            TAB2AKTIV
            TAB3INAKTIV
            TAB4INAKTIV
            TAB5INAKTIV
            TAB6INAKTIV

        ElseIf AktivesTab& = 2

            TAB1INAKTIV
            TAB2INAKTIV
            TAB3AKTIV
            TAB4INAKTIV
            TAB5INAKTIV
            TAB6INAKTIV

        ElseIf AktivesTab& = 3

            TAB1INAKTIV
            TAB2INAKTIV
            TAB3INAKTIV
            TAB4AKTIV
            TAB5INAKTIV
            TAB6INAKTIV

        ElseIf AktivesTab& = 4

            TAB1INAKTIV
            TAB2INAKTIV
            TAB3INAKTIV
            TAB4INAKTIV
            TAB5AKTIV
            TAB6INAKTIV

        ElseIf AktivesTab& = 5

            TAB1INAKTIV
            TAB2INAKTIV
            TAB3INAKTIV
            TAB4INAKTIV
            TAB5INAKTIV
            TAB6AKTIV

        
/a> EndIf EndWhile End

Greeting, Christian
 
XProfan 8/9.1, Win XP, AMD 64/3200
02/08/05  
 



 
- Page 3 -



Michael
Dell
Hi,

on Tac- Controls Schraub so did i strain rum, here the actually stood:
CompileMarkSeparation
Hier ein Beispiel wie man etwas einfacher die manchmal zahlreichen Controls auf Tabs umschalten kann!!!!
für jedes Tab gib es eine Basis-Static die den gesammten nutzbaren Bereich ausfüllt erst hierauf und nicht
auf dem eigenlichen Tab-Control werden alle anderen Controls eingerichtet
Def GSC(1)     !"USER32.DLL","GetSysColor"
Def gSelTab(1) SendMessage(&(1),$130B,0,0)       aktuelles Tab ermitteln
Def sSelTab(2) SendMessage(&(1),$130C,&(2),0)    neues Tab setzen
Declare tbc1&,stbc&[5],LastAcT&

Proc ChangeActTab

    Parameters TabNr&
    sSelTab(tbc1&,TabNr&)
    SetFocus(tbc1&)
    ShowWindow(stbc&[LastAcT&],0)   Deaktivieres zuletzt aktives Tab (Das Basis-Static für dieses Tab!!)
    ShowWindow(stbc&[TabNr&],1)  Aktiviere das nun aktive Tab (Das Basis-Static für dieses Tab!!)
    LastAcT& = TabNr&gSelTab(tbc1&)      Welches Tab ist nun Aktiv? (z.B.: durch anklicken)

EndProc

WindowStyle 538
Window Add(%maxX,10),0-640,480 Fenster ausserhalb erstellen
Cls GSC(15)
Aufbau der gesammten Tab-Controls und deren Kinder
tbc1&     = Control( "SysTabControl32","",$50010001,220, 20,400,360,   %HWnd,$a9000,%HInstance,$010000)Tab-Control erzeugen
InsertTab(tbc1&,0,"Eins") Erstes Tab anlegen
InsertTab(tbc1&,1,"Zwei") weiteres Tab anlegen
InsertTab(tbc1&,2,"Drei") weiteres Tab anlegen
InsertTab(tbc1&,3,"Vier") weiteres Tab anlegen
stbc&[0]  = Control( "STATIC",              "",$50010006,  2, 24,396,334,   tbc1&,$a9001,%HInstance,$010000)Basis-Static für Tab0
Control( "STATIC","Tabulatortaste",$50000000, 20, 50,140, 18,stbc&[0],$a9001,%HInstance)Textfeld für Tab0
Control(   "EDIT",             "A",$50010000, 20, 80,140, 20,stbc&[0],$a9001,%HInstance,$010200)Edit für Tab0
Control(   "EDIT",             "B",$50010000, 20,110,140, 20,stbc&[0],$a9001,%HInstance,$010200)Edit für Tab0
Control(   "EDIT",             "C",$50010000, 20,140,140, 20,stbc&[0],$a9001,%HInstance,$010200)Edit für Tab0
ShowWindow(stbc&[0],0) Basis-Static für Tab0 deaktivieren
stbc&[1]  = Control( "STATIC",              "",$50010006,  2, 24,396,334,   tbc1&,$a9002,%HInstance,$010000)Basis-Static für Tab1
Control( "STATIC","Tabulatortaste",$50000000, 20, 50,140, 18,stbc&[1],$a9002,%HInstance)Textfeld für Tab1
Control("ListBox",              "",$50010000, 20, 80,140,120,stbc&[1],$a9002,%HInstance,$010200)ListBox für Tab1
ShowWindow(stbc&[1],0) Basis-Static für Tab1 deaktivieren
stbc&[2]  = Control( "STATIC",              "",$50010006,  2, 24,396,334,   tbc1&,$a9003,%HInstance,$010000)Basis-Static für Tab2
Control( "STATIC",     "Text zu 3",$50000000, 20, 50,140, 18,stbc&[2],$a9003,%HInstance)Textfeld für Tab2
Control(   "EDIT",             "D",$50010000, 20, 80,140, 20,stbc&[2],$a9003,%HInstance,$010200)Edit für Tab0
ShowWindow(stbc&[2],0) Basis-Static für Tab2 deaktivieren
stbc&[3]  = Control( "STATIC",              "",$50010006,  2, 24,396,334,   tbc1&,$a9004,%HInstance,$010000)Basis-Static für Tab3
Control( "STATIC",     "Text zu 4",$50000000, 20, 50,140, 18,stbc&[3],$a9004,%HInstance)Textfeld für Tab3
Control(   "EDIT",             "F",$50010000, 20, 80,140, 20,stbc&[3],$a9004,%HInstance,$010200)Edit für Tab0
ShowWindow(stbc&[3],0) Basis-Static für Tab3 deaktivieren
LastAcT& = gSelTab(tbc1&)      speichern des zuletzt aktiven Tabs!
ShowWindow(stbc&[LastAcT&],1)  dessen Basis-Static aktivieren
Window 0,0-640,480 Fenster in den sichtbaren Bereich

WhileNot Or(Equ(%Key,2),Equ(%MenuItem,-2))          warte auf Beenden (X)

    WaitInput
    Case TabChanged(tbc1&): ChangeActTab(gSelTab(tbc1&))  Wenn Tabs verändert, Anzeige aktuallisieren

EndWhile

DestroyWindow(tbc1&)                                Zerstöre Tab-Control und alle Kinder
f='./../../references-fonction/XProfan/end/'>End

Nachtrag: small improvement - 09.02.05 / 3:10

Salu

Michael...
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
02/08/05  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.129 Views

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