![]() |
| | #1 |
| Registered User Join Date: Oct 2006
Posts: 8
| WM_COPYDATA and mutex selecting multiple files * Create unique mutex from first program instance. * When next call (next file/folder) is made check for mutex and if it is already there use a sendmessage WM_COPYDATA to copy the file/foldername to the first instance. Now when I choose 16 or more items in explorer I get a windows warning message that it may take a long time and the computer may respond slowly (this message is triggered before my program is called, so it looks like a default message when selecting 16 or more files and folders and use them as input to one program). I can set a check to prevent the warning message next time, but I see a lot of programs where I can select 16 or more files at once without windows showing me a warning message. Anyone got an idea how to prevent this message maybe in code? I integrated my program in the explorer menu with shell command in the registry. As far as I know this is the most easy solution for selection multiple files and folders in explorer and use them as input to a program. If there are better solutions I would be happy to hear them. |
| gh0st is offline | |
| | #2 |
| CSharpener Join Date: Oct 2006
Posts: 5,336
| My guess - the problem is how many instances of your program windows has to open - one per file... You can try to use DDE - so only one instance for the first file will be opened... (look at file associations for .doc if word is installed for example) About every additinal file explorer will send a DDE message to the first instance of the program that can process it... More info can be found here for example: http://www.angelfire.com/biz/rhamini...c.html#HowOpen
__________________ If I have eight hours for cutting wood, I spend six sharpening my axe. |
| vart is offline | |
| | #3 |
| Registered User Join Date: Oct 2006
Posts: 8
| Thanks for your info. I want my program to handle all files and folder types and not associate it to a specific extension. I'm going to look into DDE now. Thanks |
| gh0st is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|