ParallelGraphics Forums
SDK
You are here: [Forums]::[General]::[SDK]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   General - SDK

Subject: Re: Using get_Bounds() method in vc++
Sender: nalex@parallelgraphics.com 7.06.07 05:01

Since the second argument of get_Bounds method is [out]parameter, there's no need to create safe array before the call. And what is the value of Hr?

Try to use this code snippet:

CComVariant bounds;
CComVariant inner(true);
HRESULT hr = SFPickNode->get_Bounds(&inner, &bounds);
if (SUCCEEDED(hr))
{
// do whatever you want with bounds
// ....
}


or, if ATL is not used:

VARIANT bounds;
VariantInit(&bounds);
VARIANT inner;
VariantInit(&inner);
V_VT(&inner) = VT_BOOL;
V_BOOL(&inner) = VARIANT_TRUE;
HRESULT hr = SFPickNode->get_Bounds(&inner, &bounds);
if (SUCCEEDED(hr))
{
// do whatever you want with bounds
// ....
VariantClear(&bounds);
}
VariantClear(&inner);

 


Using get_Bounds() method in vc++ / saransivaprahasam@rediffmail.com / 7.06.07 04:44
     Re: Using get_Bounds() method in vc++ / nalex@parallelgraphics.com / 7.06.07 05:01
         Re: Using get_Bounds() method in vc++ / saransivaprahasam@rediffmail.com / 7.06.07 05:20

Messages in thread: 3


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.