I'm moving from OWL. I created a dialog class called TDialog
inheriting from CDialog
and I override the OnWndMsg
to allow OWL event handling to work also beside the MFC. OWL uses Response Table (another form of the message map it is specification for OWL) at the same time I call the base's method CWnd::OnWndMsg
. The problem is that all controls on the dialog aren't visible until the mouse move over them or minimizing the dialog and then restoring it then all controls will be redrawn.
Another problem is that when I click the OK button [Id = IDOK] the dialog is closed but an exception is thrown. I think this is because we processed the message twice so the handle may be closed.
What is the best way to process the message multiple times in a case like this?
The problem was that I was processing the message on OWL and on the same time on MFC set background color message and erase the background also caused the problem when i removed the OWL processing of message the problem was solved, to process the messages in OWL I have 2 solutions now
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.