On Thu, Feb 14, 2008 at 11:56 PM, TK Soh <[EMAIL PROTECTED]> wrote: > On Thu, Feb 14, 2008 at 10:55 PM, Mark Hammond > <[EMAIL PROTECTED]> wrote: > > MSDN documents that " For performance reasons, multiple notifications may > > be combined into a single notification. For example, if a large number of > > SHCNE_UPDATEITEM notifications are generated for files in the same folder, > > they can be joined into a single SHCNE_UPDATEDIR notification." > > > > which I suspect is your problem. I work on an app that makes heavy use of > > SHChangeNotify and handling the notifications and I've not had any > problems > > (other than some machines failing to SHChangeNotifyRegister, for reasons > > that escape me) > > Thanks for the tip. > > I just found out I was passing SHCNF_FLUSHNOWAIT flag to the calls. By > changing the flag to SHCNF_FLUSH, the icons are refreshed correctly > (at least most of the time). Though the delay on refreshing is > noticeable from one icon to the other. But that's not intolerable for > now. > > BTW, is there any ill effect in the use of SHCNF_FLUSH? I don't > understand the reason why SHCNF_FLUSHNOWAIT would not work though. > > I will experiment with SHCNE_UPDATEDIR to see if it help on this.
I tried passing SHCNE_UPDATEDIR to the parent dir of the icons, but the icons were not refreshed. Win32traceutil also didn't record any overlay icons requests. Here's how it was done: dir = os.path.dirname(path) pidl, ignore = shell.SHILCreateFromPath(dir, 0) print "notify: ", shell.SHGetPathFromIDList(pidl) shell.SHChangeNotify(shellcon.SHCNE_UPDATEDIR, shellcon.SHCNF_IDLIST | shellcon.SHCNF_FLUSH, pidl, None) Any thing I did wrong? _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32