Questions tagged [win32gui]

NOT FOR GENERAL WIN32 PROGRAMMING QUESTIONS (use [winapi])! This is ONLY for questions about the "Win32GUI" library, which is a C++ library for Win32 GUI programming.

Win32GUI is a C++ generic library for Win32 GUI programming.

It features real GUI RAII (Resources Acquisition Is Initialization), event handling, easy manipulation of standard controls, thread-safety and simple menu handling.

865 questions
6
votes
1 answer

Pywinauto: How to resize active window

I'm trying to automate some windows tasks and I got a dataframe of all windows opens, and then I added some more coluns in order to make some validations before proceed with the automation. After I activate a window from set_focus() function, I'm…
Guilherme Matheus
  • 573
  • 10
  • 30
6
votes
4 answers

How to draw an empty rectangle on screen with Python

I am not an expert and I am trying to show a rectangle on screen which follows mouse movements from a settle starting point, just as when you select something in word or paint. I came with this code: import win32gui m=win32gui.GetCursorPos() while…
José Chamorro
  • 497
  • 1
  • 6
  • 21
6
votes
0 answers

Handle/Prevent a non UWP Win32 application from being suspended in Windows 10

I have a legacy Win32 application written in C++ that runs on the system continuously to monitor system health related parameters. Recently, I started facing an issue with the application getting suspended and becoming unresponsive thereafter on…
iqstatic
  • 2,322
  • 3
  • 21
  • 39
6
votes
1 answer

Removing notification from notification center windows 10

I've been using win32api in Python3 to create a Windows 10 application that supports toast notifications. I already have a system tray icon for my app, I'm adding toast notifications using the following code def show_toast(self,msg,title): …
TOC666
  • 101
  • 4
6
votes
2 answers

simple c programming gui

I developed the steam table equation solver in C language...but the inputing the values in black screen console is boring. So I strictly wanted to create simple GUI in C. I searched for hello world codes, all were pretty long. But this was the only…
Santosh
  • 1,871
  • 1
  • 19
  • 36
5
votes
1 answer

Message Box Error : foreign import unsafe

import Graphics.Win32 import System.Win32.DLL import Control.Exception (bracket) import Foreign import System.Exit main :: IO () main = do mainInstance <- getModuleHandle Nothing hwnd <- createWindow_ 200 200 wndProc mainInstance …
user925064
5
votes
1 answer

How is the "blocking" behavior of Win32 API GetMessage() implemented?

According to here, GetMessage() is a blocking call which won't return until there's a message can be retrieved from the message queue. So, how is this blocking behavior implemented? Does GetMessage() use some kind of spin lock so that the UI thread…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
5
votes
2 answers

Python PyHANDLE object in win32gui

I've been playing around trying to create a transparent window that will overlay another application. I'm finding the win32 extensions are a bit of a mess, there's win32ui, win32gui, winxpgui, etc. somewhat confusing. Anyway, I'm trying to pass a…
Aaron Curtis
  • 53
  • 1
  • 1
  • 5
5
votes
1 answer

Non blocking http request loop

I would like to write a simple systray app which checks the status of some web service and changes its icon according to the response given. I'm straggling to do it non-blocking way so that the program is still responsive as it fires http requests…
zzart
  • 11,207
  • 5
  • 52
  • 47
5
votes
2 answers

How to get the default caption bar height of a window in Windows?

I am developing an application which employs a self-drawn titlebar, which needs to mimic the system default titlebar. So how could I get the default titlebar height of an overloapped window in Windows?
Jichao
  • 40,341
  • 47
  • 125
  • 198
5
votes
1 answer

How to get desktop item count in python?

I'm trying to get the number of items on the desktop using win32gui in python 2.7. The following code: win32gui.SendMessage(win32gui.GetDesktopWindow(), LVM_GETITEMCOUNT) returns zero and I have no idea why. I wrote win32api.GetLastError()…
Ella Sharakanski
  • 2,683
  • 3
  • 27
  • 47
5
votes
2 answers

Win32 scrolling examples

Could anyone point me to (or provide?) some nice, clear examples of how to implement scrolling in Win32? Google brings up a lot of stuff, obviously, but most examples seem either too simple or too complicated for me to be sure that they demonstrate…
Christopher
  • 51
  • 1
  • 2
5
votes
1 answer

pywin32 win32gui GetPixel fails predictably near 10,000th call

When running the following block of code, GetPixel starts throwing errors at around the 10,000th call every time. If I put the code in a try-except statement and all calls after the initial faliure will fail. The only way to recover is to terminate…
John Smith
  • 51
  • 1
  • 2
5
votes
2 answers

Python: How to get the text label from another program window?

I want to read text labels from another program, with Python. I think I have to use WM_GETTEXT, but I don't know how and I couldn't find anything on the internet. My program gets the active window, but doesn't read the text labels. So I hope that…
Xirama
  • 51
  • 1
  • 7
5
votes
1 answer

How can I center a Dialog Box over main program window position?

I've got this code to open an InputBox defined on a DLL that get HMODULE that I save on hInstance variable when main program calls. How can I center it over the main program window? It occurs that doesn't work and shows the DialogBox on top left on…
anrapas
  • 55
  • 1
  • 3
1 2
3
57 58