From: "Bengt Rosenberger" Newsgroups: comp.os.msdos.djgpp Subject: allegro getpixel()-problem! Date: Tue, 28 Apr 1998 15:36:31 +0200 Organization: Unlimited Surprise Systems, Berlin Lines: 22 Message-ID: <6i4m14$da7$1@unlisys.unlisys.net> NNTP-Posting-Host: n31-107.berlin.snafu.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I want to use a button (it's a bitmap(125x75)) in the middle of the screen. Now I blit a black/white-bitmap of that button directly behind the originally one. When the button is pressed with left mouse button I try to check if the color behind is white. I use: col = getpixel(buttonbw, mouse_x, mouse_y); if (col = 255) button_pressed(); When the button is pressed in the middle of the screen, the return col is -1. But if I press the left mouse button in the upper left corner, the return col is 255 but the b/w button is in the middle of the screen. And it seems as the button would be in the upper left corner but is shown in SCREEN_W / 2 - button->w/2, SCREEN_H / 2 - button->h/2 Please mail me at: rosenberger AT snafu DOT de Thanks a lot!