Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Compilling allegro.h & windows.h

This thread is locked; no one can reply to it. rss feed Print
Compilling allegro.h & windows.h
Piotr K
Member #6,864
February 2006

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
Member #2,407
June 2002

Include winalleg.h instead of windows.h.

--
sig used to be here

GullRaDriel
Member #3,861
September 2003
avatar

And include it after including allegro.h

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Piotr K
Member #6,864
February 2006

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
Member #2,407
June 2002

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

--
sig used to be here

ReyBrujo
Moderator
January 2001
avatar

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.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Go to: