Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IPicture.SaveAsFile

106 views
Skip to first unread message

Michael (michka) Kaplan

unread,
Oct 31, 1999, 2:00:00 AM10/31/99
to
Actually, you are just looking for a StdPicture, IPicture, or
IPictureDisp object, such as the ones off of pictureboxes, etc.
:-)

Just set a reference to stdole2.tlb and it will be right there
waiting for you. :-)

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL!) :-)

random junk of dubious value, replica
error and problem fixing, and the
*TSI Form/Report to Data Access Page Wizard*, at:
http://www.trigeminal.com

Stephen Lebans <macarth...@nbnet.nb.ca> wrote in message
news:eXuJZ06I$GA.235@cppssbbsa05...
> I'm trying to call the IPicture interface SaveAsFile method.
I'm lost in
> the MSDN well of COM documentation trying to find out how to
create the
> pointer to the STREAM that is required for SaveAsFile.
>
> I'm looking at IStorage::OpenStream. Am I warm, hot or freezing
cold?
> :-)
>
> Thanks.
>
> --
> Stephen Lebans
> maca...@nbnet.nb.ca
> http://www.lebans.com
>
>

Michael (michka) Kaplan

unread,
Oct 31, 1999, 2:00:00 AM10/31/99
to
SavePicture is a stdole call. Try using IT instead..... just set
the ref and call

SavePicture ipd, "<your filename>

I do this sort of thing all the time with StdPicture and its
IPicture* equivalents.

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL!) :-)

random junk of dubious value, replica
error and problem fixing, and the
*TSI Form/Report to Data Access Page Wizard*, at:
http://www.trigeminal.com

Stephen Lebans <macarth...@nbnet.nb.ca> wrote in message

news:eDaYBZ8I$GA.203@cppssbbsa04...
> Michael, I'm misunderstanding a basic concept here. I've got
> my IPicture interface created via OleCreatePictureIndirect.
I've drawn
> into this Bitmap and now I want to add a File Save method to
the Class
> wrapper. I thought I could use the IPicture SaveAsFile method.
Is this
> method only for a StdPicture opened by an OLE API?
>
> Basically I'm trying to duplicate the Visual Basic SavePicture
> statement.
>
> I'm going to Chapters Bookstore this afternoon to find a
book(s)
> explaining the backgound I'm obviously missing on OLE.


>
>
> --
> Stephen Lebans
> maca...@nbnet.nb.ca
> http://www.lebans.com
>

> Michael (michka) Kaplan
<forme...@spamless.trigeminal.spamless.com>
> wrote in message news:ODE#CY7I$GA.55@cppssbbsa04...

Michael (michka) Kaplan

unread,
Oct 31, 1999, 2:00:00 AM10/31/99
to
I know the feeling. <s>

--
MichKa

-------------------------------------
don't send questions by e-mail unless
you're paying for it. (TANSTAAFL!) :-)

random junk of dubious value, replica
error and problem fixing, and the
*TSI Form/Report to Data Access Page Wizard*, at:
http://www.trigeminal.com

Stephen Lebans <macarth...@nbnet.nb.ca> wrote in message

news:OXTCGP9I$GA.276@cppssbbsa04...
> Thank you very much Michael,
> obviously your suggestion worked the first time.
>
> I'm going to put my life jacket on and jump back into the well
of COM.


>
> --
> Stephen Lebans
> maca...@nbnet.nb.ca
> http://www.lebans.com
>
>

> Michael (michka) Kaplan wrote...

Stephen Lebans

unread,
Nov 1, 1999, 3:00:00 AM11/1/99
to
I'm trying to call the IPicture interface SaveAsFile method. I'm lost in
the MSDN well of COM documentation trying to find out how to create the
pointer to the STREAM that is required for SaveAsFile.

I'm looking at IStorage::OpenStream. Am I warm, hot or freezing cold?
:-)

Thanks.

--

Stephen Lebans

