Converted direct usages of C.setWindowText() in the Windows Control code into calls to the equivalent Control methods so the text length can be properly stored.

This commit is contained in:
Pietro Gagliardi 2014-08-01 19:27:12 -04:00
parent 6e78eb94ba
commit e2b8fb81d6
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ func startNewButton(text string, style C.DWORD) *button {
c := newControl(buttonclass,
style | C.WS_TABSTOP,
0)
C.setWindowText(c.hwnd, toUTF16(text))
c.setText(text)
C.controlSetControlFont(c.hwnd)
b := &button{
controlbase: c,
@ -138,7 +138,7 @@ func finishNewLabel(text string, standalone bool) *label {
// controls are vertically aligned to the top by default (thanks Xeek in irc.freenode.net/#winapi)
C.SS_NOPREFIX | C.SS_LEFTNOWORDWRAP,
0)
C.setWindowText(c.hwnd, toUTF16(text))
c.setText(text)
C.controlSetControlFont(c.hwnd)
l := &label{
controlbase: c,