0

What is the contribution of HINSTANCE in Win32 Child Windows?

I know that the parent window requires a HINSTANCE that is used by the processor to identify a specific process in Win32 API Windows. But what if I don't provide HINSTANCE for the child windows like Button Static Edit Listbox Listview ... Etc Will that make a difference if I provide the HINSTANCE a NULL in those child widgets? Will the HINSTANCE of parent not be enough to identify it's children?

5th Oct 2022, 5:54 PM
CoderBittu
CoderBittu - avatar
1 Réponse
0
When creating child windows such as buttons, static controls, edit controls, etc., in Win32, it's typically not necessary to explicitly specify the HINSTANCE of the parent window. The operating system automatically uses the HINSTANCE of the parent window because child windows are created within the context of the parent window. Therefore, not providing an HINSTANCE for child windows usually doesn't make a difference, as the HINSTANCE of the parent window is sufficient for identifying and managing its children.
27th Mar 2024, 8:15 PM
D1M3
D1M3 - avatar