by BadBazza » Jan 4, 2002 @ 4:13pm
Mirek, Digby and Dan - Thank you<br><br>All is working beautifully now, the (g) should of been a (b) and there was a closing bracket missing off the end. I have not thouroghly tested it but I have tried rgb(255,0,0), rgb(0,255,0) and rgb(0,0,255) and they produce what I would expect. For those interested the final macro is <br><br>#define rgb(r,g,b) ((unsigned short)((((r)<<8 ) &0xf800) +(((g)<<3)&0x07e0)+((b)>>3)))<br><br>Note 1: remove the space between the 8 and the )<br>Note 2: I had to use rgb instead of RGB as it looks like RGB is defined in wingdi.h<br><br>Thanks again for your help<br>Bad<br>
Lost....... Assumed Coding!