Hello CodeTrasher,
Although the documentation for BBB GUI is incomplete, BBB GUI is essentially a wrapper library of the Win32/Windows API. Here are some general resources that could help you out.
Controls library: Here is a good place to start for learning about specific controls.
Windows and Messages: Here is the place to learn about windows controls and the message queue.
Control Spy: A useful sandbox for learning how various styles, notifications, and messages effect controls.
In regards to your situation, what you need is to add the 'WS_CHILD' style to the window you want to anchor. In addition to that, the window that is being anchored must not have WS_CAPTION, WS_OVERLAPPEDWINDOW, or WS_TILEDWINDOW styles (By default, all windows with title bars can be moved by the user).
Here is the documentation for all the window styles.
Here is a quick example for you.
Rem BBBGUI_CONSTANTS
Rem ============
//=== EVENT ===========================================================================================
`Event messages
#constant WM_NULL 0x0000
#constant WM_CREATE 0x0001
#constant WM_DESTROY 0x0002
#constant WM_MOVE 0x0003
#constant WM_SIZE 0x0005
#constant WM_ACTIVATE 0x0006
#constant WM_SETFOCUS 0x0007
#constant WM_KILLFOCUS 0x0008
#constant WM_ENABLE 0x000A
#constant WM_SETREDRAW 0x000B
#constant WM_SETTEXT 0x000C
#constant WM_GETTEXT 0x000D
#constant WM_GETTEXTLENGTH 0x000E
#constant WM_PAINT 0x000F
#constant WM_CLOSE 0x0010
#constant WM_QUERYENDSESSION 0x0011
#constant WM_QUERYOPEN 0x0013
#constant WM_ENDSESSION 0x0016
#constant WM_QUIT 0x0012
#constant WM_ERASEBKGND 0x0014
#constant WM_SYSCOLORCHANGE 0x0015
#constant WM_SHOWWINDOW 0x0018
#constant WM_WININICHANGE 0x001A
#constant WM_DEVMODECHANGE 0x001B
#constant WM_ACTIVATEAPP 0x001C
#constant WM_FONTCHANGE 0x001D
#constant WM_TIMECHANGE 0x001E
#constant WM_CANCELMODE 0x001F
#constant WM_SETCURSOR 0x0020
#constant WM_MOUSEACTIVATE 0x0021
#constant WM_CHILDACTIVATE 0x0022
#constant WM_QUEUESYNC 0x0023
#constant WM_GETMINMAXINFO 0x0024
#constant WM_SIZING 0x0214
//=== WINDOW =====================================================================================
`Window styles
#constant WS_OVERLAPPED 0x00000000
#constant WS_MAXIMIZEBOX 0x00010000
#constant WS_MINIMIZEBOX 0x00020000
#constant WS_THICKFRAME 0x00040000
#constant WS_CAPTION 0x00C00000
#constant WS_SYSMENU 0x00080000
#constant WS_POPUP 0x800000000
#constant WS_VISIBLE 0x100000000
#constant WS_HSCROLL 0x00100000
#constant WS_VSCROLL 0x00200000
#constant WS_MINIMIZE 0x20000000
#constant WS_MAXIMIZE 0x01000000
#constant WS_DLGFRAME 0x00400000
#constant WS_DISABLED 0x08000000
#constant WS_CLIPSIBLINGS 0x04000000
#constant WS_CLIPCHILDREN 0x02000000
#constant WS_CHILD 0x40000000
#constant WS_BORDER 0x00800000
#constant WS_OVERLAPPEDWINDOW 13565952
`Window ex styles
#constant WS_EX_DLGMODALFRAME 0x00000001
#constant WS_EX_NOPARENTNOTIFY 0x00000004
#constant WS_EX_TOPMOST 0x00000008
#constant WS_EX_ACCEPTFILES 0x00000010
#constant WS_EX_TRANSPARENT 0x00000020
#constant WS_EX_MDICHILD 0x00000040
#constant WS_EX_TOOLWINDOW 0x00000080
#constant WS_EX_WINDOWEDGE 0x00000100
#constant WS_EX_CLIENTEDGE 0x00000200
#constant WS_EX_CONTEXTHELP 0x00000400
#constant WS_EX_RIGHT 0x00001000
#constant WS_EX_LEFT 0x00000000
#constant WS_EX_RTLREADING 0x00002000
#constant WS_EX_LTRREADING 0x00000000
#constant WS_EX_LEFTSCROLLBAR 0x00004000
#constant WS_EX_RIGHTSCROLLBAR 0x00000000
#constant WS_EX_CONTROLPARENT 0x00010000
#constant WS_EX_STATICEDGE 0x00020000
#constant WS_EX_APPWINDOW 0x00040000
`Disable inheritence of mirroring by children
#constant WS_EX_NOINHERITLAYOUT 0x00100000
`Right to left mirroring
#constant WS_EX_LAYOUTRTL 0x00400000
#constant WS_EX_COMPOSITED 0x02000000
#constant WS_EX_NOACTIVATE 0x08000000
Rem ============
Sync On
Sync Rate 60
BBB App_Start
DBProWindow = BBB App_GetDBProWindow()
BBB App_SetMainWindow DBProWindow
BBB Window_SetStyle DBProWindow, BBB Window_GetStyle(DBProWindow)||WS_CLIPCHILDREN||WS_CLIPSIBLINGS
Rem Anchored child window
Window1 = BBB Window_Make( BBB Window_GetClientWidth(DBProWindow), 100, "", DBProWindow, 0, WS_CHILD||WS_BORDER )
BBB Window_SetPosition Window1, 0, BBB Window_GetClientHeight(DBProWindow) - 100
Rem Server GUI Controls
GroupBox1 = BBB Groupbox_Make( 5, 5, BBB Window_GetClientWidth(DBProWindow) - 300, 90, "Server GUI Controls", Window1 )
Button1 = BBB Button_Make( 25, 25, 120, 30, "Controls", GroupBox1 )
Rem Logging
Listbox1 = BBB Listbox_Make( BBB Window_GetClientWidth(Window1) - 210, 5, 200, 90, "", Window1, 0 )
Item1 = BBB Listbox_AddItem( Listbox1, "Log Messages..." )
Item2 = BBB Listbox_AddItem( Listbox1, "Log Messages..." )
Make Object Box 1, 2, 2, 2
Do
Rem Message Loop
Repeat
BBB App_GetEvent
handle = BBB App_GetEventHandle()
message = BBB App_GetEventMessage()
If handle = BBB App_GetMainWindow() And message = WM_CLOSE
End
EndIf
Until message = WM_NULL
YRotate Object 1, Object Angle Y(1) + 1
Sync
Loop
If you want a child window with a title bar that can't be moved, I could elaborate how you could accomplish that if you are interested.
Good luck with your AI programming challenge. Feel free to ask me more questions if you need help.