Click here to get back home

How to make an overlay transparent?

 HomeNewsGroups | Search | About
 microsoft.public.smartphone    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to make an overlay transparent? Sunil 04-01-2008
Posted by Sunil on April 1, 2008, 1:09 pm
Please log in for more thread options
Hi Friends,
I am trying to create an overlay and make it transparent so that I can see
the preview screen through the overlay.

I was able to do this in my desktop PC by color keying. But when I try to
execute the same code in my PPC device(windows mobile 5.0), it is not giving
me the desired result.
The overlay shows the preview screen, but any updation in the preview screen
is not reflected. It is virtually like taking a snapshot of the preview
screen and loading to the overlay surface. Eg: if I click on the start menu,
I can hear the sound of start menu popping up, but the user can't see the
popped up menu.

What I want is to make the overlay transparent and any updation on the
screen should be visible to the user.

The device I am using is of RGB surface and it supports source colorkeying.



This is my code

//Trying to set the src color keying
DWORD dwFlag = DDOVER_SHOW | DDOVER_KEYSRCOVERRIDE;

DDOVERLAYFX ovfx;
ZeroMemory(&ovfx, sizeof(ovfx));
ovfx.dwSize = sizeof(ovfx);
ovfx.dckSrcColorkey.dwColorSpaceLowValue = 0; // setting the color key
value as 0(black) ovfx.dckSrcColorkey.dwColorSpaceHighValue = 0 // setting
the color key value as 0(black)

DDBLTFX ddbltfx;
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwFillColor = 0;
//Filling the surface with 0(which is the color key) to make it transparent
hRet = m_ pOverlaySurface->Blt(NULL, NULL, NULL,DDBLT_COLORFILL |
DDBLT_KEYSRCOVERRIDE,&ddbltfx);

RECT rs = {0, 0, 240, 320}

hRet = m_pOverlaySurface->UpdateOverlay(&rs, m_pPrimarySurface, &rs, dwFlag,
&ovfx);


Please help

Thanks in advance
Sunil



Similar ThreadsPosted
What Make July 6, 2005, 2:47 pm
App to make live video managing February 28, 2006, 2:44 pm
How do I make a contact private with the Treo 700? March 8, 2006, 7:17 pm
How to make ActiveSync sync a folder? May 20, 2006, 10:00 am
How to make mini USB on WM5 acts as USB Host? August 16, 2006, 7:28 pm
Don´t make back in mobile web form October 17, 2005, 3:12 pm
Don´t make back to mobile web form October 19, 2005, 10:22 am
EXE or DLL files run in privileged mode, so how to make an Installer? August 7, 2005, 9:31 am
What Tools and Params are you using to make videos for the SDA (T-Mobile)? March 23, 2006, 8:59 pm
PPC-6700, Exch. Active Sync and SSL: Or How to make me balder December 20, 2005, 6:16 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap