Use a window handle as an owner for a VB6 form
What is the Win32 equivalant of Form2.Show vbModeless, Form1
that allows me to set the owner (not the parent) to an arbitrary hWnd and set the default position, etc?
I'm not sure what you are trying to accomplish, but I think you might be looking for the SetParent function.
Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
hWndChild is the handle to the child window.
hWndNewParent is the handle to the new parent. Pass null (0 if I remember correctly) to make the desktop the owner.
You can find more information about it here.
精彩评论