I do need the more complex behavior as you mention. So programatically I created a panel with a table control, a string control, an Ok and a Cancel button. These NewCtrl() functions are then followed by a do{} loop in which I use the GetUserEvent() function.
BTW - this is all done during application initialization and setup, before RunUserInterface() is called.
The control mode of the table control and both command buttons are set to Hot. I want it to behave like a FileSelectPopup() so I have a "do" loop right after the panel and control setup, in which I am using the GetUserEvent() function.
Like I mentioned, to make this modal, I am using the GetUserEvent() function inside a "do" loop. I would also like the function to get the name of th
e file selected from the table by the user and display it in the string control. This is, of course, inside the same "do" loop. So that when the user generates an event on the table, the GetUserEvent() will catch it and I can get the filename, and put it in the string control. However, the GetUserEvent() function only catches an EVENT_COMMIT or events queued by QueueUserEvent (1000 thru 10000). Since I am selecting a file in the table, not changing the name, an EVENT_COMMIT is not generated, only an EVENT_LEFT_CLICK or something like that.
So I tried installing a control callback to the table, TableCallback, and inside the TableCallback function I use QueueUserEvent to put an event on the queue. But the program never gets to the TableCallback (perhaps because RunUserInterface() has not been executed), and so it never queues the event and it never gets caught by the GetUserEvent(). So the only controls that work are the Ok and Cancel buttons.
How can I catch an event from my
table to allow me to get the selected filename and put it in the string control?
Thanks.