English
Forum

Column from gridBOX read

 

Joerg
Hello dear XProfan,

can The Spaltenbreiten of/ one GridBOX read? i want these gladly at leave the program secure...

thanks and greetings!!
Jörg

(XProfan X3.1/Win10 x64)
 
06/28/16  
 




Georg
Teles
Nabend

Hmm Sendmessage have I yet never so uses, but so funktionierts In any drop
'~LVM_GETCOLUMNWIDTH
'1. Parameter: index the column
'2. Parameter: must 0 his !
 $H commctrl.ph
CLS
declare grid&
grid& = Create("gridbox",%HWnd,"eins;0;50;zwei;1;75;drei;2;100",0,5,50,400,200)
addstring(grid&,"11|22|33")

while 1

    waitinput
    locate 0,0
    print "1. slot: "+Str $(SendMessage(grid&,~LVM_GETCOLUMNWIDTH,0,0))+" Pixel           "
    print "2. slot: "+Str $(SendMessage(grid&,~LVM_GETCOLUMNWIDTH,1,0))+" Pixel           "
    print "3. slot: "+Str $(SendMessage(grid&,~LVM_GETCOLUMNWIDTH,2,0))+" Pixel           "

endwhile

waitinput

Hello
 
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

06/28/16  
 




Joerg
Hello Georg,

this is lovely, many Thanks! ought to me Perhaps too time with the Header-Files keep busy... can You a understandable introduction into Topic recommend? in the XProfan Help becomes the Yes only short described...

over again thanks!
Greeting Jörg
 
06/29/16  
 




Georg
Teles
gladly happen --- Einführungstechnisch would I you List view.DLL of Frank recommend, unfortunately find I The DLL in the Forum straight not, knows ditto not which Version The latest is, have tappt im dunkeln never used, have tappt im dunkeln but in my archive somewhere, must time thereafter search ...

otherwise there here The Header File  [...]  or You work you directly here through  [...] 

Regards
 
XProfan X3
TC-Programming [...] 
XProfan 8.0 - 10.0 - X2 - X3 - X4

06/29/16  
 




RGH
there The Messages Yes not part of/ one Programming-Language are, separate part the windows-API, finds one many Information with Microsoft yourself, though mostly in English.
me has at develop of XProfan the following German book very helped:

Richard J. Simon, windows 95/windows NT API Bible, volume 2: Steuerelemente & Messages, SAMS 1996

the 1088 pages strong Werk has then 129 DM (ca. 66€) cost[ed] and is with something Happiness yet used available. it has one very übersichtliches table of contents and a very good tab. any Messages go ausführlichst, teils with Examples in C, described. To eachone group of Steuerelementen there first of all a introduction and Overview.

(volume 1 is too recommendable: Win 32 Programming.)

Greeting
Roland
 
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
06/29/16  
 




Joerg
...cordial Thanks for Your Tipps! this is plenty material! Frank bid The DLL to that Download on its Website on. the angesprochene book have I objectively yet found. the groin I me as slight verdauliche Urlaubslektüre

greetings!
Jörg
 
06/30/16  
 




H.Brill
ex XProfanX2 do you need really quite no
Include or .ph for List view.dll. Höchstens
for couple self-defined functions in the
.inc. ex X2 is ImportDll() your Feund.

example :
Declare lever dll, grid, btn1, btn2, btn3
Declare String TArray[], File, sp1, sp2, sp3, entry
Declare Int end, offset
Declare Memory area
Declare dll&
Dim area, 12' for 3 Stringadressen
dll  = ImportDll($PROGDIR + "Listview.dll", "")
User Messages $10
sp1 = "Name"
sp2 = "Ort"
sp3 = "Telefon"
end = 0
File = $PROGDIR + "\Adressen.csv"
Window Title "Adressen"
Window 600, 400
btn1 = @Create("Button", %HWnd, "Lade", 10, 10, 60, 25)
btn2 = @Create("Button", %HWnd, "Speichere", 80, 10, 80, 25)
btn3 = @Create("Button", %HWnd, "Clear",    170, 10, 80, 25)
grid  = CreateListview(%HWnd, %HInstance, 0, $ffffff, -1, $31)
IColumn(grid, sp1, 100, 0)
IColumn(grid, sp2, 320, 0)
IColumn(grid, sp3, 100, 2)
InitMessages(%HWnd)
EnableEdits(grid, 1 + 8)
InsertItems()
ShowListview(grid, 10, 80, 530, 200)

WhileNot end

    WaitInput

    If @Clicked(btn1)

        load()

    ElseIf @Clicked(btn2)

        save()

    ElseIf @Clicked(btn3)

        ClearList grid

    EndIf

    If %UMessage = $10

        end = 1

    EndIf

EndWhile

FreeDll dll
Dispose area
End

Proc load

    Declare Int bytes1, bytes2
    Declare String Header

    If FileExists(File)

        ClearList 0
        Move("FileToList", File)
        Header = GetString$(0, 0)' here have you got The Headerzeile
        DeleteString(0, 0)
        ClearList grid
        Move("ListToHandle", grid)

    Else

        save()

    EndIf

ENDPROC

Proc save

    Declare Memory area1
    Dim area1, 256
    Declare Int bytes1, bytes2, anzahlColumns
    Declare String Header
    anzahlColumns = GetColumns(grid)

    WhileLoop 0, anzahlColumns - 1

        Clear area1
        GetColumnName(grid, area1, &LOOP)

        If &LOOP < (anzahlColumns - 1)

            Header = Header + String $(area1, 0) + ","

        ElseIf &LOOP = (anzahlColumns - 1)

            Header = Header + String $(area1, 0)

        EndIf

    EndWhile

    ClearList 0
    AddStrings(0, Header)
    Move("HandleToList", grid)
    Move("ListToFile", File)
    Messagebox(File + " gespeichert", "Info", 0)
    Dispose area1

ENDPROC

Proc InsertItems

    Clear area
    Move("StringAdressenToMem", "Maier,Hamburg,4711", ",", area)
    SItem(grid, area, 3)
    Clear area
    Move("StringAdressenToMem", "Schmidt,Cologne,4712", ",", area)
    SItem(grid, area, 3)
    Clear area
    Move("StringAdressenToMem", "Klein,Frankfurt,4713", ",", area)
    SItem(grid, area, 3)
    Clear area
    Move("StringAdressenToMem", "Müller,Berlin,4714", ",", area)
    SItem(grid, area, 3)
    Move("StringAdressenToMem", "Blaubär,Düsseldorf,4715", ",", area)
    SItem(grid, area, 3)

ENDPROC

SUBPROC Move.StringAdressenToMem

    Parameters String s, String d, Memory B
    Declare Long number
    Dim$ 0
    ClearList 0
    Clear B, TArray[]
    number = Move("StrToList", s, d)
    number = Move("ListToArr", TArray[])
    Var Int z = 0

    WhileLoop 0, number - 1

        Long B, z = Addr(TArray[&LOOP])
        Inc z, 4

    EndWhile

    Return number

ENDPROC

 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
06/30/16  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.524 Views

Untitledvor 0 min.
Axel Berse08/26/21
iF10/31/20
rquindt04/30/18
Georg Teles04/23/17
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