change window color without panel

BlitzMax Forums/BlitzMax GUI Programming/change window color without panel

Well i was goofing around trying to skin my textfield using this command.. No luck yet.. but it does work on the window itself.
[code]
Global windowt:TGadget = CreateWindow("My win",GadgetWidth(Desktop())-240,0,240,GadgetHeight(Desktop()),Desktop(),1)
hWnd = QueryGadget(windowt,1)
hBrush = CreateSolidBrush( 0 )
SetClassLongA(hWnd, -10, hBrush)
[\code]

bah how do you put that in a code box again i forgot.

use a slash, not a backslash

Can you clarify your example with a more detailled stuff ?

Ok ill clarify sorry, heh heh. Im still working on finding the WinAPI commands to change the colors of an Edit control. But here is a more detailed code example
you could probably use an import command for the user32 and gdi32.. however in the program im doing i added a couple functions that werent in the default user32 source file. So i plopped them in a subdirectory.
Include "bin\user32.bmx"
Include "bin\gdi32.bmx"

Global windowt:TGadget = CreateWindow("win",240,240,240,240,Desktop(),1)
'first simply query the object
hWnd = QueryGadget(windowt,1)
'then create the brush.. Where the 0 is inside the function
'your color should be in RGB(###,###,###) format.. but i 
'dont see that command in Bmax.
hBrush = CreateSolidBrush( 0 )
'then do a setclasslong using -10 which the const for it is
'GCL_HBRBACKGROUND
SetClassLongA(hWnd, -10, hBrush)

'now the window will be in the color you specified!


that little script just makes the window black. Id have to look up how to convert RR,GG,BB to just RGB as one int

I think windows have a built-in panel. That code will make all your panels to that color, I think.