Dev-C++ / Code::Blocks are just IDE... for Dev-C++ it is MinGW powered, and Code::Blocks allows you to use a range of compilers, though I believe most also use MinGW.

HyperCreep while coding without an IDE has its merits (Kinda), once you get used to the features of an IDE your productivity will most likely increase. I prefer Code::Blocks myself, as it is light, but powerful and full of features.

But to answer the questions, yeah, you can use a command line compiler to compile Win32 projects. In most cases IDEs use a command line compiler in the background of their fancy GUI.