From 34c84ce659d2c13bd603a8d77bbb3a98ee49128a Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 27 Apr 2014 21:33:48 -0400 Subject: [PATCH] More future plans and a clarification in the block comment at the top of uitask_windows.go. --- futureplans.md | 6 ++++-- uitask_windows.go | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/futureplans.md b/futureplans.md index ec36960..71c66ba 100644 --- a/futureplans.md +++ b/futureplans.md @@ -458,6 +458,8 @@ interesting things - on the cost of creating and maintaining windows http://blogs.msdn.com/b/oldnewthing/archive/2005/03/15/395866.aspx - more on version checks http://blogs.msdn.com/b/oldnewthing/archive/2005/04/13/407835.aspx - on hInstance in CreateWindow()/RegisterClass() http://blogs.msdn.com/b/oldnewthing/archive/2005/04/18/409205.aspx +- on the DC brush (useful for drawing controls) http://blogs.msdn.com/b/oldnewthing/archive/2005/04/20/410031.aspx +- the new scratch program (probably want to move to the top list if it proves useful enough) http://blogs.msdn.com/b/oldnewthing/archive/2005/04/22/410773.aspx articles on time - http://blogs.msdn.com/b/oldnewthing/archive/2004/02/26/80492.aspx @@ -467,5 +469,5 @@ articles on time - http://blogs.msdn.com/b/oldnewthing/archive/2005/04/15/408507.aspx up to -http://blogs.msdn.com/b/oldnewthing/default.aspx?PageIndex=348 -last one: When people ask for security holes as features: Hiding files from Explorer +http://blogs.msdn.com/b/oldnewthing/default.aspx?PageIndex=347 +last one: Thread messages are eaten by modal loops diff --git a/uitask_windows.go b/uitask_windows.go index ad8404f..f7a6ad5 100644 --- a/uitask_windows.go +++ b/uitask_windows.go @@ -14,8 +14,8 @@ problem: messages have to be dispatched on the same thread as system calls, and possible: solution: use PostThreadMessage() to send uimsgs out to the message loop, which runs on its own goroutine (I had come up with this first but wanted to try other things before doing it (and wasn't really sure if user-defined messages were safe, not quite understanding the system); nsf came up with it independently and explained that this was really the only right way to do it, so thanks to him) -problem: if the thread isn't in its main message pump, the thread message is simply lost -this happened when scrolling Area +problem: if the thread isn't in its main message pump, the thread message is simply lost (see, for example, http://blogs.msdn.com/b/oldnewthing/archive/2005/04/26/412116.aspx) +this happened when scrolling Areas the only recourse, and the one both Microsoft (http://support.microsoft.com/kb/183116) and Raymond Chen (http://blogs.msdn.com/b/oldnewthing/archive/2008/12/23/9248851.aspx) suggest (and Treeki/Ninjifox confirmed), is to create an invisible window to dispatch messages instead.