All Questions
11,119
questions
0
votes
0
answers
33
views
Unexpected rounded corners in Qt Frameless Widget
Unexpected rounded corners in Qt Frameless Widget
I use Qt and Windows API to create a window with a custom title bar, and I want this window to have some of the effects of a Windows window (maximize, ...
0
votes
0
answers
23
views
Native file open dialog in Windows Ruby
As far as I understand, there are no gems which help to open native file dialogs, so I am interested in writing one, specifically for Windows
I'm stuck at the first step which is getting the CLSID for ...
-10
votes
0
answers
70
views
"undefined reference to `WinMain@16'" error in VS Code. Same program runs fine in online compilers [closed]
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
This error happens every ...
2
votes
2
answers
96
views
I want to detect who causes a WM_COMMAND to be fired?
Background: I have an application with context menu, normal menu and accelerator.
I have a paste command and in case the context menu was opened with the mouse, the paste operation should use the ...
0
votes
0
answers
57
views
How to Prevent Resizing Desktop Icon Window with Hotkey in Windows Application? [duplicate]
I've got a program that resizes the foreground window when a hotkey is entered:
// Sample.cpp
#ifndef UNICODE
#define UNICODE
#endif
#include "Sample.h"
int WINAPI wWinMain(
_In_ ...
0
votes
0
answers
91
views
Wake from "Modern Standby" not consistent (SetWaitableTimer)
I maintain a Windows service that runs in session 0. It performs maintenance tasks at certain times in a similar way to the Windows task scheduler. If the system is asleep, it uses SetWaitableTimer() ...
-1
votes
0
answers
56
views
Changing Taskbar (Shell_TrayWnd) Color to Transparent
I found a way to change color to fully transparent, by researching structure of DesktopWindowXamlSource of Taskbar (Shell_TrayWnd).
DekstopWindowXamlSource structure:
I'm curious is it possible to ...
0
votes
0
answers
82
views
Is it possible to turn the display off knowing the monitor handle [duplicate]
I can control the monitor brightness using DeviceIoControl and handle to the display device:
handle = CreateFile(monitor, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
But I also ...
0
votes
1
answer
75
views
NetShareEnum giving no results
I've been working on a function to enumerate shares in Windows using Win32 C++ and hit a snag.
net share shows all the shares with the default shares and that is good. But for some reason with the ...
1
vote
1
answer
74
views
How to externally set CPU core affinity for a process on Windows systems with 64+ cores?
I am working on optimizing a multi-threaded application on a Windows system with more than 64 cores. Typically, I would use the SetProcessAffinityMask function to set the CPU core affinity for the ...
0
votes
1
answer
77
views
Windows resource file (.rc) : RTEXT vs. LTEXT with WS_EX_RIGHT style
While doing localisation of dialogs in an .rc file I came upon following difference in the definition of a right aligned static control:
in the original resource file a static control in a DIALOGEX ...
0
votes
1
answer
81
views
How to extract public key programmatically using win32 for a certificate stored in certificate store
I have imported a crt file to Personal Certificates in Local Computer.
I can extract the same public key using base 64 encoded X509 .CER option using MMC.
My goal is to programmatically get this ...
1
vote
1
answer
88
views
How to read a raw disk without locking/dismounting the volume, using Win32 API?
This StackOverflow question has an answer that requires the volume to be locked/dismounted, but it seems this is not necessarily required. When I use the hex editor HxD (Tools > Open disk) to open ...
2
votes
3
answers
158
views
Launching an Application with Normal User Privileges from an Administrator-Privileged Instance
I'm developing a custom installer for my application, because I need to configure some peculiar settings that InnoSetup and other similar tools don't allow. The installer requires administrator ...
0
votes
0
answers
56
views
How to get current linked lane count of a USB 3.2 Gen 2x2(20Gb/s) device using Windows APIs
I can get USB 3.2 Gen 2(10Gb/s) current linked one lane information from DeviceIsOperatingAtSuperSpeedPlusOrHigher using IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2.
How can I get current linked ...