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
4
votes
1 answer

Why does GetWindowLong have ANSI and Unicode variants?

I found out today that GetWindowLong (and GetWindowLongPtr) has 'ANSI' (A) and 'Unicode' (W) flavours, even though they don't have TSTR arguments. The MSDN page on GetWindowLong only indicates that these variants exist, but doesn't mention why. I…
user824425
4
votes
3 answers

How do I create Windows in D with win32?

Hello I'm trying to open a window with win32 in D, and I've got a little problem. The program crashes when I call CreateWindowA. Here is my code : this.fenetrePrincipale = CreateWindowA(this.classeFenetre.lpszClassName, toStringz(title),…
4
votes
2 answers

MFC CheckBox - retrieve accurate square size

The problem has been discussed here, but people settled for an inaccurate solution. I'm using a CButton class with a BS_AUTOCHECKBOX flag. Is there a precise way to determine the size of the square with a black border (which holds the checkmark) on…
mrdecompilator
  • 155
  • 1
  • 8
4
votes
1 answer

Owner and Owned window Activation issue

In an experimental code, when creating three top level windows with hierarchical ownership I am seeing weird behavior when dismissing them in reverse order. Code: #include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int…
subdeveloper
  • 1,381
  • 8
  • 21
4
votes
1 answer

select any folder as startfolder for browsing (win32gui,win32com, SHGetFolderLocation)

I want to start with a folder e.g. C:\test instead of any of the predefined CSIDL_* folders. How can I achieve that? ''' python 3.6.2 ''' import os import win32gui from win32com.shell import shell, shellcon myfolder_pidl =…
AcK
  • 2,063
  • 2
  • 20
  • 27
4
votes
2 answers

embed cmd in win32 application and text not selectable

I write both gui and console program. For console I use color output like \33[0m. For gui I need to write more code, if I switch to another gui library I need to rewrite the code. Some simple library(I'm currently using) doesn't even have api…
aj3423
  • 2,003
  • 3
  • 32
  • 70
4
votes
1 answer

Error installing win32gui

I am trying to install win32gui using pip and i am getting syntax error. I am using Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 the error i am getting Collecting win32gui Using cached…
Rakshith Nt
  • 129
  • 7
4
votes
1 answer

WinAPI - button cannot be clicked

I want to make a panel, which groups buttons by itself: HWND my_panel = CreateWindow( "STATIC", "", WS_VISIBLE | WS_CHILD | WS_BORDER, 30, 100, 300, 300, main_window, // main dialog NULL, ( HINSTANCE )…
4
votes
3 answers

Python 'No module named win32gui' after installing pywin32

Running python 3.6 on windows 8. ModuleNotFoundError: No module named 'win32gui' I have tried multiple installations of pywin32 but none have worked so far. https://sourceforge.net/projects/pywin32/files/pywin32/Build%20221/ goes through…
mtbrands
  • 142
  • 2
  • 3
  • 12
4
votes
2 answers

How to append data on a file in win32

I've searched to do this but I can't find what am I doing incorrectly.I'm trying to make this function appends data every time it's called but it always do it once. If the file doesn't exist it creates a new one and write on file for ONLY once if…
Hossam Houssien
  • 359
  • 4
  • 14
4
votes
1 answer

DPI Scaling Level affecting win32gui GetWindowRect in Python

When GetWindowRect() is called in Python, the values it returns are inaccurate if a DPI scaling level of anything but 100% is used. Is there any way to get around this, or mathematically adjust?
jezza
  • 111
  • 1
  • 1
  • 10
4
votes
1 answer

event handling of balloon tip with win32gui

I'm currently using a slightly modified version of the common example of the systemtray. #!/usr/bin/env python # Module : SysTrayIcon.py # Synopsis : Windows System tray icon. # Programmer : Simon Brunning - simon@brunningonline.net # Date …
4
votes
2 answers

Reading a PyCBitmap with OpenCV

I created an image from a window screenshot using Win32gui. The object has the type: object 'PyCBitmap' - assoc is 000002AF9A64DB50, vi= I want to then pass this for analysis with OpenCV. I have had success reading in a saved .bmp file…
Behzad
  • 123
  • 1
  • 1
  • 11
4
votes
2 answers

Why doesn't Ctrl + A work in CEdit?

I have been working in a MFC project and i have seen that Ctrl + A does not work for any of the CEdit used in this project. But if i add the following lines in the StdAfx.h file of my project, suddenly it starts working. #pragma…
Rasheduzzaman Sourov
  • 1,375
  • 2
  • 15
  • 36
4
votes
0 answers

DLL Injection With Windows 8.1 PE

I tried Dll Injection on windows 8.1 P.E., works fine with explicitly installed applications but it doesn't work with notepad, calc or internet explorer. My idea is that from windows xp onwards it is not supported like this way but didn't find…