Ooops
January 21, 2021, 02:39:36 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Buttons with multiple lines of text by Cold Harbour [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Buttons with multiple lines of text by Cold Harbour [ 1+ years ago ] (Read 1233 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Buttons with multiple lines of text by Cold Harbour [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:42 AM »
Title :
Buttons with multiple lines of text
Author :
Cold Harbour
Posted :
1+ years ago
Description :
Allows you to have button text on multiple lines.
Code :
Code: BlitzBasic
; .lib "User32.dll"
; GetWindowLong% (hwnd%, nIndex%) : "GetWindowLongA"
; SetWindowLong% (hwnd%, nIndex%, dwNewLong%) : "SetWindowLongA"
Const
BM_SETSTYLE =
244
Const
GWL_STYLE = -
16
Const
BS_MULTILINE =
8192
win=CreateWindow
(
"Win"
,
10
,
10
,
600
,
600
,main,
15
)
b1=Createmultibutton
(
"A quite long bit of text to show multlineness"
,
10
,
10
,
80
,
70
,win,
1
)
b2=Createmultibutton
(
"A quite long bit of text to show multlineness"
,
10
,
100
,
90
,
70
,win,
2
)
b3=Createmultibutton
(
"A quite long bit of text to show multlineness"
,
10
,
200
,
80
,
70
,win,
3
)
While
WaitEvent
(
10
)
<>$803
Wend
End
Function
Createmultibutton
(
name$, x, y, w, h, p,style
)
button = CreateButton
(
name, x, y, w, h, p,style
)
hwnd = QueryObject
(
button,
1
)
SetWindowLong
(
hwnd, GWL_STYLE, GetWindowLong
(
hwnd, GWL_STYLE
)
Or
BS_MULTILINE
)
;force button redraw kludge
SetGadgetShape button,GadgetX
(
button
)
,GadgetY
(
button
)
,GadgetWidth
(
button
)
+
1
,GadgetHeight
(
button
)
SetGadgetShape button,GadgetX
(
button
)
,GadgetY
(
button
)
,GadgetWidth
(
button
)
-
1
,GadgetHeight
(
button
)
Return
button
End Function
Comments :
none...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Buttons with multiple lines of text by Cold Harbour [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal