@HowDo
Hmmmm... The original problem I had with adding any windows to DBC (not sure if it applies to DBPro) is the render area of DB can cover up the window. That is why I have one of the flags set to WS_POPUP.
Try setting the mode to windowed mode but keep the rendering area smaller than the window size. Using windowed mode, you can remove WS_POPUP. I don't know if DBPro behaves the same way as DBC in this regard but try this code (change the | to ||):
rem win32 api Status Window example
rem by Latch
rem dec 11 2008
set window on
set display mode 640,480,32
maximize window
cls 255
sync on
sync rate 0
rem load dll
user32=1
comctl32=2
load dll "user32.dll",user32
load dll "comctl32.dll",comctl32
rem get main window handle
hwnd=call dll(user32,"GetActiveWindow")
WS_CHILD = 1073741824
WS_VISIBLE = 268435456
WS_POPUP = 2147483648
CCS_TOP = 1
SB_SETPARTS = 1024 + 4
SB_SETTEXT = 1024 + 1
rem make status window
call dll comctl32,"InitCommonControls"
stext$="Dark BASIC Status Window Text"
statushwnd=call dll(comctl32,"CreateStatusWindowA",WS_CHILD|WS_VISIBLE,stext$,hwnd,1)
rem add 5 boxes
make memblock 1,5*4
write memblock dword 1,0,text width(stext$)
write memblock dword 1,4,400
write memblock dword 1,8,500
write memblock dword 1,12,600
rem the last box I want to extend to the edge so I have to write -1
rem only way to do that with a DBC memblock is to write a float or
rem 4 bytes
write memblock byte 1,16,255
write memblock byte 1,17,255
write memblock byte 1,18,255
write memblock byte 1,19,255
memptr=get memblock ptr(1)
call dll user32,"SendMessageA",statushwnd,SB_SETPARTS,5,memptr
rem put different text in the boxes
a$="Box 2"
b$="box 3"
c$="box 4"
d$="box 5"
call dll user32,"SendMessageA",statushwnd,SB_SETTEXT,1,a$
call dll user32,"SendMessageA",statushwnd,SB_SETTEXT,2,b$
call dll user32,"SendMessageA",statushwnd,SB_SETTEXT,3,c$
call dll user32,"SendMessageA",statushwnd,SB_SETTEXT,4,d$
rem move focus from status window to main window
call dll user32,"SetFocus",hwnd
make object cube 1,25
do
a$="THE TIME IS "+get time$()
call dll user32,"SendMessageA",statushwnd,SB_SETTEXT,1,a$
turn object left 1,.1
text 0,0,str$(screen fps())
sync
loop
Also with this set of commands:
write memblock dword 1,4,400
write memblock dword 1,8,500
write memblock dword 1,12,600
the value being written to the memblock is the the right border position of the boxes after box 1 : 2=400 3=500 4=600
But for box 5, I want the border to be to the end of the window so I have to write the value of -1 to memblock position 16. However, DBC only writes unsigned longs as DWORDs do I have to write 4 bytes to positions 16,17,18, and 19 that equal -1. Maybe it will make a difference if you just write a DWORD of -1 to position 16 and not the 4 bytes.
Enjoy your day.