One of the functions in my DLL takes a while to execute, so I want to add a status box. The code for the status box works great when used within an exe, but crashes when run within the DLL.
In the DLL, I end up with an access violation whenever I try to Create()
my dialog box. My best guess is that it has something to do with the
CWnd that it's trying to use for the parent. When I tried using the
CWnd from AfxGetMainWnd() as the parent, I get the same error. I'm
thinking that this just means that the default parent for any dialog (if
not specified) is the main window of the app -- just what M.S. claims!
Both the application and the DLL are single threaded.
So... How do I get my modeless box to work ?