Highlighted
Absent Member.
Absent Member.
722 views

[archive] how to stop 'Not Responding'

[Migrated content. Thread originally posted on 12 September 2006]

I suspect I am being thick here, but can anyone tell me how I can capture mouse clicks in a window where the program is in a busy file reading loop? Although I putup a 'Please Wait' message, if the user gets impatient and clicks in the window the 'not responding' message comes up in the title bar (presumably because I havent responded to the mouse click), then the user thinbks there is something wrong and terminates the job. Howdo I check for these mouse events so I can deal with them?
Keith
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] how to stop 'Not Responding'

Look up the configuration switch FILE_IO_PROCESSES_MESSAGES.
By default the cobol application does not process messages during IO to provide the fastest possible file performance. To respond to mouse clicks, you have to process messages which in turn will degredate your file performance.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] how to stop 'Not Responding'

Interestingly I added a call to test input keyboard status, and used w$getc to check for an escape key depressed, and found that the 'accept w-ans from input status' does trap a mouse click where the subsequent call to w$getc returns "-1". This does mean that the mouse click believes it has been noticed and the 'not responding' doesnt come up. Undocumented feature?
Regards
Keith
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] how to stop 'Not Responding'

It is not an undocumented feature. an ACCEPT does process messages, just using the FILE_IO_PROCESS_MESSAGES does. Altghough, you do need to do an accept if you want to process the mouse activity yourself.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.