diff options
| author | Pietro Gagliardi <[email protected]> | 2014-06-03 11:00:29 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-06-03 11:00:29 -0400 |
| commit | ea95d5559de8017300994c2866f3edb1578e717c (patch) | |
| tree | fee1d92ebc81ff3b2d7f390ef3b5d904e271b04e | |
| parent | a46668ca22cc1407177eb559288744ea0d6a96dc (diff) | |
Migrated dialog_windows.go to the new string handling.
| -rw-r--r-- | dialog_windows.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dialog_windows.go b/dialog_windows.go index 9d529a5..91507d3 100644 --- a/dialog_windows.go +++ b/dialog_windows.go @@ -5,8 +5,6 @@ package ui import ( "fmt" "os" - "syscall" - "unsafe" ) // TODO change what the default window titles are? @@ -22,14 +20,16 @@ func _msgBox(primarytext string, secondarytext string, uType uint32) (result int text += "\n\n" + secondarytext } uType |= _MB_TASKMODAL // make modal to every window in the program (they're all windows of the uitask, which is a single thread) + ptext := toUTF16(text) + ptitle := toUTF16(os.Args[0]) ret := make(chan uiret) defer close(ret) uitask <- &uimsg{ call: _messageBox, p: []uintptr{ uintptr(_NULL), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(text))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(os.Args[0]))), + utf16ToArg(ptext), + utf16ToArg(ptitle), uintptr(uType), }, ret: ret, |
