In .NET windows forms application the child control object gets its native handle HWND at constructor. and before setting its parent.
while in win32 API CreateWindow function requires to create child window (WS_CHILD) to provide handle to its parent window
for example
c#
Button bt1=new Button();// the handle is create here
form1.Controls.Add(bt1); // parent is set here
c++
CreateWidnow("BUTTON","OK",WS_CHILD|WS_VISIBLE,100,100,40,20,hWndParent,1,hInstance,0);
My question is how .NET managed to create HWND for child control without specifying its parent HWND? thanks in advance