Is there any easy slider-solution
I created a function, but a little bit complicated.
The rest of the gradientpainter is working
Now I can select any background
maybe a calculation of the basic-RGB-value possible ?


I tested saving and loading the basic-gradientbitmap
next using the nrow position from the slider to get the color
FUNCTION GETCOLOR( nRow, nCol, oBmp )
LOCAL hDC := CreateCompatibleDC( oBmp:GetDC() )
LOCAL hBmp := ReadBitmap( 0, "Picker.bmp" ) // the basic gradient bmp
LOCAL hOldBmp := SelectObject( hDC, hBmp )
LOCAL nRGBColor := GetPixel( hDC, nCol, nRow )
SelectObject( hDC, hOldBmp )
DeleteObject( hBmp )
DeleteDC( hDC )
oBmp:ReleaseDC()
RETURN nRGBColor
best regards
Uwe
I created a function, but a little bit complicated.
The rest of the gradientpainter is working
Now I can select any background
maybe a calculation of the basic-RGB-value possible ?
I tested saving and loading the basic-gradientbitmap
next using the nrow position from the slider to get the color
FUNCTION GETCOLOR( nRow, nCol, oBmp )
LOCAL hDC := CreateCompatibleDC( oBmp:GetDC() )
LOCAL hBmp := ReadBitmap( 0, "Picker.bmp" ) // the basic gradient bmp
LOCAL hOldBmp := SelectObject( hDC, hBmp )
LOCAL nRGBColor := GetPixel( hDC, nCol, nRow )
SelectObject( hDC, hOldBmp )
DeleteObject( hBmp )
DeleteDC( hDC )
oBmp:ReleaseDC()
RETURN nRGBColor
best regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.