Hi,

I have built an app that loads multiple files which have been selected in explorer and opened. This is achieved through WM_COPYDATA and a single instance app.

My problem is that when my main process performs its loading routines on numerous files, various controls are created. One of the controls uses GetDesktopWindow() as the parent argument of CreateWindowEx(). When the loading method gets to this line of code, it strangly jumps to the start of loading the next file.

If I output debug information at the beginning and end of each file load, my output looks as follows:

File1 begin load
File2 begin load
File3 begin load
File1 end load
File2 end load
File3 end load

Now if I remove the CreateWindowEx call that uses GetDesktopWindow(), then the output is as follows:

File1 begin load
File1 end load
File2 begin load
File2 end load
File3 begin load
File3 end load

Does anyone have any ideas what the hell is going on here? Thanks in advance.