You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.
Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.
#constant user32 1
load dll "user32.dll", user32
startBlue "user", "key"
mainWin = createGadgetFromWindow(mainWindow())
// Create random window and try to child it to the main window
hChildWindow = createWin(0, 0, 400, 400, -2147483648) // NO_BORDER style
while not quit
if eventSource() = mainWin then quit = 1
// Creates a window and returns its HWND (I'm using BlueGUI to create the window here for simplicity, but any other way should probably work)
function createWin(x, y, width, height, style)
win = createWindow(x, y, width, height, "Text", (style || 0x40000000), 0, 1, 0) // Add the WS_CHILD style
// Also, let's add some components to the window so as to make it clearly discernable
lbl = createLabel(0, 0, gadgetClientWidth(win), gadgetClientHeight(win), "I am a label belonging to the child window", win)
hwnd = windowHandle(win)
// Wraps the user32.dll function SetParent
function setParent(hChild as dword, hParent as dword)
call dll user32, "SetParent", hChild, hParent
Because Oct(31) = Dec(25)
Login to post a reply