Symbian手机平台开发经验总结
2010-09-06 08:10:00 来源:WEB开发网http://www.forum.nokia.com/document/Forum_Nokia_Technical_Library/contents/FNTL/Using_the_HTTP_Client_API_with_RConnection.htm
User::LeaveIfError(iSocketServ.Connect());
User::LeaveIfError(iConnection.Open(iSocketServ));
iHttpSession.OpenL();
// Initiate connection
iConnection.Start(iStatus);
//...
RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo();
RStringPool pool = iHttpSession.StringPool();
// Attach to socket server
connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle()));
// Attach to connection
TInt connPtr = REINTERPRET_CAST(TInt, &iConnection);
connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));
// Open transaction...
iHttpTrans = iHttpSession.OpenTransactionL(iUri, *this, pool.StringF(HTTP::EGET, RHTTPSession::GetTable()));
RHTTPHeaders hdr = iHttpTrans.Request().GetHeaderCollection();
问题五:如何在Container中List控件和图片控件切换
void CMyContainer::Draw(TRect aRect)
{
CWindowGc& gc = SystemGc();
gc.SetPenStyle( CGraphicsContext::ENullPen );
gc.SetBrushColor( KRgbGray );
gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
gc.DrawRect( aRect );
if(iImage)
{
gc.Clear();
gc.BitBit(TPoint(0,0), iImage);
}
}
CCoeControl* CMyContainer::ComponentControl(TInt aIndex) const
{
switch(TInt nIndex)
{
case 0:
if(iImage)
iListBox->MakeVisue(EFalse);
else
iListBox->MakeVisue(ETrue);
}
}
void CMyContainer::ShowImage()
更多精彩
赞助商链接