Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uwm.edu!bionet!ames!claris!szebra!zanzibar!psheerin From: psheerin@zanzibar.saigon.com (Peter K. Sheerin) Newsgroups: comp.windows.ms Subject: Re: give me solid facts: why is the mac better than MeSsy DOS/WINDOW Message-ID: Date: 3 Apr 91 04:25:12 GMT References: <1991Apr2.002941.5578@leland.Stanford.EDU> Organization: Zanzibar - 1/2 mile away from 52'nd Street Lines: 34 aaron@jessica.stanford.edu (Aaron Wallace) writes: > > Windows *can* do it the Mac way--why Microsoft didn't choose to add the > functionality is beyond me. I put it in an editor I'm working on and it > took about 10-20 lines of simple code. You basically get the handle of the > previous instance and send it a message with the file to be opened. > > Seems to work fine for me--throw the file at the program, and if it > wants to hand it over to a previous instance, it can. If it wants to keep > it to itself, no problem either. In my editor either behavior can be > defined; you can also have a dialog box ask what to do with the file. > And none of it involves any hacks as described below; it's all simple IPC. > > >Actually, the way the Mac actually implements the equivalent functions > >is gross: it involves faking out a *dialog box call* after searching > >down the application's menu for the File:Open item. On the other hand, > >at least there *is* a standard call to get a file on the Mac. > > Aaron Wallace This sounds great, Aaron, and from the other program of yours I've seen (sounder), I can't wait 'till it's done! Funny, I just bounced that very same question off the author of WinEdit and Winbatch, hoping he might be able to do that in Winedit. It's on the wish list, but he claims that it would require winbatch to do a lot of mucking around with windows. Now I know better, thanks. I tried it on my own with winbatch, passing parameters, and such, but for some reason, it tried to open a dos window!.... Too bad, as it would be nice to accomplish this by faking menu picks to *any* program.Perhaps you could find a way? Or better yet, how about something to allow one to double click on a file that has no association, and choose what program to start it with. I'm not sure if that would be possible, but sure would be nice.