Transparent Window in Remote desktop [modified]
-
I have an MFC dialog which is made transparent usingSetLayeredWindowAttributes(). When i start this transparent window in my machine, i can't click. When i connect this machine remotely from any other machine and when i try to click the background of that window, i can click. I tried with different values for alpha in SetLayeredWindowAttributes() and i found that if alpha value is equals or above 5, behavior in both cases are same. I want to disable the clicking of background of transparent window with alpha value as 1 in remote desktop also. Or any other way for displaying the background clicking in remote desktop Please help me.
modified on Friday, December 11, 2009 7:24 AM
-
I have an MFC dialog which is made transparent usingSetLayeredWindowAttributes(). When i start this transparent window in my machine, i can't click. When i connect this machine remotely from any other machine and when i try to click the background of that window, i can click. I tried with different values for alpha in SetLayeredWindowAttributes() and i found that if alpha value is equals or above 5, behavior in both cases are same. I want to disable the clicking of background of transparent window with alpha value as 1 in remote desktop also. Or any other way for displaying the background clicking in remote desktop Please help me.
modified on Friday, December 11, 2009 7:24 AM
You can check if you are in remote: Retrieves the Remote Desktop Services session associated with a specified process. http://msdn.microsoft.com/en-us/library/aa382990(VS.85).aspx[^] // 0 - Not Remote Session // 1 - Remote Session // -1 - Internal Error // int isRemoteSession() { DWORD sessId = 0; if(ProcessIdToSessionId(GetCurrentProcessId(), &sessId) != 0) { return (sessId == 0) ? 0 : 1; } return -1; // Internal Error } For the rest, eliminate the alpha when needed