-
DirectDraw RGB Color
I want to fill a directdraw suuface with a specific color so i do:
Code:
dim color as long
dim ddrval as long
color = DirectXObject.CreateColorRGB(0,150,0)
ddrval = objDDPrimSurf.BltColorFill(r1, color) 'r1 being the rectangle I want to fill
I do not specify a color bit rate when I start DirectDraw (it's a windowed direct draw app). When I run this I should get a green surface but I don't!!! what do I do to fix?? (I think the problem is DirectXObject.CreateColorRGB() giving me the wrong color value)
-
Usually just RGB(0, 150, 0) will work.
If you are running under 16 bits you should use the DDColour function created by Jack Hoxley. It's at the DirectX 4 VB site (look around a bit).
His site is...
http://www.vbexplorer.com/directx4vb/