windows message box


I’m trying to use the MessageBox function in windows with an OF app. I can get a message to appear fine, but problems arise if I drag the message window around with the mouse - first time I move it the OF window refreshes fine but after that it hangs and the message box copies itself each time it’s moved. This isn’t a big deal but any help would be appreciated - might be my bad coding or possibly something glut specific.

I get a handle to the OF window on setup using code suggested by zach:

void testApp::setup(){  
wnd = WindowFromDC(wglGetCurrentDC());  
// display message box  
MessageBox(wnd, "Failed to load the requested file", "Error",  
                   MB_OK | MB_ICONERROR);  

Any ideas anyone?