Contrary to what CrazyChaosChao111 has said, I would not recommend Game Maker 7. First, games made in Game Maker 6 and up require good 3D acceleration that is DirectX 8-compatible. Not only is this somewhat unfitting for 2D use, it also means a lot of old machines are unable to run those games. Since there is no software renderer, you're pretty much screwed if you don't have dedicated video hardware (not to mention, frameskip isn't exactly built-in, so you get a very slow or choppy game pace on machines that can just barely run the game).
Game Maker also has poor memory management. It takes what seems like ages just to load the resources (it appears to load each resource about three times in total - I'm not entirely sure why, but judging by the load times this seems to be the case). Not only this, but the resources stay in memory until you quit the game. So if you're going to make a large game with lots of media spread across various levels and stages, you can pretty much say goodbye to any computer that has less than 512MB of RAM. Any competent 2D game would only require about 32MB of RAM at any given time.
Finally, starting with Game Maker 7, there is a severe issue with the license that basically states that all the games you make are property of YoYo Games. That's right. They're not even yours. With C/C++ and interface libraries, you have a greater degree of freedom. Allegro is giftware so you can do whatever the hell you want with your game - it's yours (though you are encouraged to give back to the community in some way). SDL has the GPL, which is a bit more restricting but you still retain most of the rights to the software.
If you still want to try Game Maker, I'd suggest version 5. That's the latest version that can still run correctly on most computers. It's no longer being sold, but I suppose you could find some other way to obtain it.