I have just started using the PDFNet C++ SDK. I am using the PDFViewCtrl control to display PDFs and now wish to customise mouse event handling in the display window. To do this I assume that I need to set a custom MouseEventHandler using the PDFViewCtrl method SetCustomEventHandlers(), however everything I have tried has resulted in a compilation error of one type or another.
The basic structure of what I have attempted is:
UInt8 mouseDown(struct MouseEvent* evt, void* custom_data)
// ... Code to handle mouse down events ...
With, in the constructor of a class that inherits from PDFViewCtrl:
EventHandlers* customTools = new EventHandlers();
customTools->mouse_left_down = &mouseDown;
I have tried numerous variations on this basic theme, but without success.
I would be very grateful if someone could point me in the direction of a simple example or code snippet showing the correct way to customise mouse event handling.
Many thanks in advance for your help.