I try to use RGB() function from old examples and i'm found that
something not work properly in mine GUI examples.
Old code is:
Function RGB(sys red, green, blue) as sys
Function = red + green*256 + blue*65536
End Function
i also try this to:
Function RGB(sys red,green,blue) as sys
green *=256: blue *=65536
Return red+green+blue
End Function
And still i have wrong colors, it looks weird to me because in examples both
function works.
Then i found code for RGB() in DLib and finally this code work properly:
Function RGB(sys red,green,blue) as sys
sys color
color = red
color = color + green*256
color = color + blue*65536
Return color
End Function
Just for example i use RGB() function under
message WM_PAINT
After window is created set DC:
'create window
win = SetWindow("Test AwinH",x,y,w,h,0,winstyle)
INT hDC=GetDC(win)
Then under WM_PAINT:
CASE WM_PAINT
'draw vertical lines--------
For x = 5 to 10
For y = 100 to 300
PSet(hdc, x, y, 242,242,222)
Next
Next
ReleaseDC(win,hdc)
I hope that will be useful...