Relative Content

Tag Archive for c++windowswinapi

My Windows application runs very slowly due to PeekMessage()

This application opens a window (no title bar or border) and types 012 based on keyboard input.
For some reason after compiling using g++, it takes 6-7 seconds to run (infact the icon of the executable takes 3-4 seconds to load after compiling, I have never seen that happen). The entire pc lags and the task manager also doesn’t show anything like memory leak or high cpu usage or anything.

My Windows application runs very slowly due to PeekMessage()

This application opens a window (no title bar or border) and types 012 based on keyboard input.
For some reason after compiling using g++, it takes 6-7 seconds to run (infact the icon of the executable takes 3-4 seconds to load after compiling, I have never seen that happen). The entire pc lags and the task manager also doesn’t show anything like memory leak or high cpu usage or anything.

Taskbar (Shell_TrayWnd) Transparency like in TranslucentTB using Win32 API

I’m trying to implement transparency for the taskbar (Shell_TrayWnd) in Windows, similar to the functionality that TranslucentTB has. However, in my implementation, the problem is that elements such as the Start button, search box, and attached programs also become transparent, which is not what I expected.

Positioning a Dialog in Win32 C++

I am trying to create a dialog such that it always opens in the middle of my application window. This is the usual behaviour for a dialog created with something like MessageBox(). However, if the application window is moved before the dialog is opened, the dialog opens in the middle of where the window WAS and not where it is now. So something behind the scenes is obviously caching the position of the window.

Why does NtQuerySystemInformation not work with x32 builds?

Within a x32 platform specific compiled exe, I need to get the path for a process (using a process id) without requiring elevated/admin rights. From my understanding the only way to do this is through the undocumented Windows API NtQuerySystemInformation and SystemProcessIdInformation.