diff --git a/futureplans.md b/futureplans.md index 5437bd9..14123e9 100644 --- a/futureplans.md +++ b/futureplans.md @@ -50,7 +50,7 @@ style changes: - I think this is a platform behavior... - should field descriptions in method comments include the receiver name? (for instance e.Held vs. Held) - see what Go's own documentation does - need to figure out exactly how to indicate that a struct{}{} is sent on an event channel (I use about six or so different wordings so far...) - - "package ui", "the package" + - "package ui", "the package", "ui package" (in code and comments) - also "library" both in docs and comments and code, etc. - make passing of parameters and type conversions of parameters to uitask on Windows consistent: explicit _WPARAM(xxx)/_LPARAM(xxx)/uintptr(xxx), for example - do this for type signatures in exported functions: (err error) or just error? diff --git a/sysdata_windows.go b/sysdata_windows.go index 9b0e25b..ba87edb 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -82,15 +82,16 @@ var classTypes = [nctypes]*classData{ }, c_label: &classData{ name: "STATIC", - // TODO add no-ellipsizing flags if I didn't do so already + // SS_NOPREFIX avoids accelerator translation; SS_LEFTNOWORDWRAP clips text past the end + // TODO find out if the default behavior is not to ellipsize style: _SS_NOPREFIX | _SS_LEFTNOWORDWRAP | controlstyle, xstyle: 0 | controlxstyle, }, c_listbox: &classData{ name: "LISTBOX", - // we don't use _LBS_STANDARD because it sorts (and has WS_BORDER; see above) - // _LBS_NOINTEGRALHEIGHT gives us exactly the size we want - // TODO say why we don't use LBS_MULTISEL (listbox docs and http://msdn.microsoft.com/en-us/library/windows/desktop/aa511485.aspx) + // we don't use LBS_STANDARD because it sorts (and has WS_BORDER; see above) + // LBS_NOINTEGRALHEIGHT gives us exactly the size we want + // LBS_MULTISEL sounds like it does what we want but it actually doesn't; instead, it toggles item selection regardless of modifier state, which doesn't work like anything else (see http://msdn.microsoft.com/en-us/library/windows/desktop/bb775149%28v=vs.85%29.aspx and http://msdn.microsoft.com/en-us/library/windows/desktop/aa511485.aspx) style: _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_VSCROLL | controlstyle, xstyle: _WS_EX_CLIENTEDGE | controlxstyle, altStyle: _LBS_EXTENDEDSEL | _LBS_NOTIFY | _LBS_NOINTEGRALHEIGHT | _WS_VSCROLL | controlstyle, @@ -160,7 +161,7 @@ func (s *sysData) make(window *sysData) (err error) { p: []uintptr{ uintptr(ct.xstyle), uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(classname))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(""))), // TODO can this be NULL? + uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(""))), // we set the window text later style, uintptr(_CW_USEDEFAULT), uintptr(_CW_USEDEFAULT), diff --git a/uitask_windows.go b/uitask_windows.go index f7a6ad5..f298e95 100644 --- a/uitask_windows.go +++ b/uitask_windows.go @@ -156,7 +156,7 @@ func makeMessageHandler() (hwnd _HWND, err error) { r1, _, err = _createWindowEx.Call( uintptr(0), uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(msghandlerclass))), - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(""))), // TODO can this be NULL? + uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr("ui package message window"))), uintptr(0), uintptr(_CW_USEDEFAULT), uintptr(_CW_USEDEFAULT),