43,732 questions
0
votes
0
answers
21
views
How can I implement an effect similar to the Windows clipboard window? (doesn't steal focus but can still accept keyboard input)
I am trying to implement a program similar to the Windows 10/11 clipboard window. My goal is to display a window that does not steal focus from the current window (i.e., it does not interrupt ...
Advice
0
votes
1
replies
54
views
Modify the Windows display using a shader
With Windows 10/11, using windows API, is there a way to get the Windows display (with everything: desktop, all open windows, mouse cursor...) as a texture before it goes on screen, modify it with a ...
0
votes
0
answers
119
views
Unable to pre-allocate a name for a DOCINFO structure [closed]
I'm trying to create a PDF file using the DOCINFO structure and StartDoc() functions. My understanding is that the lpszDocName attribute is the name of the document, while the lpszOutput is the name ...
0
votes
0
answers
63
views
Why does drag and drop work for webview2 controls in UAC elevated privileges applications?
In Windows, it is a known issue that drag and drop does not work from normal application to UAC elevated privileges windows due to UIPI policy.
However, I notice that webview2 controls within a UAC ...
1
vote
0
answers
102
views
static window duplicates on both main and scroll windows in WinAPI c++
I want to create child scrollable window that has specific size and position and it will contain messages as static windows, I tried different class names for this messages_window , if I use "...
0
votes
0
answers
138
views
Win32 C++ Flat colored status bar with color and no borders [closed]
I need a flat colored status bar in Win32 C++, similar to Visual Studio or VS Code, with no dividers and no section borders.
The status bar below has 2 parts, Selected and Total. First, I specified ...
0
votes
1
answer
71
views
How do I get rid of default drawing of min/max/close buttons in DWM managed window?
There is a famous tutorial: Custom Window Frame Using DWM.
Everything works as expected (Windows 11), but now I want to get rid of default drawing of Minimize / Maximize / Close buttons (to draw them ...
-1
votes
0
answers
163
views
Open a Firefox in new window and find its HWND
In the following example code I open a new Firefox window, wait some time for the window to appear, and then I want to get its HWND.
#include <exception>
#include <stdio.h>
#include "...
2
votes
1
answer
142
views
GetWindowLongPtr with GWL_STYLE does not return all styles
I was trying to get all styles using GetWindowLongPtr(), but I ran into a problem: the function doesn't return WS_BORDER.
HWND input = CreateWindow(
L"EDIT", L"", WS_CHILD | ...
-1
votes
0
answers
129
views
What is WS_EX_STATICEDGE used for?
What is the extended window style WS_EX_STATICEDGE used for? How does it look like?
The documentation only says
The window has a three-dimensional border style intended to be used for items that do ...
Advice
0
votes
4
replies
96
views
How to clip a rectangle when calling AlphaBlend?
I call AlphaBlend for blitting an image with alpha channel from a memory DC to a window DC:
HBITMAP CreateBitmapForMemoryDC(HDC hdc, int width, int height, int bitCount)
{
BITMAPINFO bi;
...
0
votes
0
answers
53
views
What is the right way to add a custom shell command to my app in Windows 11? [duplicate]
I used to use the following registry file to add a custom right-click menu option for my app for a .jpg file - and it works correctly in Windows 10. But this feature of my app does not work any more ...
1
vote
1
answer
109
views
Running an EXE as another user from a LocalSystem Windows service using CreateProcessAsUser
I'm trying to launch a .exe through services.msc from the LocalSystem account. I want to run an application as another user through this executable.
I researched for a bit and found out that it's not ...
0
votes
0
answers
82
views
Win32 WSARecv function keeps timing out
I am working on a client-server application. The server listens for incoming connections from clients and then receives data after connection. After the server receives the data from the client it ...
2
votes
0
answers
119
views
Obtaining the serial number of an NVMe drive
I'm trying to retrieve the serial message of my internal drive. The IOCTL_STORAGE_QUERY_PROPERTY request does not return the actual number on NVME drives, but I haven't found any other well-documented ...
