Re: [BLACKBOX] Long running command and Dialog.ShowStatus

From: [at]} <Robert>
Date: Thu, 3 Dec 2009 21:46:39 +0000

----boundary-LibPST-iamunique-1730748632_-_-
Content-type: text/plain

Josef

Your solution looks interesting to me ...

Two questions:

1) Why did you omit the "Win.TranslateMessage(msg)" call? Or maybe I should be
asking Chris why he put it in?

2) Do you know how to modify your example so that it only interrupts with
"Ctrl-Break", and not with just any keyboard action?

Regards

Robert


Josef Templ wrote:
> Thanks to Chris I was able to solve the problem of
> missing status bar updates in a long running command. The solution he
> suggested is to process the Windows event queue
> from time to time and it works just fine.
> The enclosed test program contains a solution that (1) blocks the app
> while the long running command is active
> and (2) that allows to interrupt the command by the user.
> I did not want to process input events such as mouse clicks
> or keybourd inputs while the command is running because
> this may invalidate assumtions made when the command
> was started.
>
> - Josef
>
>
> StdCoder.Decode ..,, ..ng....3Qw7uP5PRPPNR9Rbf9b8R79FTvMf1GomCrlAy2xhX,Cb2x
> hXhC6FU1xhiZiVBhihgmRiioedhgrZcZRiXFfaqmSrtuGfa4700zdGrr8rmCLLCJuyKtYcZRiX
> 7.2.s,6iJ.0k,5TWyql.bnayKmKKqGomC5XzET1.PuP.MHT9N9ntumaU2,CJuyKtQC98P9PP7O
> NbXmb.2.oU8k2Ezb.0E.cUGpmWLuOpoKqvCbHZiYpedhA704TeKKw.bHfEWUmL.6..D.FR0E.C
> cIhgsNHT9N9ntQ8qorG4704D.CbB,708T1U.ENT.T.Jx,2U.2.Aq0U00.bnUGLu8ro8quGrmCL
> WKqtE0E.kJU.EDE.0.4.AcmBhVZBtfj1.0E65.A4AU0KyBU.2.e12.u,2..42.E.07s.kBk.W,
> 0E3E,8Mtr.2.S00E.c46.,.16.c8mLT5.2UE0K,CE,9z4E.0.L20.p.0.z50EJ.6.V2Q0sRc.J
> E.0U12.gY..k6UEU0Q.AU9U0A,6A2U0w0cCc.Z.,sBc.B,561c.H.S24.YU0KyB.,UqV.2.u,2
> ..42.E.mP,U02.4Ec6.u.4k0E,m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YmhAHtCPM0HfP.KaUU4BcARe3RbBA
> V4xdG3Yd3YugbU2aUYeD3Yn2ak2Y2,VeQTvM.UcAhiZC.amRqk2akYOIEaKr.EEGJYKIbqk2aU
> 2BBkX.aKrGrm.IYg.80Uv,sP..HcI98JfeIRO1HM090rN1HM0BuHIhUIbx22kM0HM0HM01,7F0
> GIeWdphXJiZBgnhgUAha3YtxhpJiUghVRgcBhihgUAhn3YaBgnZiZJiUIZd..CJu8rosQRNGR9
> RduPb8RZPO2ZdZZUQidQbBEW.CJoyqvCJu4KuKrtWGFqqtSKEqHE8GEiGECrIqk2KIbg,2Y2xh
> vgVBgcCZ6dONbHaELqk48EeKqtG56FTP13QwdONQcjphoJijZhghgmRiiQ8CIu8LqGomCrl0ks
> H3..RtETfPd16F9vQ59.C24485Et...ktu0.Y62Umb.,E.E8E.k22.,6..M.3Qwd0ZORNPNZvQ
> RtIIepZBG20ksH3.bf9ZORNPNG20EtD.0E.ses,sc6.,k,,UnpZHldGrwmqmGomCrl0ks,Uikw
> m46.Zz,E..W.e32.86.c918R.Y6bvM,E0E...7,,M.,.,.,tcp00Eyu9zwPA.A.2U.E,9z4U..
> .p.0.4.I3t1,U.2m,.,.E4WDN.Ntarm3Wj.Jklbcjlq.5uP..I0,U...F.,.aU.E.TptM65J.n
> T32kwL,,sKFHKHGA,p11...
> --- end of encoding ---
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.709 / Virus Database: 270.14.91/2542 - Release Date: 12/03/09 07:32:00
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1730748632_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXR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wYXINCj4gLnAuMC40LkkzdDEsVS4ybSwu
LC5FNFdETi5OdGFybTNXai5Ka2xiY2pscS41dVAuLkkwLFUuLi5GLiwuYVUuRS5UcHRNNjVKLm5c
cGFyDQo+IFQzMmt3TCwsc0tGSEtIR0EscDExLi4uXHBhcg0KPiAtLS0gZW5kIG9mIGVuY29kaW5n
IC0tLVxwYXINCj4gXHBhcg0KPiBccGFyDQo+IC0tLS1ccGFyDQo+IFRvIHVuc3Vic2NyaWJlLCBz
ZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIFxwYXINCj4gTElT
VFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0KPiBccGFyDQo+IFxwYXINCj4gLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tXHBhcg0KPiBccGFyDQo+IFxwYXINCj4gTm8gdmlydXMgZm91bmQgaW4gdGhpcyBpbmNvbWlu
ZyBtZXNzYWdlLlxwYXINCj4gQ2hlY2tlZCBieSBBVkcgLSB3d3cuYXZnLmNvbSBccGFyDQo+IFZl
cnNpb246IDkuMC43MDkgLyBWaXJ1cyBEYXRhYmFzZTogMjcwLjE0LjkxLzI1NDIgLSBSZWxlYXNl
IERhdGU6IDEyLzAzLzA5IDA3OjMyOjAwXHBhcg0KPiBccGFyDQpccGFyDQpccGFyDQotLS0tXHBh
cg0KVG8gdW5zdWJzY3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFD
S0JPWCIgdG8gTElTVFNFUlZATElTVFMuT0J9fQBLS3cuYkhmRVdVbQ==
----boundary-LibPST-iamunique-1730748632_-_---
Received on Thu Dec 03 2009 - 22:46:39 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:40 UTC