Transparency

If you have any suggestions/comments concerning ChrisTV PVR Software post here
mr_exciting
Member
Posts: 3
https://ask.fm/kuchniewarszawa
Joined: 24 Sep 2003, 11:50

Post by mr_exciting »

Hello! Your program is really great, I searched for a while on the internet and yours was the best I found (much less bloated than others)! Anyway, I was wondering if it would be possible to implement a transparency option? I have seen one other program that could do it (Asus Gameface) but it doesn't work with my card. It would be great to be able to see what was happening behind the TV window, and even better if you could click through the window to access the window.

Hope you are able to manage this!
agge
Member
Posts: 4
Joined: 26 Sep 2003, 05:15

Post by agge »

lol!

Watch TV or dont watch tv, why do you want to watch tv if you wanna se whats behind it!?
mr_exciting
Member
Posts: 3
Joined: 24 Sep 2003, 11:50

Post by mr_exciting »

Hehe, so that I can read the windows behind it. It would make browsing a lot easier, so that I didn't have to keep moving the tv window around.
User avatar
Chris
ChrisPC Support Team
Posts: 4956
Joined: 01 Sep 2003, 18:31
Location: ChrisPC HQ
Contact:

Post by Chris »

Use CTRL+1,2,3,4,5 shorcuts to change the window size faster B)
kegie

Post by kegie »

Here's another voice requesting transparency.. I love being able to have the TV on while working in a different window. :]

It's a simple addition, just a single call really, in the windows API.
Example code:

Code: Select all


#ifndef WS_EX_LAYERED
#define WS_EX_LAYERED           0x00080000
#define LWA_COLORKEY            0x00000001
#define LWA_ALPHA               0x00000002
#endif // ndef WS_EX_LAYERED

// Preparation for the function we want to import from USER32.DLL
typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);

lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes;

/ Here we import the function from USER32.DLL
HMODULE hUser32 = GetModuleHandle(_T("USER32.DLL"));
m_pSetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32, "SetLayeredWindowAttributes");

// If the import did not succeed, make sure your app can handle it!
if (NULL == m_pSetLayeredWindowAttributes)
	return FALSE; //Bail out!!!

// Check the current state of the dialog, and then add the WS_EX_LAYERED attribute
SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);

// Sets the window to 70% visibility.
m_pSetLayeredWindowAttributes(m_hWnd, 0, (255 / 70) * 100, LWA_ALPHA);

User avatar
Chris
ChrisPC Support Team
Posts: 4956
Joined: 01 Sep 2003, 18:31
Location: ChrisPC HQ
Contact:

Post by Chris »

Thanks kegie,
But here is a problem of displaying the image, It stresses the CPU and loads it to 100 % :(
And is not working very well.
I'll see what solution can be made.
Btw, What application has this option ?, i want to see it :D
rinseaid

Post by rinseaid »

ChrisTV - foobar2000 (www.foobar2000.org) - an audio player - has transparency options. It's in Preferences -> Display -> Default User Interface. It's only supported in 2k or XP, but works very well. Also, the latest NVIDIA drivers can set ANY application to be transparent. The SDK for foobar2000 is freely available which may provide some useful code (I'm pretty sure the code to the UI is available) to help you debug the 100% CPU usage problem :).
User avatar
Chris
ChrisPC Support Team
Posts: 4956
Joined: 01 Sep 2003, 18:31
Location: ChrisPC HQ
Contact:

Post by Chris »

I ment an app that is displaying live picture (or movie) that has this option.
Because with all other app is simple to change the alphablend becuase they display static image (dialog box), but here you get live image wich has to be displayed :(
rinseaid

Post by rinseaid »

Oh, I see. Asus Gameface, which works on Asus NVIDIA cards, will display WDM capture in a transparent window over a Direct3D game. That's the only one I can think of, sorry.
mr_exciting
Member
Posts: 3
Joined: 24 Sep 2003, 11:50

Post by mr_exciting »

Hehe, yeah, if there were others then we'd be using them!
Post Reply