I assume you are talking about the OpenGeneric.
Yes, I forgot to say that ;-)
If so, that's not a good place, since the DnD will call OpenGeneric for every file, that means N times creation/destruction of the glass hour. The glass hour is being constructed though in the Dnd before' all the files are being submitted to OpenGeneric.
I try to explain better what I mean:
- place the houglass call in both OpenGeneric() and OnDropFiles()
- in OnDropFiles() is ok
- in OpenGeneric() place it at the first lines
- no problem if the function is called several times in OpenGeneric() by OnDropFiles()
From wxWidgets docs (
http://www.wxwindows.org/manuals/2.6.3/wx_dialogfunctions.html#wxbeginbusycursor):
These two calls (wxBeginBusyCursor and wxEndBusyCursor)
can be nested, and a counter ensures that only the outer calls take effect.And note that wxBusyCursor
works by calling wxBeginBusyCursor in the constructor, and wxEndBusyCursor in the destructorFor the other problem (about OnDropFiles()), it seems to be caused by:
because removing them, it is fixed.