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
0
votes
4 answers

Once and for all: how do I get a fully transparent checkbox, button, radio button, etc. in Windows API, and not with a black background?

First, sorry if I sound arrogant/rude here. All right, so everyone has run into this by now (I hope); I just haven't found any adequate answer anywhere. We start with a Common Controls 6 manifest and case WM_CTLCOLORSTATIC: if (/* window has…
andlabs
  • 11,290
  • 1
  • 31
  • 52
0
votes
0 answers

Java JNA Postmessage not works

I am trying to send a keystroke to a specific window using Postmessage, but it seems not works for me. this is my codes import com.sun.jna.platform.win32.User32; import com.sun.jna.platform.win32.WinDef.HWND; import…
user3789645
  • 91
  • 1
  • 5
0
votes
0 answers

TextBox contextmenu

I've spend a few days wondering how to append new items to default context menu in TextBox. Code below was taken from question How can I customize the system menu of a Windows Form? but is good only for context menu of main form. using…
Radek
  • 15
  • 1
  • 5
0
votes
1 answer

CreateProcess get handle invalid

I've run a small application from CreateProcess using WaitForInputIdle straight after but I can't seem to get the correct window handle for the newly created process via EnumWindows and GetWindowThreadProcessId, the .exe I run as a process looks…
Col_Blimp
  • 779
  • 2
  • 8
  • 26
0
votes
0 answers

How to restore application with the same size?

When I have an application opened and I try to open again it, i want to restore the application launched with the actual size. The code used is this: [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool…
0
votes
1 answer

How to restore default icon? (WinXP and Win7)

http://msdn.microsoft.com/en-us/library/windows/desktop/ms648045%28v=vs.85%29.aspx tells me that: If the hinst parameter is NULL and the fuLoad parameter omits the LR_LOADFROMFILE value, the lpszName specifies the OEM image to load. The OEM image…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
0
votes
1 answer

Setting Icon of Windows Issues (WinXP and Win7)

I'm making a Firefox addon with js-ctypes and was using user32.dll functions to set the icons of all windows of a profile. I plan to do this for Mac OS and Linux but trying to knock out Windows first. So I'm setting the icons like this: GitHub -…
Noitidart
  • 35,443
  • 37
  • 154
  • 323
0
votes
1 answer

SetScrollPos: scroll bar moving, but control content not updating

[DllImport("user32.dll")] public static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, bool bRedraw); [DllImport("user32.dll", CharSet = System.Runtime.InteropServices.CharSet.Auto)] public static extern int GetScrollPos(int hWnd, int…
caesay
  • 16,932
  • 15
  • 95
  • 160
0
votes
1 answer

Close Find/Replace Dialog programmatically

How do I close the Windows Find and Replace dialog boxes programmatically ensuring the FINDMSGSTRING message is sent so I can get the settings to save them? DestroyWindow does not send the message.
Col_Blimp
  • 779
  • 2
  • 8
  • 26
0
votes
1 answer

C# Pinvoke can't find the Hwnd of Controls after List count was 0 at first time

I'm trying to click a Button in another Application (started from my Programm with Process.Start) The problem: I need to wait until the Loading screen is disappeared and the GUI pop's up... My idea was to read all (Hwnd)Controls until a specific…
Mikle20
  • 11
  • 1
0
votes
1 answer

Mutex owner state

Using the Windows Mutex functions to make an application one instance I'm wondering how to tell if the Mutex object, if it exists, is 'owned' or not so I can ignore it being a valid object should the previous instance have crashed?
Col_Blimp
  • 779
  • 2
  • 8
  • 26
0
votes
1 answer

ListView row non column rectangle

Say I have a Windows ListView with two columns then I can get the Rec of the row with LVM_GETITEMRECT but that Rec does not include the area of the ListView not covered by a column, how do I determine this rectangle area so I can draw in it? In…
Col_Blimp
  • 779
  • 2
  • 8
  • 26
0
votes
0 answers

Can't get/set text to "Edit" control using User32 API and C#

I'm working on a small program that automates using another program. I have no problem using FindWindow(Ex) and getting/setting text to all of the other controls on the software, but am hitting a road block with the Edit control they are using. …
sdouble
  • 1,055
  • 3
  • 11
  • 28
0
votes
1 answer

Is it required to ship a windows core dll?

I have a library that is using some windows API's from user32.dll and gdi32.dll. Since these are standard windows libraries, I do not think that these would be required to be shipped with my library and all windows computers should have them already…
Kshitij Banerjee
  • 1,678
  • 1
  • 19
  • 35
0
votes
0 answers

SetKeyboardState not working in Windows 8

I'm trying to use a combination of attaching thread input to another thread and setting key states to send a shift+a combination (A) to Notepad. The problem is, the code below prints a instead of A. I have tried debugging the code and holding down…
Jason
  • 13,563
  • 15
  • 74
  • 125