Real group gadget in b+, but weird bug...

BlitzPlus Forums/BlitzPlus Programming/Real group gadget in b+, but weird bug...

skn3(Posted 2003) [#1]
You need the sendmessage userlib
.lib "user32.dll"
SendMessage%(hwnd,msg,wParam,mPAram):"SendMessageA"


And this test program
window = CreateWindow("test window",100,100,300,300,0,1+2)
group  = creategroupbox("testing",10,10,ClientWidth(window)-20,ClientHeight(window)-20,window)

Repeat
	Select WaitEvent()
		Case $401 : Notify "clicked group"
		Case $803 : End
	End Select
Forever

Function CreateGroupBox(label$,x,y,width,height,parent)
	;create blitz gadgets
	gadget = CreateButton(label$,x,y,width,height,parent,1)
	HideGadget gadget
	SendMessage(QueryObject(gadget,1),244,7,True)
	ShowGadget gadget
	;return gadget
	Return gadget
End Function


Now it works out of the box like that,.. but now try resizing the window.. weird!



Anyone know what is going on here?


Perturbatio(Posted 2003) [#2]
It doesn't look like it's being repainted or invalidated or whatever terminology the winapi uses.


skn3(Posted 2003) [#3]
Oh yeah, although it is possible to create the group gadget.. it is unfortunatly not possible to parent other gadgets to a button (BAH!!!!)

So it is usable, just not as easy as it should be !