There are cases this could happen.How is the bitmap loaded into memory? What is your screen settings? What are the differencces?If you're using DDB, switch to DIB section.As a general comments, you should add more details into your posting.
Sounds reasonable. 16-bit per pixel could be either 5-5-5 or 5-6-5. GetPixel needs to convert 15-bit or 16-bit color int 24-bit color, and there are different ways of doing that.What are you doing with the returne value. Why do you need them to be exactly the same?One way to avoid the problem is figure out whether it's 5-5-5 or 5-6-5 and get DIB from the HDC, then convert to 24-bpp yourself.
除了操作系统不同,其他分辨率都是800×600,颜色都是16位色,可是在98系统和xp系统下却不一样,
关键代码是:
dc1:=getdc(getforegroundwindow());
mycolor:=getpixel(dc1,200,200);
可是mycolor的值却不一样,我转成16进制看,98下是ffc410,xp下是ffc308
而对另外一个点取色98下是787078,xp下是 736d73 why!why!why!