From c3a87ab7134fbbdbc0792c0df8c9aa06b4713d8a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 4 Jun 2014 19:29:37 -0400 Subject: [PATCH] Resolved the ACTCTX_FLAG_SET_PROCESS_DEFAULT TODO by deciding to enable this flag for maximum safety. Also added more future plans. --- comctl_windows.go | 3 ++- futureplans.md | 1 + zconstants_windows_386.go | 1 + zconstants_windows_amd64.go | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/comctl_windows.go b/comctl_windows.go index b11c892..0e01ef4 100644 --- a/comctl_windows.go +++ b/comctl_windows.go @@ -55,7 +55,8 @@ func forceCommonControls6() (err error) { } actctx.cbSize = uint32(unsafe.Sizeof(actctx)) - // TODO set ACTCTX_FLAG_SET_PROCESS_DEFAULT? I can't find a reference to figure out what this means + // make this context the process default, just to be safe + actctx.dwFlags = _ACTCTX_FLAG_SET_PROCESS_DEFAULT actctx.lpSource = toUTF16(filename) r1, _, err := _createActCtx.Call(uintptr(unsafe.Pointer(&actctx))) diff --git a/futureplans.md b/futureplans.md index 2a1ae2a..f00ddc8 100644 --- a/futureplans.md +++ b/futureplans.md @@ -35,6 +35,7 @@ general list: - provide automated About, Preferneces, and Quit that place these in the correct location - Quit should pulse AppQuit - will probably want to bring back Event() as NewEvent() should that facility be necesary for menus, etc. +- figure out why at least the 64-bit build hates being run under Application Verifier issues of policy: - LineEdit heights on Windows seem too big; either that or LineEdit, Button, and Label text is not vertically centered properly diff --git a/zconstants_windows_386.go b/zconstants_windows_386.go index 422b320..677a45e 100644 --- a/zconstants_windows_386.go +++ b/zconstants_windows_386.go @@ -1,5 +1,6 @@ // autogenerated by windowsconstgen; do not edit package ui +const _ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const _AC_SRC_ALPHA = 1 const _AC_SRC_OVER = 0 const _BCM_GETIDEALSIZE = 5633 diff --git a/zconstants_windows_amd64.go b/zconstants_windows_amd64.go index 2a6d29c..8ba09be 100644 --- a/zconstants_windows_amd64.go +++ b/zconstants_windows_amd64.go @@ -1,5 +1,6 @@ // autogenerated by windowsconstgen; do not edit package ui +const _ACTCTX_FLAG_SET_PROCESS_DEFAULT = 16 const _AC_SRC_ALPHA = 1 const _AC_SRC_OVER = 0 const _BCM_GETIDEALSIZE = 5633