Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / April 2005

Tip: Looking for answers? Try searching our database.

How to open an editor document without a file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shimon - 01 Mar 2005 07:55 GMT
Hi,

I wish to open a document window without attaching it to a file. How can i
do this?

For example, i would like to click on a toolbar button to open the document,
without attaching a file to it (i wish to present a data that is already in
memory, and this data is readonly).

BTW: I am working on VSIP 7.1, with the managed package (c#).

Thanks,
Shimon
Bill Foust - 08 Mar 2005 14:16 GMT
I tried to do this as well and was basically told that you cant. So I create
a temp file and hook into the document notifications so that when the
document is saved for closed, I koad a seperate copy and grab the contents.

Bill

> Hi,
>
[quoted text clipped - 9 lines]
> Thanks,
> Shimon
Chris Lovett - 17 Apr 2005 07:59 GMT
Actually, I found that you can use
IVsUIShellOpenDocument::OpenDocumentViaProjectWithSpecific editor then using
the IVsHierarchy that you get back you can make the document act like it has
no file yet (like a miscellaneous file) by setting properties
onIVsUIHierarchy , namely:
   VSHPROPID_IsNewUnsavedItem = true
   VSHPROPID_Caption = whatever you want
and you can set the VSFPROPID_OwnerCaption on the returned IVsWindowFrame to
whatever you want.
Then when the user tries to save the file they will be prompted for a file
name.

>I tried to do this as well and was basically told that you cant. So I
>create
[quoted text clipped - 20 lines]
>> Thanks,
>> Shimon

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.