| |
|
|
Jörg Sellmeyer | Repariert
'Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) into Babyklappe on XProfan.com stored:
'TabControl with Reitern same wide create
DEF SetWindowLong(3) !"User32","SetWindowLongA"
DEF GetWindowLong(2) !"User32","GetWindowLongA"
DEF &WM_CLOSE $010
DEF &TCM_SETITEMSIZE $01329
DEF &TCS_FIXEDWIDTH 1024
DEF &TCS_MULTILINE $0200
DEF &TCM_GETITEMCOUNT $01304
DEF &GWL_STYLE -16
DEF MakeLong(2) (&(1) | &(2) << 16)
Declare Ende&,Tab&,TabItems&
Window Style 538
Cls
Tab& = Create("TABCTRL",%hwnd,"1",10,10,400,300)
InsertTab(Tab&,1,"2")
InsertTab(Tab&,2,"3")
'Window Style strain circa solid wide and Multi Line
'the means any Tabreiter are same wide
SetWindowLong(Tab&,&GWL_STYLE,(GetWindowLong(Tab&,&GWL_STYLE) | (&TCS_FIXEDWIDTH | &TCS_MULTILINE)))
'Number of Tabreiter detect
TabItems& = SendMessage(Tab&,&TCM_GETITEMCOUNT,0,0)
'wide and Hoehe settle
'Par1 with MakeLong is the wide
'Par2 with Makelong is the Höhe
SendMessage(Tab&,&TCM_SETITEMSIZE,0,MakeLong(Width(Tab&)/TabItems&-2,20))
User Messages &WM_CLOSE
Whilenot Ende&
Waitinput
If %UMessage = &WM_CLOSE
End
Endif
EndWhile
End
|
|
|
| |
|
|