×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    12

    Transparent windowing control

    Hi All,

    I want to make a control or window transparent. I tried using RWindow::SetTransparencyBitmap(), RWindow::SetTransparencyFactor() APIs.

    I've changed wsini.ini file and I've added the Transparency tag then the error code return with the usage of the API is KErrNone. But I could not get the transparent window which I want.

    Transparency which I mean is suppose the client window is a control.

    I'm working in 3rd Edition SDK.

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    12

    Re: Transparent windowing control

    No kind hearts there to give an answer for this?

  3. #3
    Registered User
    Join Date
    Mar 2005
    Posts
    13

    Re: Transparent windowing control

    Did you find a solution of the problem?

  4. #4
    Registered User
    Join Date
    Feb 2006
    Location
    India
    Posts
    24

    Re: Transparent windowing control

    hi
    There is no need to change the .ini file. Only the settransparencyfactor() API will do.
    add this line in the ConstructL() of your view before ActivateL().

    Window().SetTransparencyFactor(0xff000000);

    this line will set the window transparent.

    cheers,
    ram

  5. #5
    Registered User
    Join Date
    Mar 2005
    Posts
    13

    Re: Transparent windowing control

    I tried what you suggested but it returns -5 which means that it is not supported operation. Have you ever tried it?

  6. #6
    Registered User
    Join Date
    Feb 2006
    Location
    India
    Posts
    24

    Re: Transparent windowing control

    hi
    I have used this in my application. It worked for me. What are all the header files and the libraries u added for this. Also please check in the Draw() functin of the view. Don't clear the gc. This should work.

    cheers,
    ram

  7. #7
    Registered User
    Join Date
    Dec 2006
    Posts
    1

    Re: Transparent windowing control

    Hi Ram,

    I am also trying to use the API and it returns KErrNotSupported. Could you kindly send me the steps to do this or the code drop? Please help.
    Thanks and regards,
    Rajeswari Kannan
    Last edited by raji@nokia; 2006-12-29 at 06:46.

  8. #8
    Registered User
    Join Date
    Feb 2006
    Location
    India
    Posts
    24

    Re: Transparent windowing control

    Hi
    The code i have used in my view.cpp
    add the following line and also include the corresponding lib in your mmp. (gdi.lib)


    #include <GDI.H>

    ConstructL(const TRect& aRect)
    {

    ...
    ...
    TRect bRect(80,80,160,190);
    // Set the windows size
    SetRect( bRect );

    // the above 2 lines are used for setting the transparency window limit to a small portion. you can use the following lines to make ur application to have a complete transparent window.

    Window().SetTransparencyFactor(0xff000000);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

    also please make sure you are not clearing the Gc in your Draw function.
    This should solve your problem

    cheers,
    ram

  9. #9
    Registered User
    Join Date
    Nov 2006
    Location
    Bangalore
    Posts
    17

    Re: Transparent windowing control

    Hi ramanathanhr,


    Can you tell me in which mobile it works because I have nokia N73 & the transparency support is not there. Whereas in Emulator i can edit wsini.ini file & get transparency support.

    Regards
    Peru
    Cheers
    Peru

  10. #10
    Registered User
    Join Date
    Feb 2006
    Location
    India
    Posts
    24

    Re: Transparent windowing control

    hi
    I have tested my code in 3.x(3.0,3.1) mobiles. it worked fine.Even for the emulator i have not edited the .ini file that you mentioned.

    Cheers,
    Ram

  11. #11
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Transparent windowing control

    sure if you do not call Clear in your Draw the old background will be shown, but have you checked if it actually gets updated correctly ?
    Also how should you handle animations, changing text etc. if you should not call Clear in your Draw ?

  12. #12
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    64

    Re: Transparent windowing control

    I tried on both emulator & phone(Nokia 5700), but it gives KErrNotSupported error in TInt Err = Window().SetTransparencyFactor(0xff000000);

    I also tried with & without TRANSPARENCY tab in wsini.ini. If any1 is able to create transparent window please post the full example here. It will be very helpful to everyone in forum.

    Thanks,
    Naresh

  13. #13
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Transparent windowing control

    transparent windows are not working on S60 devices unfortunately...

  14. #14
    Registered User
    Join Date
    Nov 2007
    Posts
    66

    Re: Transparent windowing control

    how to draw sprite bitmap on the idle(phone desk)?
    use RWsSprite??

Similar Threads

  1. Control with transparent background
    By dabei in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-04-11, 00:11
  2. Accomplish transparent Edit Control
    By goready@163.com in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-04-28, 08:26
  3. AppUi - Control communication.
    By Subotai4Winds in forum Symbian
    Replies: 1
    Last Post: 2005-01-20, 08:53
  4. Transparent Control
    By kamalsinghania in forum Symbian User Interface
    Replies: 8
    Last Post: 2005-01-07, 03:05
  5. D211
    By arleth in forum Multimodecards
    Replies: 7
    Last Post: 1970-01-01, 02:00

Posting Permissions

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