Shigoto Shoujin

Shigoto Shoujin dev blog, mostly C and C++

ShigotoShoujin on github - Discussions
12 October 2021

When does .NET create window handles?

ILSpy

In the current ui classes, adding controls to an instance of the DialogWindow class requires telling each control about the parent window handle, since the actual window is created inside the CTor without the WS_VISIBLE style.

This is displeasing, but what are the alternatives? Maybe letting the DialogWindow instantiate them. But how does the .NET framework do it?

Enter ILSpy.

The answer was found in System.Windows.Forms.Control.ControlCollection, function Add. This is where the actual window handle creation occurs, using the current control window handle as the parent. Until that, the control instance acts as a kind of properties definition only.

This needs to be done in the ui.

Adding posts to Jekyll

This is not working. New files have been added to the _posts folder, following the required format. They have been pushed to the main branch. https://shigotoshoujin.github.io is not updating, at all.