Compilling allegro.h & windows.h
Piotr K

Hi,

my program is using both allegro.h and windows.h, but during compilling
it i'm getting a lot of errors like "conflicts with previous
declaration typedef struct BITMAP BITMAP". Problem is only with BITMAP
type... How can i compile this??

Greets,
peter_k

miran

Include winalleg.h instead of windows.h.

GullRaDriel

And include it after including allegro.h

Piotr K

Thanks a lot!

I'm using in my program something like

rgb = GetPixel(g_hdcEkran, x, y);

to get any pixel from the whole screen. But everything is ok only when my program is active. When it is inactive it is pausing here... How can i make my program to getting pixels every time? I'm using Dev-C++

miran

RT(F)M: int set_display_switch_mode(int mode);

ReyBrujo

set_display_switch_mode

You should try both, first SWITCH_BACKGROUND and if it doesn't work, SWITCH_BACKAMNESIA, since some operative systems support one and others, the other.

Thread #565214. Printed from Allegro.cc