January 3rd, 2013, 03:43 PM
MFC "The parameter is incorrect"
I know that this issue is fairly common, but it's also fairly vague. I'm having one heck of a time tracking it down, so I was hoping somebody who has seen it before would be able to help. My issue is this:
I have a certain child window that causes these popups. It causes them every time when I first start the program. Then after I open about 10 of the child windows, it stops happening. But the first 10 times I open that window, I get a dialog that says "The parameter is correct". Here are the exact symptoms I'm experiencing:
- I get 3 messages when I first open the window.
- I get more messages ("random" number) whenever I hover over one of the controls on the window (1 CComboBox, 2 CDateTimeCtls and 1 CMFCButton)
- If I don't hover over one of the controller, I won't get any more messages.
- I get 3 messages when closing the window.
- After opening enough of the child windows, it stops happening.
- The error is disrupting program flow, because my window doesn't load completely when it happens.
- Pausing on the message box shows the call stack somewhere in mfc.dll
- No exceptions are thrown.
- The error doesn't happen when running from withing VS. I have to build the application and run it separately. (But it does happen if I run it separately and then attach the VS debugger).
As background info: I'm building an MFC application in Visual Studio 2008 on Windows 7.
From what I can tell, it has to do with one of the MFC controls I'm using, I just can't seem to find which one. Commenting out the controls I see doesn't do anything. It almost seems like a resource error, but everything I read online points to it being an MFC issue.
Any help is much appreciated. Hopefully I've explained it properly.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!