All Questions
169
questions
0
votes
1
answer
89
views
Auto-calculate width for standard WinAPI controls
I am trying to write a general-purpose function to automatically calculate the width of several standard types of WinAPI controls based on the current caption/text content. This code works very well ...
0
votes
0
answers
151
views
How to force a process to start invisible?
I want to start a PDF viewer as an invisible process, force it into a control, and display it again. But the viewer seems to refuse to start invisible. I have already tried these start parameters:
...
0
votes
1
answer
117
views
How do edit controls work internally? class windowProcedure and allocated buffers
CreateWindowEx creates a window, and if you set the lpClassName parameter as "Edit" it creates an edit box.
I know that lpClassName has his own WindowProcedure registered to its structure. ...
0
votes
0
answers
679
views
CUSTOMDRAW in Win32 Header not appropriately drawing outside columns area
I am currently subclassing a ListView control to support custom color schemes - especially Dark Mode themes.
So first, I changed the ListView and associated Header with:
SetWindowTheme(hwndListView, ...
0
votes
2
answers
426
views
WinAPI rebar control not showing up
I'm working on a pure WinAPI application in C++ and I want to add a toolbar that lives inside/on a rebar control. I can create and add the toolbar but I can't get the rebar to show up (there are no ...
2
votes
0
answers
54
views
With BCM_SETIMAGELIST who destroys the HIMAGELIST?
I was looking at BCM_SETIMAGELIST but it's not clear who is supposed to destroy the HIMAGELIST? If the one who created it, could WM_NCDESTROY be used to simple BCM_GETIMAGELIST and destroy it or ...
0
votes
0
answers
191
views
Can we add WM_POINTERDOWN message to a window win32 ListView controls?
Since touch devices are very popular, can we add a wm_pointerdown/up message to listview controls?
I have tried to do it like this:
case WM_POINTERDOWN:
{
SendMessage(hWndListView,...
-1
votes
1
answer
382
views
New control button doesn't have the correct Windows ID
I have a Window form application in C++.
I added a new button and linked it to a function called ChangeTitle.
But when I run the application and I press the button, it doesn't call the function.
I ...
0
votes
1
answer
222
views
Scrolling text gets negated in static control (C++ WinAPI)
I have some weird control,
CreateWindowEx(!tset&USE?WS_EX_OVERLAPPEDWINDOW:0,
tset&USE?"static":"edit",0,WS_CHILD|WS_VISIBLE|
(!tset&USE?ES_MULTILINE|ES_WANTRETURN|...
1
vote
0
answers
165
views
What "disadvantages" will I have if I use CreateWindow*() instead of CreateDialog*() functions family?
What disadvantages will I have if I use CreateWindow*() instead of CreateDialog*() functions family to create controls in the long run? e.g., are there things meant to work with dialogs and by using ...
0
votes
1
answer
78
views
Can I make a property sheet without resource script?
I'd like to add controls to a property sheet without resource script, rather using pure code.
The reason for this I'd like to create a property sheet(mimicking C#'s property grid), calling C routines/...
0
votes
1
answer
243
views
What's the proper place to call InitCommonControlsEx()?
I'm learning WINAPI, so I'm dealing with tab control, which requires to call InitCommonControlsEx() but where's the proper place to call it? when WM_CREATE message is received in the windows callback ...
0
votes
2
answers
589
views
Creating ComboBox in Win32 not working properly
I am creating a Win32 ComboBox for the first time. And I have a problem here.
When calling CreateWindow for the ComboBox, it calls the WndProc callback function again with the WM_CREATE message, so ...
1
vote
2
answers
144
views
Determine whether a focused window has an active caret
Following _isEdit function detects whether input could be applied to the currently focused control:
class function TSpeedInput._getFocusedControlClassName(): WideString;
var
lpClassName: array[0.....
0
votes
1
answer
323
views
PtInRect not picking up when a point (should) be within a rect
I have a Win32 program in which I need to detect if a button has been clicked, however the button's default functionality has been broken due to it being located on top of another control (a tab ...