IHXSite::SetSize()
"Mahmoud Hammoud" <[email protected]>
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
I posted a question last week where I wanted to change the dimensions of my
video and Eric suggested that I should resize the site using
IHXSite::SetSize(). Does this mean that I can call this function at any
point? Where is the size of the site being set initially (maybe it would be
easier for me to just change it from there). Can someone tell me what's
wrong with this code?
bool ResizeSite()
{
HX_RESULT retVal = HXR_FAIL;
IHXClientEngine* pEngine = NULL;
IUnknown * pPlayer = NULL;
IHXSiteManager2* pSiteMgr2 = NULL;
IHXSite* pSite = NULL;
m_pContext->QueryInterface(IID_IHXClientEngine, (void**)&pEngine);
//Assuming 1 player, 1 site
if(pEngine)
{
pEngine->GetPlayer(0,pPlayer);
// Get the IHXSiteManager2 interface
if(pPlayer)
{
retVal = pPlayer->QueryInterface(IID_IHXSiteManager2, (void**)
&pSiteMgr2);
if(SUCCEEDED(retVal))
{
retVal = pSiteMgr2->GetSiteAt(0, pSite);
if(SUCCEEDED(retVal))
{
HXxSize new_size;
new_size.cx = 200;
new_size.cy = 200;
//pSite->AddRef(); //Is this necessary?
pSite->SetSize(new_size);
return true;
}
HX_RELEASE(pSite);
}
pSiteMgr2->Release();
}
HX_RELEASE(pPlayer);
}
HX_RELEASE(pEngine);
return false;
}
Thanks a lot,
Mahmoud Hammoud
_______________________________________________
Helix-client-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev