Archived

This topic is now archived and is closed to further replies.

Window with UNDEFINED window proc

This topic is 5585 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, everybody! I have a .DLL with 2 exported functions - Show and Hide. The first shows a dialog and the second - hides it. It is a very simple mechanism. I have written a test MFC application wich uses this .DLL. Everything works alright. But this .DLL is planned to be part of a real project. And here are the problems. This time the test MFC application is more complicated MFC application which shows and hides the dialog from the .DLL. But no WM_PAINT, WM_TIMER and so on messages are sent to the dialog. I used Spy++, located my dialog and in the window properties I saw: "Window proc: (undefined)". With Spy++ I saw that no messages are sent to my dialog. What''s the difference between the test MFC application and the real project? Is the presence of some worker threads in the project could be the problem? Any advice? Ivan.

Share this post


Link to post
Share on other sites
I created the dialog with Class Wizard and predefined the WM_PAINT and WM_TIMER messages. I create the dialog in this way:

//CODE
CMyDlg m_dlg;
dlg.Create(IDD_MY_DIALOG);
//CODE END

I don''t know where is the dialog procedure. May be in MFC42.DLL.

Share this post


Link to post
Share on other sites
I tried to create the window without MFC by filling WNDCLASS structure, passing it to RegisterClass and creating the window. I put my own window procedure and the result is the same: Window proc: (UNAVAILABLE). (not ''undefined'' as I wrote above -mistake). No messages come to my window procedure. Now it is sure that the window procedure is in the .DLL


P.S.: Excuse my English, it is not my first language.

Best wishes, Ivan.

Share this post


Link to post
Share on other sites