×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    29

    How to answer these question??

    1. How to transform FullScreen to FPE screen??
    FullScreen: iEikonEnv->AppUiFactory()->StatusPane()->MakVisbile(EFalse);
    SetRect(iView->ClientRect());
    FPE: iEikonEnv->AppUiFactory()->StatusPane()->MakVisbile(ETrue); //this is not run
    SetRect(iView->ClientRect());
    in FPE,status pane is not displayed. how to solve this problem??

    2. How to transform TBuf to TInt or char[] or char* or ??

    3. How to lock and unlock the keyboard??

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    I can answe the string problem:

    // --------------------------------------------------------------
    A) int <-> buf
    use TBuf::Num()
    and
    TLex::Val()
    // --------------------------------------------------------------

    c) buf <-> char

    HBufC8* ConvertPCharToHBufC8L( char* aData )
    {
    if ( aData )
    {
    TInt length = User::StringLength( ( TUint8* )aData ) + 1;
    HBufC8* epoc_string = HBufC8::NewMaxL( length );
    Mem::Copy( (void *)(epoc_string->Ptr()), aData, length );
    return epoc_string;
    }
    else
    return NULL;
    }

    HBufC16* ConvertPCharToHBufC16L( char* aData )
    {
    if ( aData )
    {
    TInt length = User::StringLength( ( TUint8* )aData ) + 2;
    TPtrC8 ptr( ( TText8* )aData );
    HBufC* epoc_string = HBufC::NewL( length );
    epoc_string->Des().Copy( ptr );
    return epoc_string;
    }
    else
    return NULL;
    }


    Bye
    STeN

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×