I am migrating my application from OWLNEXT 6.32.5 to OWLNEXT 7. I now have a LOT of compile errors where I previously had none! I guess I need to work through them one at a time....Here's the first one:
I have a response table in a Class derived from TFrameWindow. It looks like this :
This is the virtual function called by EvPaint, and its signature should not be changed (it is still not const-correct due to compatibility issues). EvPaint is the event handler for WM_PAINT, and as you can see in the link provided, it has no parameters.
I am migrating my application from OWLNEXT 6.32.5 to OWLNEXT 7. I now have a LOT of compile errors where I previously had none! I guess I need to work through them one at a time....Here's the first one:
I have a response table in a Class derived from TFrameWindow. It looks like this :
The compiler doesn't like any of the four EV_WM_XXXXXXX lines. here is the error message I get for the first one:
Any help appreciated!
Moderator: Formatted post.
Last edit: Vidar Hasfjord 2022-07-21
See Upgrading from OWL | Message dispatch overhaul and FAQ.
Note the differences highlighted by me in bold. Event handler signatures are now const-correct.
Forgive my ignorance, but I don't understand what you are saying. I can see the difference, but how do I fix this? It used to compile fine.
My handler declaration looks like this:
void EvLButtonDown(UINT modKeys, TPoint& point);
Should I change it somehow?
Moderator: Consolidated and formatted post.
Last edit: Vidar Hasfjord 2022-07-21
You need to add "const" to the last parameter in your event handler, as follows:
void HorizonPlotWindow::EvLButtonDown(uint modKeys, const TPoint& point)
The following FAQ entry explains the const-correctness issue:
FAQ | Why is everything now const, and how can I be const-correct?
Last edit: Vidar Hasfjord 2022-07-21
OK, that fixes most of them, many thanks....but the EV_WM_PAINT isn't happy. I changed it from
void Paint(TDC& dc, bool erase, TRect& clip);
to
void Paint(TDC& dc, bool erase, const TRect& clip);
but it still doesn't like it.
Moderator: Formatted post.
Last edit: Vidar Hasfjord 2022-07-21
This is the virtual function called by EvPaint, and its signature should not be changed (it is still not const-correct due to compatibility issues). EvPaint is the event handler for WM_PAINT, and as you can see in the link provided, it has no parameters.
You can look up correct signatures for event handlers in the OWLNext API Documentation.
Last edit: Vidar Hasfjord 2022-07-21
OK, thank you!