During my current job, I was assigned the task of converting a program from MS VC++ to Dev-CPP because my boss wants to get rid of our dependency on MS. After I finished, I found that the program itself worked correctly but no Message Boxes displayed when errors were encountered!

Here is an example of how I used the function...

Code:
// abort imaging if frame trigger is not detected...
if (!ftflag)
{
     MessageBox(NULL, "No frame trigger found...", "Error", MB_OK);
     exit(1);
}
To my knowledge, this should work. But for some reason, no message box pops up at all. The program just skips right over it.

I Tried specifying a window handle, but the same problem still happened.
I also tried creating a external hello world program with the messagebox call, and it worked, but not my internal code...


Note: I made sure the conditions were met so the message box would call. In the example above, i made sure the frame trigger was not connected so the MessageBox would be called. Also, no errors or warnings occur during compiling.

The worst part is, VC++ will show the boxes when i run it through the enviroment, but not mine from dev-cpp.

Does anyone have any idea why this would happen?