Questions tagged [user32]

user32.dll implements the Windows USER component that creates and manipulates the standard elements of the Windows user interface, such as the desktop, windows, and menus.

547 questions
3
votes
2 answers

How do I get the active ChildWindow of an application?

I have this problem: I have an handler to the mainWindow of a certain application, and I want to simulate a keypress on that application... I'm using sendMessage/postMessage api calls to do this. The reason why I don't use the .Net SendKeys function…
Noyoudont
  • 155
  • 3
  • 7
3
votes
1 answer

PYQT5: Window does not get the focus

I want to create my own virtual keyboard. However, it always happens that the focus is taken from another window as soon as a button is pressed or the window is opened. How can I work around this problem? Below I have created a small example with…
Robin Fauser
  • 111
  • 1
  • 13
3
votes
0 answers

How can I use WM_NCHITTEST to indicate a mouse being outside the application area?

Is there any way I can handle the WM_NCHITTEST message in the window procedure such that the mouse will "fall through" to the next application below? Right now I draw a custom shadow decoration in a transparent area of my application window. When I…
vbyzjnlehi
  • 307
  • 2
  • 15
3
votes
1 answer

DisableAbsoluteVolume on Windows 10

There are some settings that I need to be able to set at runtime, without a reboot. Using X-Mouse Controls as a guide, I've found a way to programmatically use SystemParametersInfo() to set up active window tracking (SPI_SET_ACTIVEWINDOWTRACKING),…
Tripp Kinetics
  • 5,178
  • 2
  • 23
  • 37
3
votes
1 answer

How to use SendInput() properly to simulate mouse input in C#

I was trying to simulate (global) mouse click using SendInput() from user32 dll in C# .NET. I have already tried SendInput() for keyboard input and it works fine. But for some reasons it doesn't work for mouse input. here is my code, For simplicity,…
Fahim Mahbub
  • 41
  • 1
  • 3
3
votes
1 answer

C# GetAsyncKeyState not functioning

I just got into game modding, and I've hit a wall. I'm actually a C++ programmer, but the modding im currently doing requires me to use C#, which shouldn't be too big of an issue, but I am fairly certain I'm missing out on some key C# concepts. Im…
Chaost
  • 137
  • 3
  • 12
3
votes
0 answers

How to add a custom button to windows' minimize/maximize/close (x)

I was wondering if there is a way to add (programatically, of course) an icon/button/whatever besides plain text to a window (Microsoft Windows window...)'s title bar or next to where the minimize/maximize/close buttons are. I could draw it myself…
Nikola Yovchev
  • 9,498
  • 4
  • 46
  • 72
3
votes
3 answers

Need to activate a window

I have a situation like this. I have the window handle of an application. I need to activate it. I tried all these functions but is not working always.(most of the time , it doesn't work the first time and I'll have to manually click on it to…
Ananth
  • 10,330
  • 24
  • 82
  • 109
3
votes
1 answer

What does "synchronise the UIState" mean in the docs for SetParent?

The documentation for user32.dll's SetParent function states that When you change the parent of a window, you should synchronize the UISTATE of both windows. For more information, see WM_CHANGEUISTATE and WM_UPDATEUISTATE. I've looked through…
Peter Taylor
  • 4,918
  • 1
  • 34
  • 59
3
votes
2 answers

use user32.dll in win ce5.0

I am trying to use sendmessage of user32.dll in an embedded windows ce5.0 computer the same simple program that I made only for testing the user32 in embedded is working on my windows xp computer. the app and the dll are in the same folder. the…
stl
  • 41
  • 1
  • 2
3
votes
0 answers

Omit handle from GDI window capture (DirectShow Filter)

I currently have implemented a DirectShow live source screen capture filter in C#. The DShow filter is being consumed by a separate process (ffmpeg) that is live encoding the stream. I would like to render some UI/Controls on the screen for…
caesay
  • 16,932
  • 15
  • 95
  • 160
3
votes
0 answers

How to get list of List all child controls (Handles) of a given window by using java

I want to get all the child handles of the parent window. This can be well done in AutoIt script but, we want this in java and this command is unavailable in AutoItX4Java.jar. I started to create it, and took example of calculator: public static…
Umesh
  • 121
  • 6
3
votes
2 answers

HWND Change cursor when mouse Hover

I need to change the cursor icon when the mouse hovers a certain HWND. I achieved the mouse cursor change with SetClassLong(hWindow, GCL_HCURSOR, (LONG)LoadCursor (NULL, IDC_CROSS)); But it applies the cursor to each element which share the same…
ProtectedVoid
  • 1,293
  • 3
  • 17
  • 42
3
votes
1 answer

How can I call GetRawInputDeviceInfo using JNA?

I want to call GetRawInputDeviceInfo from my Java application using JNA. This is what my JNA Library interface looks like: public static final UINT RIDI_DEVICEINFO = new UINT(0x2000000b); public static DWORD RIM_TYPE_KEYBOARD = new…
Chry Cheng
  • 3,378
  • 5
  • 47
  • 79
3
votes
1 answer

Flashing Window not working for TabbedThumbnail (custom taskbar preview)

For my application I'm using the FlashWindowEx(ref FLASHWINFO pwfi) form the user32.dll to flash the taskbar and my window for attention. At this moment I am trying to add a custom image for the preview of the window in the taskbar, best way I found…