windows-7

SetLayeredWindowAttributes not working on Windows 7

本小妞迷上赌 提交于 2019-12-19 04:07:56
问题 I am using SetLayeredWindowAttributer to make a particular color of layered window transparent. This works fine on Windows XP,VISTA . But when I use the same on Windows 7 its not working. SetLayeredWindowAttributes(hWnd, RGB(0xff,0xff,0xff), 0, LWA_COLORKEY); When I use LWA_ALPHA then also it works. Problem is that I am not able to make a particular color transparent in Windows 7. The following statement works on Windows 7 SetLayeredWindowAttributes(hWnd,RGB(0xff,0xff,0xff), 100, LWA_ALPHA);

Unable to query proxy “Automatically Detect Settings” on windows 7

泪湿孤枕 提交于 2019-12-19 04:06:12
问题 I am trying to capture proxy setting ("Automatically Detect Settings"). My code works on XP and Vista. But it is NOT working on Windows 7 Please see the details of target platform Windows 7 Enterprise, IE 8.0.7600.16385, Wininet.dll 8.0.7600.16535 Please see the code snippet INTERNET_PER_CONN_OPTION_LIST List; INTERNET_PER_CONN_OPTION Option[1]; unsigned long nSize = sizeof(INTERNET_PER_CONN_OPTION_LIST); Option[0].dwOption = INTERNET_PER_CONN_FLAGS; List.dwSize = sizeof(INTERNET_PER_CONN

Python script doesn't work with double click

假装没事ソ 提交于 2019-12-19 03:40:13
问题 I have a very basic problem, but I cannot find a solution in older answers. When I double click on a python script, I can see a prompt flashing but nothing happens. If I open the same script with IDLE and run it, everything works fine. To be sure the script was not executing propoerly, I made a test script like this: def main(): files = open('test.txt','a') files.write('this is a test') The simple script write the file if launched thru idle, but nothing happens if if I double click it. I

Checking for existence of Windows API Functions

心不动则不痛 提交于 2019-12-19 02:49:13
问题 I am new to Windows programming and I'm trying to discover the best way to check for the existence of Windows Shell API functions. I want to use some of the new taskbar features in Windows7. https://msdn.microsoft.com/en-us/library/dd378460%28VS.85%29.aspx#custom_jump_lists But I still want my program to be usable by previous versions of Windows. Is there an easy way to know if the functions are available to be called in the end users system. I'm programming in C++. 回答1: It depends on the

Developing Apps with Administrator Rights in Delphi

隐身守侯 提交于 2019-12-19 02:27:13
问题 I'm using D2010 under Windows 7 to write an app that seems to require admin rights (I think because it uses COM to communicate with a third party .exe, which also requires admin rights). I've added the manifest resource as required, but when I try to debug the app from the IDE, it reports "Unable to create process. The requested operation requires elevation" ...and it won't run. If I run Delphi as administrator, then my app runs correctly, but this feels like a dangerous brute force approach,

Hide extensions in Vista/Windows 7 WPF FileDialog.Filter

假装没事ソ 提交于 2019-12-19 02:06:35
问题 I am using the WPF OpenFileDialog and SaveFileDialog in my .NET 4 WPF application. I use the Filter property to allow the user to set different file filters. In .NET 4, this uses the native file dialogs introduced with Windows Vista (if possible). However, these dialogs show the extensions which make up the file filters. Since some of these use quite a bit of extensions, this is quite ugly. For example, I have a filter Image files|*.bmp;*.dib;*.jpg;*.jpeg;*.jpe;*.jfif;*.gif;*.tif;*.tiff;*.png

First UDP message to a specific remote ip gets lost

痞子三分冷 提交于 2019-12-18 22:32:17
问题 I am working on a LAN based solution with a "server" that has to control a number of "players" My protocol of choice is UDP because its easy, I do not need connections, my traffic consists only of short commands from time to time and I want to use a mix of broadcast messages for syncing and single target messages for player individual commands. Multicast TCP would be an alternative, but its more complicated, not exactly suited for the task and often not well supported by hardware.

System.out character encoding

拈花ヽ惹草 提交于 2019-12-18 19:11:33
问题 I'm running my Java program from command-line (Windows 7). To simplify matters, I describe only the relevant part. public static void main(String[] args) { System.out.println("Árpád"); } My output is garbage. It is obviously a character-encoding problem, the Hungarian characters of Á and á are not showing up correctly. I've tried the following: public static void main(String[] args) { PrintStream ps = new PrintStream(System.out, true, "UTF-8"); ps.println("Árpád"); } But my output is still

IsLittleEndian field reports false, but it must be Little-Endian?

最后都变了- 提交于 2019-12-18 18:49:40
问题 Im running on a Intel computer (Win7 64-bit) and according to what I read Intel is using Little-Endian. I try this out in C# with the following code: byte[] b2 = new byte[] { 0, 1 }; short b2short = BitConverter.ToInt16(b2, 0); and b2short == 256 as expected from a Little-Endian. Then I read that in .NET, the BitConverter.IsLittleEndian should reflect what endian the system is using, and when I check the variable in Visual Studio it reports false , ie it is NOT Little-Endian. Does that have

DLL_PROCESS_ATTACH failing to execute on Windows 7 C++

你离开我真会死。 提交于 2019-12-18 18:01:34
问题 I am trying to load a .dll file and have it display a message box when loaded. From my understanding, once a .dll is loaded, it makes a call to dllmain() and switches to the DLL_PROCESS_ATTACH option. I have written the code for both the .dll and the .exe which loads it. The .exe can load it correctly and print out the address in which the dll has been loaded, but I do not see a message box being displayed. I read somewhere on Microsoft.com that the dll enters a "lock" when loaded as to