Since you have a fullscreen blackout (Code::Blocks cannot access the entire screen on its own), I suggested it might be that. Try what happens if you turn off Desktop Manager.
Having nVidia Desktop Manager enabled causes all kinds of weird things on my machine (which is otherwise perfectly stable and reliable).
For example, windows open on the wrong display or in ridiculous sizes (~ 100x40), or applications which I certainly never maximise start maximised (or vice versa). To make it more confusing, this happens with some applications (Explorer, Firefox, Gaim, Code::Blocks, Tortoise) but not with all (for example Word, Blender, Thunderbird, and Inkscape are always good). And it is not reproducable either - on some days, it works!
Given the small benefits offered by Desktop Manager and the big inconveniences, I have it always disabled now, and see no problems any more.