43,729 questions
1
vote
0
answers
89
views
Can't test for occlusion of window using DXGI
What I'm looking for is a way to test for occlusion of a window, either by the pointer to the swapchain resource that it is associated with or with the handle to the window itself, though any other ...
0
votes
0
answers
148
views
SHGetFileInfo on EXE files occasionally incorrectly gives generic app icon system image list index (2), with various flags attempted
I have a ListView which displays small icons for files in the Report mode, including EXE files.
The ListView's system image list was first initialized by calling SHGetFileInfo on a dummy filename, and ...
3
votes
1
answer
129
views
Jittering when resizing window vertically
When resizing the window by dragging the bottom edge, jittering occurs. However, if I resize the window by dragging the right edge, this jittering does not occur. How can I fix this?
Inside my window ...
6
votes
1
answer
212
views
In Windows 10, is there any way to determine whether a file extension has a *real* association?
It seems that Windows 10 likes to give the fallback "Open With" handler location when querying an un-associated file extension's handler, so this GetAssociatedExecutable() function doesn't ...
0
votes
1
answer
128
views
Update edit control after drawing text on it
I have an EDIT control with text as a message window (I need an edit control to select and update text).
I need to draw other text on it, as time sent in a bottom corner. I draw it in WM_PAINT and the ...
-2
votes
1
answer
164
views
Win32 C++ ListView LVITEM pszText string lifetime - getting gibberish characters
I have ListView item labels stored as an std::vector of std::wstring . Something about the lifetime of the string I convert from std::wstring to LVITEM's pszText in a utility function is causing ...
2
votes
1
answer
228
views
CMD title issues
I'm developing a little C++ key bind application. One of the key binds I'm adding is Ctrl+Alt+E. What I want it to do is find if I have a focused CMD window and get the current working directory (CWD) ...
Advice
0
votes
2
replies
98
views
NtQuerySystemInformation returns zero ImageBase on Windows 11 25H2 — how to get kernel base without admin?
I'm writing a tool that needs the base address of ntoskrnl.exe at runtime. On Windows 10 and Windows 11 up to 23H2, this works:
NtQuerySystemInformation(SystemModuleInformation, buf, size, &size);...
2
votes
1
answer
204
views
Why doesn't my program show a tooltip to a button?
I need to create button with a tooltip. The program shows the button, but doesn't show the tooltip.
I have created a MRE to show the problem. The button and tooltip are created in a CreateButton() ...
0
votes
0
answers
106
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
88
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
83
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
114
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
1
answer
141
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 ...
2
votes
1
answer
158
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 | ...