Go Back   Technology Questions > Hardware Questions > Electronics > Smartphones

Smartphones This is the Microsoft General Public Smartphones Newsgroup.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 04-01-2008, 09:10 AM
Sunil
Tablet PC Guest
 
Posts: n/a
How to make an overlay transparent?

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 04-01-2008, 09:10 AM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make desktop icons transparent? Mekinnik Windows XP 2 10-18-2007 01:30 PM
IE Overlay on the contents of the CD Umma Gumma Windows XP 10 09-19-2007 01:44 AM
IE Overlay on the contents of the CD Umma Gumma Windows XP 0 09-19-2007 01:35 AM
3D rendering to overlay George Valkov Windows XP 0 09-06-2007 08:10 AM
Make Maximized Windows & Taskbar Transparent + Automated UXtheme Patcher spocks buddy Windows Vista 2 05-15-2007 01:50 PM


All times are GMT -8. The time now is 06:33 PM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0