When I run the program, I get an error message (the error code 0050 with GetLastError() returning 87 -- this error message is "The parameter is incorrect." when looked up). I don't understand what is wrong with it. If you can tell me, then please let me know!

Thanks,
Tyouk

01-02-2005

andyhunter

RegWndClassEx - ??

Is this a custom function? Or is it some MFC thing I don't know about.

Additionally all three spots where your program cites an error displays the exact same message. Why don't you change it up so you know which line is failing?

[edit]

Seriously though, RegWndClassEx. Someone enlighten me here.

[/edit]

01-02-2005

tyouk

RegWndClassEx is a custom function. And the error messages do not all say the same thing. Each line with an error code is one number off (at least) followed by a number produced by GetLastError() and so you would never get the exact same message as long as it's not the same bit of code thats failing. The line thats failing is the error code 0050 (those others on this section of code is 0051 and 0052... not the same lines). The entire message I get (error message that is) is as follows:

"Could not initialize Expense module. (Error Code: 0050; 87)"

87 is the error code being left by GetLastError() and when I use the Error Lookup Tool in MSVC, I get the message "The parameter is incorrect." Although I wish I knew which parameter was incorrect. Any ideas?

This btw is a second window trying to be created. My main window is created in the WinMain where as this window is being created when a user clicks a button on the main windows. Could this be the reason why I am getting this error?