Page 1 of 1

PostPosted: Thu Jan 11, 2001 12:19 pm
by guy

Does anyone know whether guigetfocus returns the ID of the control to which the sip is directing input, or an ID representing the sip itself when a key is pressed.

I'm trying to track down why I can't detect the user pressing the enter key on the sip when they are typing into an edit control.

I check that guigetfocus() returns the ID for the edit control, that event() returns PM_CHAR, and that key() returns 13.

This works OK on my HPCPro, and seemed to work OK on the PPC (I got no bug reports from PPC users). It doesn't seem to work on the PocketPC with the V3 runtime (but curiously it's OK with the V2 runtime).

PM_CHAR messages relate to the control with focus, and not to the control returned by guiid().

Has anyone had any similar problems when trying to catch input into an edit control from the sip on a PocketPC?


Edited by - guy on 01/11/2001 06:20:25

PostPosted: Thu Jan 11, 2001 3:30 pm
by Justinespinosa
Hi Guy,
I didn't had the same problem. i used guiid() to know wich control has the key input and not guigetfocus()and it works fine.
i haven't got a PsPC.
But it results a sound if the control is not an ES_MULTILINE styled control.
So i create a multiline control, then i delete the two last chars (CR=13 +LF=10) in the string, but it's better to use if delete all the content in the edit box after getting it.

I have a question too.

I created an input box that is WS_POPUP, WS_CAPTION and WS_SYSMENU. I added an ExStyle i defined: WS_EX_OKBUTTON 0x80000000, but it wors like the context help button. I just get no event(), no guiid(), no getnotify(), no penx() or peny(), and it didn't delete the control.
Is it possible to know when a Ok button is pressed ?

I have already done the input box with only the "X" button and i stay in the event funct. until the control is deleted.
(It is not with the focus like in your exemple, because it deleted the control if i tapped on the screen, the start menu or if I run the input pannel with the Gigabar !, so I coulden't write anything in the Input Box !!)


OUTS Softwares

PostPosted: Fri Jan 12, 2001 7:56 am
by guy
You can't do anything with that OK button. I tried for ages.

That's why I'm trapping CR.

I had the control set to multiline. It works on my HPC. I've tried removing the multiline and sending my beta tester that version. I don't like not using multiline becuase it means you can't type tabs into the box.

I think that the problem relates to an old "subclassing" bug in the V3 runtime.