Category "winapi"

How do I know when my Ctrl + C command has been processed?

I need to copy the currently selected text from the currently active window in the currently active app. If the app support guiInfo.hwndCaret, then I use this.

NMHDR definition conflict?

in richedit.h NMHDR is defined as follows: typedef struct _nmhdr { HWND hwndFrom; UINT idFrom; UINT code; } NMHDR; in winuser.h, it is def

Send User Message to child window in CCtrlTab control

I have a dialog window (MainDlg : CDialogEx), in this window is tabcontrol (MyTab : CTabCtrl) and in this CTabCtrl I have child windows (Tab1Dlg : CDialogEx). T

how to get a list of available monitors in windows 10

I want to get a list of available monitors in Windows 10, same as the monitor list shown in the System display settings (no matter whether they are attached or

Prevent window from being clicked in while another window is open

On Windows, when a window opens on top of another window, the parent window will not be clickable, and will make a "ding" sound and its titlebar will flash. It

Win32 application not finding icon for window

I created a icon as a resource I checked explorer and it works just fine, my exe now has that icon Next, I used hIcon to set the icon of my window but it says

Append to registry without expanding variables

I'll just start off by saying that I'm by no means an expert in C++, so any pointers/tips are greatly appreciated. I'm having some difficulties reading and writ

Problem with CancelIoEx function on some platforms

I work with usb device and use async functions of usbdk driver for I/O operations. I have a problem with canceling of operations on some win platforms. Im using

How does one create text that can overlay all windows like the Windows Activation Watermark?

I would like to create a count down timer that displays in the lower right hand of the screen with slightly transparent text that can be seen no matter what you

Programs which accept uppercase and lowercase commands as input

I'm trying to add a help/information box in my program that pops whenever someone type in a /h, /?, /help commands. I want to make sure that my program accepts

Creating process with elevated privileges using CreateProcessAsUserW from system service

I'm trying to launch a process from a system service using the token handle of the currently active user with elevated privileges (if user is in admin. group).

Go: Why do processes/Threads started using Win32API funcs seem to hijack and kill the parent proccess?

Now, the following code does what it's supposed to do, load calc.exe to memory and execute it, it does that fine. I've stitched together this code to show Creat

Safe ways to retain an encryption key in a local service memory after a reboot?

I'm writing a Windows service that receives an encryption key from our web server. Such key never leaves memory and is used to encrypt and decrypt sensitive dat

Is there a way to set jumbo frame with C++ in Windows?

My C++ application uses Gige camera on many various Windows 10 PC. So I wanna set jumbo frame of LAN card of PC programmatically. (when the process starts it is

How do I fill in the pData parameter of the GetRawInputData module

I'm semi-new to ctypes and I'm having trouble with how to use the GetRawInputData function. I'm not sure how to fill in the 3rd argument. Here's how the code lo

AdjustWindowRectEx returns different results in VS and C++Builder

I try to use AdjustWindowRectEx() function to get the sizes of the window frame with aero theme enabled. But I found that AdjustWindowRectEx() function returns

How to move desktop icons with python?

I am making a python program that moves the desktop icons using LVM_SETITEMPOSITION from winapi but I have a problem with commctrl.LVM_SETITEMPOSITION and it gi

DnsServiceRegister API issue

I'm trying to use the Windows 10+ API DnsServiceRegister to register a web server to be discoverable. DNS_SERVICE_REGISTER_REQUEST rd = {};

Is C# System.Thread using the Win32 API?

Is the C# Mulithreading with System.Thread using the Win32 API or how is System.Thread working?

Having trouble using winapi to read input from a device

I followed the steps here to try and read some input from a device. I've been trying for a couple hours now to figure out why GetMessage doesn't return anything