Previous Thread
Next Thread
Print Thread
EVENTWAIT question/issue #37158 04 Mar 24 07:56 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content OP
Member
OP Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
Good day -

I am having an issue using eventwait in a dialog. This dialog has 2 clickable items (hyperlinks related to expanding a specific field contents) and the windows titlebar [X]. There is no update/save or any other action buttons. I am setting ctlid=0 since there is no default landing spot. (Tho i would like to assign the titlebar X as the default, any way to do this?). In any case, everytime I call it i get a exitcode = 99 which is an error condition. Currently not setting any opflags. Have verified i am setting parentid correctly as i know this is also a cause.

Advice on how to get this working? Any traces or debug flags what would provide addtl info?

TIA

Last edited by Frank; 04 Mar 24 07:57 PM.
Re: EVENTWAIT question/issue [Re: Frank] #37159 04 Mar 24 09:00 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
The GUI trace will show you some details about the EventWait operation. Usually that error 99 indicates that it can't find any control to put the focus on within the Parent group. You could put the focus on one of those clickable items, but you cannot put the focus on the title bar of a window. (That seems to be a Windows limitation.)

Another possibility in a dialog like this would be to use the EVW_NOFOCUS flag, or bypass EventWait entirely and just wait on the keyboard.

Re: EVENTWAIT question/issue [Re: Frank] #37160 04 Mar 24 09:19 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content OP
Member
OP Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
I could just use accept or got or something similar as long as i can get the exitcode info from the click events. I don't need a "tab-thru all the fields" functionality.

Re: EVENTWAIT question/issue [Re: Frank] #37161 04 Mar 24 09:24 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
You’d have to do your own exitcode translation with those routines. INFLD would do it for you but you’d probably want to make the field invisible.

Re: EVENTWAIT question/issue [Re: Frank] #37163 05 Mar 24 05:37 PM
Joined: Sep 2002
Posts: 5,450
F
Frank Online Content OP
Member
OP Online Content
Member
F
Joined: Sep 2002
Posts: 5,450
EVW_NOFOCUS did the trick, thanks!


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3