summaryrefslogtreecommitdiff
path: root/redo/control_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-01 19:24:57 -0400
committerPietro Gagliardi <[email protected]>2014-08-01 19:24:57 -0400
commit6e78eb94bab6469b39162f3afcfef083d4e9b281 (patch)
tree82283d935f1b188c9c77561c2efafebce624624a /redo/control_windows.go
parent785d6ac4fd6d60113c0ad37b9b5cfbbe5b7f4abc (diff)
More Windows sizing framework code: merged together the MulDiv() instances into wrapper functions and added the basic text length storage into controlbase.
Diffstat (limited to 'redo/control_windows.go')
-rw-r--r--redo/control_windows.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/redo/control_windows.go b/redo/control_windows.go
index a2c55e2..3fdec5d 100644
--- a/redo/control_windows.go
+++ b/redo/control_windows.go
@@ -9,6 +9,7 @@ type controlbase struct {
*controldefs
hwnd C.HWND
parent C.HWND // for Tab and Group
+ textlen C.LONG
}
type controlParent struct {
@@ -50,5 +51,7 @@ func (c *controlbase) text() string {
}
func (c *controlbase) setText(text string) {
- C.setWindowText(c.hwnd, toUTF16(text))
+ t := toUTF16(text)
+ C.setWindowText(c.hwnd, t)
+ c.textlen = C.controlTextLength(c.hwnd, t)
}