IniWrite is Slow in Dialog Callback Procedure
Keywords: IniWrite IniWritePvt Dialog Callback Procedure Slow Sluggish
Question:
Note: I am usually a little careful with what things can be done inside a dialog callback. I view it as being like being inside a "signal handler" in C -
be careful, and try to just set flags that tell some other part of the code to do any heavy lifting. That said, I should think that IniWrite() would be
pretty lightweight. Yet, today, I found that doing an IniWrite inside a callback (on a Pushbutton event) causes a long (2 to 5 second) delay. Any ideas why?
Answer:
The 'IniWrite' function sends a broadcasts message announcing the 'ini' file change to all processes with a message pump.
This is likely causing the function to delay it's return because the Dialog's message pump can't respond while inside the callback.
If the broadcast message is the cause, DialogProcOptions(1000) should correct the problem.
Article ID: W17770
Filename: IniWrite is Slow in Dialog Callback Procedure.txt
File Created: 2009:03:09:13:55:54
Last Updated: 2009:03:09:13:55:54