how to convert .png to .bmp using winapi?
Using C language ...
Using C language ...
I was wondering if there is a way to intercept and modify mouse input before it gets to windows? What I'm wanting to do is intercept mouse motion events, apply some custom scaling and acceleration to the values, and then continue passing them along. I'd need something that can do this before the inputs get to the raw input API or Direct...
Hello, I´ve been trying to interact with another app on windows, which doesn´t have any data exchange protocol implemented. So i figured the best way to do this is by fetching data from an app and send it to the other one by sending keystrokes, simulating human interaction. But i am having such a hard time trying to implement this kind...
char lpszUsername[255]; DWORD dUsername = sizeof(lpszUsername); GetUserNameA(lpszUsername, &dUsername); ret_status = NetUserGetInfo(pc_name, lpszUsername, 1, (LPBYTE*)&ui); So I need char for GetUserNameA, but for NetUserGetInfo - LPCWSTR. WTF? How do I can convert char to this? error C2664: 'NetUserGetInfo' : cannot convert parameter...
In Win32 programming a handful of POD structs is used. Those structs often need to be zeroed out before usage. This can be done by calling memset()/ZeroMemory() STRUCT theStruct; ZeroMemory( &theStruct, sizeof( theStruct ) ); or by value initialization: STRUCT theStruct = {}; Although the two variants above are not equivalent in g...
Could someone tell/show how to get the current proccess id with python on windows there are this function os.geteuid() but its only works with linux/unix could someone tell what it the pythonic way to get the current proccess id on windows. ...
I am trying to use the SetProductKey method of Win32_WindowsProductActivation to set the windows xp key for a custom need of mine as per the second Microsoft vbs script here :http://support.microsoft.com/kb/328874. No matter what method i use i always get shut down. I have tried wmi: import wmi c = wmi.WMI() c.Win32_WindowsProductActiva...
I am trying to use following code to retrieve character index by position in a RichTextBox. I know I can use GetCharIndexFromPosition method provided by RichTextBox Class, but I want to know what is wrong with following code: SendMessage import is this: [DllImport("User32.dll", EntryPoint = "SendMessage", CharSet= CharSet.Auto)] public...
I'm working on what is essentially the runtime for a large administrative application. The actual logic that is being executed, as well as the screens being shown and the data operated upon is stored in a central database. In order to improve performance, the runtime keeps data queried from the database in various caches. However, it is...
Is it possible to disable the mouse feedback cursor when a process begins from within the process? I know you can use the STARTF_FORCEOFFFEEDBACK flag when creating the process, and that the feedback cursor will turn off when the process displays a window. However, I do not have control over the code that creates my process and my proce...
How can I create a PyDEVMODE object without just having it as a return from a function call like win32api.EnumDisplaySettingsEx(name, 0)? ...
I wrote the following code to disable the a guest os's virtual monitor programatically: def disableSecondMonitor(): import win32api import win32con as C name = win32api.EnumDisplayDevices(None, 1).DeviceName devmode = win32api.EnumDisplaySettingsEx(name, 0) devmode.Clear() devmode.Fields = C.DM_PELSWIDTH | C.DM_...
In a Win32 app is there a Windows message or some other notification that will get sent to a child window when it is placed into a different parent ...
I often boot my Windows 7 PC with the attached KVM switch focused on another computer. When I switch to the booted PC, the display resolution is wrong (and the second attached monitor is not detected). I can correct this by right-clicking the desktop, choosing Screen Resolution and clicking Detect. This makes Windows detect attached dis...
Hi, How do I get the console handle of an external application? I have a program running as a console. I have a 2nd program that will call GetConsoleScreenBufferInfo, but for that I need the console handle of the first program. Is it possible that given the HWND of the 1st program I can get its console handle? ...
I have created a basic application with with windows api. It just displays a small window. I am starting from main function, getting the instance, created my windows class, etc. Everything works out fine. The problem I have however is that my custom icon will not display in the top left corner of the window or on the task bar, it just...
Looking for a way to have the native Windows progressbar implemented via EasyDialogs or Python Win32's progressbar.py example use the operating systems theme support so that the progressbar shows a modern user interface vs. something that's a throwback to Windows 95. I've tried compiling both these techniques as py2exe executables with ...
I'm writing a dll for an aging software framework. The framework was created in 2002, so most of its thinking and dll templates are for C++/Win32. However, it does come with a working dll template in C#, which is what I'm working with. The dll creates a window and I'm trying to add a tooltip to that window. Using the C++/Win32 dll templa...
This has actually occurred twice now. I'm writing a cross-platform application, and some of my function names conflict with the Windows API. What I did (for example with LoadObject) was... #undef GetObject Is this an okay approach, or should I rename my functions? ...
Though i'm currently interested in internet explorer address space i wouldn't mind a general answer. The question is how can i calculate the address space ( and by address space a mean the minimum and maximum address in memory -correct me if i'm wrong- ) of a windows process. Actually is this space fixed or varied ? Also do i get to kno...