unread,
Nov 1, 1999, 3:00:00 AM11/1/99
to
Michael, I'm misunderstanding a basic concept here. I've got
my IPicture interface created via OleCreatePictureIndirect. I've drawn
into this Bitmap and now I want to add a File Save method to the Class
wrapper. I thought I could use the IPicture SaveAsFile method. Is this
method only for a StdPicture opened by an OLE API?

Basically I'm trying to duplicate the Visual Basic SavePicture
statement.

I'm going to Chapters Bookstore this afternoon to find a book(s)
explaining the backgound I'm obviously missing on OLE.

Michael (michka) Kaplan <forme...@spamless.trigeminal.spamless.com>


wrote in message news:ODE#CY7I$GA.55@cppssbbsa04...
> Actually, you are just looking for a StdPicture, IPicture, or
> IPictureDisp object, such as the ones off of pictureboxes, etc.
> :-)
>
> Just set a reference to stdole2.tlb and it will be right there
> waiting for you. :-)
>

> --
> MichKa
>
> -------------------------------------
> don't send questions by e-mail unless
> you're paying for it. (TANSTAAFL!) :-)
>
> random junk of dubious value, replica
> error and problem fixing, and the
> *TSI Form/Report to Data Access Page Wizard*, at:
> http://www.trigeminal.com
>
> Stephen Lebans <macarth...@nbnet.nb.ca> wrote in message

> news:eXuJZ06I$GA.235@cppssbbsa05...

Stephen Lebans

unread,
Nov 1, 1999, 3:00:00 AM11/1/99
to
Thank you very much Michael,
obviously your suggestion worked the first time.

I'm going to put my life jacket on and jump back into the well of COM.

--

Don Cobb

unread,
Nov 1, 1999, 3:00:00 AM11/1/99
to
Good work Mich.

Don

Michael (michka) Kaplan <forme...@spamless.trigeminal.spamless.com> wrote

in message news:OcjFT99I$GA.204@cppssbbsa04...


> I know the feeling. <s>
>

> --
> MichKa
>
> -------------------------------------
> don't send questions by e-mail unless
> you're paying for it. (TANSTAAFL!) :-)
>
> random junk of dubious value, replica
> error and problem fixing, and the
> *TSI Form/Report to Data Access Page Wizard*, at:
> http://www.trigeminal.com
>
> Stephen Lebans <macarth...@nbnet.nb.ca> wrote in message

> news:OXTCGP9I$GA.276@cppssbbsa04...

Patrick Escarcega

unread,
Nov 2, 1999, 3:00:00 AM11/2/99
to
Stephen,

The easiest way for VB Programmers to get a *IStream (IStream interface
pointer) is through the API function CreateStreamOnHGlobal, which requires
the use of GlobalAlloc. You can create an HGLOBAL, pass it to the
CreateStream function (or not..pass NULL and CreateStream will create an
HGLOBAL) and pass this pointer to anything that needs an IStream. When the
action is complete..just bulk copy the contents of the HGLOBAL into either a
local byte array, or into a file.

If you don't want to use IDL to define a VB friendly version of IStream,
just treat IStream as a long (pointer). You don't actually need to use any
of the IStream methods. Of course this is no help if you are using Compound
documents.

Any questions, just email me.


--
Patrick Escarcega
patrick AT vbguru DOT net
www.vbguru.net
Maxim Group

Stephen Lebans

unread,
Nov 3, 1999, 3:00:00 AM11/3/99
to
Thank you for the pointers Patrick.

I thought that the main API listing at MSDN would have all of the API's.
I am slowly finding out this is not a true statement.
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/psdkref
/alphafunc_3bjm.htm

THis is the 3rd time in 3 weeks I have gone looking for an API in the
main alphabetical listing with no luck. After reading your post I
checked my latest copy of MSDN on disk, and sure enough, the API's were
listed there.

I guess I've learned that the COM API's are not in the generic Win32 API
listing.

Thanks again for your time Patrick. I've just purchased 2 more COM
books. That makes a total of 5 books dedicated to COM. Do you have to
read 10 before you really understand what's going on? <BG>
(my brain hurts :-)

Patrick Escarcega wrote...

0 new messages