Posted on 1998-11-07
In the following code, I set capture to a commend button and then call a help file by WinHelp function. I have found that after close the help file, the button losts the capture. So, I did SetCapture again.
Problem: the executing order is not as the order in the code! Perhaps it took long time to load the help file, the computer system just excuted the second SetCapture before calling WinHelp. I inserted DoEvents, but it didn't work at all. Infact the Capture of the button was lost again.
How can I get back the Capture?
WinHelp form1.hwnd, "Help.hlp", &H3, 0
I tried to replace DoEvents with MsgBox "...". In run time, I clicked OK in the MsgBox and got back the Capture. However, nobody like such a way.