Ok... To use CygWin with Code::Blocks, you need to change your Path variable, right? Example: Path=%Path%;C:\CygWin\bin;C:\CygWin\usr\bin.
The problem I've found with this is: CygWin has libraries that clobber the other programs that use the GTK(Gaim, Gimp, etc.). If you don't change your path, C::B won't start, says it can't find mingw.dll(at least on my system). Copying the DLL to multiple directories makes upgrading, and maintaining, a pain.
My solution: use windows scripting
File: \Program Files\CodeBlocks\codeblocks.js
var shell=WScript.CreateObject("WScript.Shell");
var penv=shell.Environment("PROCESS");
var senv=shell.Environment("SYSTEM");
penv("PATH") = senv("PATH") + ";C:\\cygwin\\bin;C:\\cygwin\\usr\\bin";
shell.Run("codeblocks.exe");
This script will set the path variable just for C::B to include the cygwin directory. It imports your systems Path also. This could also be used in conjunction with MinGW.