Message pumping question

#1
I have a plugin command which creates a modal dialog box (TCC doesn't return to the prompt). It's mostly idle but occasionally will write to the console with Printf(), run a batch file with Command(), or do a CLS.

When a batch file is running mouse works fine. I can click on an "Abort" button, the plugin generates a CTRL_C_EVENT, the batch file is cancelled, and the dialog returns to its idle state. Under the same conditions, I can <Tab> to the "Abort" button (at a low level, TCC never sees it) but once there, <Enter> won't work. This is regardless of whether the dialog box was started in TCC's main thread or in a separate thread created by the plugin command. Rex, in this second case, do you know why the button control, apparently with focus, doesn't get the <Enter>?
 

rconn

Administrator
Staff member
May 14, 2008
10,551
97
#2
vefatica wrote:

> I have a plugin command which creates a modal dialog box (TCC doesn't
> return to the prompt). It's mostly idle but occasionally will write to
> the console with Printf(), run a batch file with Command(), or do a CLS.
>
> When a batch file is running mouse works fine. I can click on an "Abort"
> button, the plugin generates a CTRL_C_EVENT, the batch file is
> cancelled, and the dialog returns to its idle state. Under the same
> conditions, I can to the "Abort" button (at a low level, TCC never sees
> it) but once there, won't work. This is regardless of whether the dialog
> box was started in TCC's main thread or in a separate thread created by
> the plugin command. Rex, in this second case, do you know why the button
> control, apparently with focus, doesn't get the ?
There seem to be some critical words missing from your question (you can
*what* to the abort button; and the button control doesn't get what?).

TCC, like every console app, has no access to or control over the
Windows message queue (thanks, Microsoft!). You can call the
tty_yield() function if you're in a loop and want to give other
processes a chance to do something.

Rex Conn
JP Software
 
May 30, 2008
42
0
#3
From: rconn
Sent: Thursday, July 31, 2008 8:49 AM
Subject: RE: [Plugins-t-363] Message pumping question

>
> There seem to be some critical words missing from your question (you can
> *what* to the abort button; and the button control doesn't get what?).
Ha ha! You just got downloaded by the forum system.

Rex, Vincent's words were in angle brackets. He can Tab to the abort button
but Enter doesn't work. Put less-than and greater-than around them and
something, somewhere things they're rogue HTML tags and strips them out.

Jonathan Gilbert
 
Jun 10, 2008
35
0
#4
rconn <> wrote:

> TCC, like every console app, has no access to or control over the
> Windows message queue (thanks, Microsoft!).
This is not wrong but also not entirely correct. While a console app has
no *direct* access to its underlying message queue, it can subclass
other windows... including its own main window.

And given that many messages are sent and not posted, in many cases
subclassing may be the better strategy anyway.

--
cheers thomasl

web: http://thomaslauer.com/start
 
#5
logic wrote:
| From: rconn
| Sent: Thursday, July 31, 2008 8:49 AM
| Subject: RE: [Plugins-t-363] Message pumping question
|
|
| ---Quote---
||
|| There seem to be some critical words missing from your question (you
|| can *what* to the abort button; and the button control doesn't get
|| what?).
| ---End Quote---
| Ha ha! You just got downloaded by the forum system.
|
| Rex, Vincent's words were in angle brackets. He can Tab to the abort
| button but Enter doesn't work. Put less-than and greater-than around
| them and something, somewhere things they're rogue HTML tags and
| strips them out.

I read Vince's post via Outlook Express, as email, and the angle-bracketed
text was present, both when viewed as plain text and when viewed as HTML. In
Rex' reply the quotation did not include them. This appears to be a bug in
the forum software.

I have another problem with the new Forum system. By getting messages as
mail, I can respond to the NG, but I cannot respond to the poster alone. I
Outlook Express, ctrl-R is "reply to sender", ctl-shift-R is "reply to all"
(i.e. sender and all others in adress list), and ctrl-G is "reply to Group",
the last one available only in news groups. Thunderbird has similar
features. In the new "mail:" forum the "reply to sender" is actually
performs "reply to group", and true "reply to sender" is unavailable.
--
Steve
 

samintz

Scott Mintz
May 20, 2008
1,275
11
Solon, OH, USA
#6
Except, console "windows" don't play by the normal Windows rules. You
can't subclass a console window. The console handler yanks control back.
Rex has implemented some very sophisticated technology in TCMD to be able
to accomplish what he has.

-Scott

thomasl <> wrote on 07/31/2008 11:18:40 AM:


> rconn <> wrote:

> Quote:
>
> > TCC, like every console app, has no access to or control over the
> > Windows message queue (thanks, Microsoft!).
>
> This is not wrong but also not entirely correct. While a console app has
> no *direct* access to its underlying message queue, it can subclass
> other windows... including its own main window.
>
> And given that many messages are sent and not posted, in many cases
> subclassing may be the better strategy anyway.
>
> --
> cheers thomasl
>
> web: http://thomaslauer.com/start
>
>
 
#7
Rex wrote

"There seem to be some critical words missing from your question (you can
*what* to the abort button; and the button control doesn't get what?)."

vBulletin strikes again!

Missing were <Tab> and <Enter>.
 
#8
On Thu, Jul 31, 2008 at 12:24 PM, vefatica <> wrote:

> Missing were and .

It appears that the actual message said "TAB" with brackets:
left-angle-bracket, T, A, B, right-angle-bracket, but that was removed
by the time it got to me in email. The other one was "ENTER" similarly
bracketed.

I wonder how much more I'm missing by the time I read the mail.
 

rconn

Administrator
Staff member
May 14, 2008
10,551
97
#9
vefatica wrote:

> Rex wrote
>
> "There seem to be some critical words missing from your question (you can
> *what* to the abort button; and the button control doesn't get what?)."
>
> vBulletin strikes again!
>
> Missing were and .
If you're using HTML, don't use the angle brackets!

Rex Conn
JP Software
 
#11
Jim Cook wrote:
| On Thu, Jul 31, 2008 at 12:24 PM, vefatica <> wrote:
|
|
| ---Quote---
|| Missing were and .
| ---End Quote---
|
| It appears that the actual message said "TAB" with brackets:
| left-angle-bracket, T, A, B, right-angle-bracket, but that was removed
| by the time it got to me in email. The other one was "ENTER" similarly
| bracketed.
|
| I wonder how much more I'm missing by the time I read the mail.

I receive NG messages by mail. Vince's original message, when displayed in
Outlook Express either as plain text or as html showed both the TAB and the
ENTER in angle brackets correctly.

I don't know whether or not Vince used HTML to compose the message.
--
Steve
 
#12
The message below was sent by email to this NG at 11:12 EDT, but was either
not posted, or not sent back to me.


logic wrote:
| From: rconn
| Sent: Thursday, July 31, 2008 8:49 AM
| Subject: RE: [Plugins-t-363] Message pumping question
|
|
| ---Quote---
||
|| There seem to be some critical words missing from your question (you
|| can *what* to the abort button; and the button control doesn't get
|| what?).
| ---End Quote---
| Ha ha! You just got downloaded by the forum system.
|
| Rex, Vincent's words were in angle brackets. He can Tab to the abort
| button but Enter doesn't work. Put less-than and greater-than around
| them and something, somewhere things they're rogue HTML tags and
| strips them out.

I read Vince's post via Outlook Express, as email, and the angle-bracketed
text was present, both when viewed as plain text and when viewed as HTML. In
Rex' reply the quotation did not include them. This appears to be a bug in
the forum software.

I have another problem with the new Forum system. By getting messages as
mail, I can respond to the NG, but I cannot respond to the poster alone. I
Outlook Express, ctrl-R is "reply to sender", ctl-shift-R is "reply to all"
(i.e. sender and all others in adress list), and ctrl-G is "reply to Group",
the last one available only in news groups. Thunderbird has similar
features. In the new "mail:" forum the "reply to sender" is actually
performs "reply to group", and true "reply to sender" is unavailable.
--
Steve
 
#13
There seem to be some critical words missing from your question (you can
*what* to the abort button; and the button control doesn't get what?).

Those words, which were <Tab> and <Enter>, appeared in the email I received. I believe Steve reported the same. And I see them when I read my post on the web interface. I don't see a problem.