Page 1 of 1

What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

Posted: Wed Nov 20, 2019 2:10 pm
by Mungo1981
Dear Community,
And I bet: Dear Doublemax,
Now I have a silly short Question.

What's the declaration,
Something like func( int a, int b);
of Functions to handle EVT_NOTEBOOK_PAGE_CHANGED Events.

I need only this beginning of this function,
and I'm too silly to point this out by my self.

A silly
Mungo1981

Re: What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

Posted: Wed Nov 20, 2019 2:54 pm
by ONEEYEMAN
Hi,
Did you check the notebook sample?

Thank you.

Re: What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

Posted: Wed Nov 20, 2019 3:31 pm
by Mungo1981
Oh sorry,
but I in a stupid Situation.:
I'm not in order to find this sample.:
So can you pleace send me the belonging Line of that Code or the Code as same.
I will be you thankful for ever !!!

Re: What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

Posted: Wed Nov 20, 2019 5:23 pm
by doublemax
The documentation for each class that emits event should have the answer for this question.

E.g. for wxNotebook: https://docs.wxwidgets.org/trunk/classwx_notebook.html
You'll find this near the top:
Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
void handlerFuncName(wxBookCtrlEvent& event)

Event macros for events emitted by this class:

EVT_NOTEBOOK_PAGE_CHANGED(id, func):
The page selection was changed. Processes a wxEVT_NOTEBOOK_PAGE_CHANGED event.
EVT_NOTEBOOK_PAGE_CHANGING(id, func):
The page selection is about to be changed. Processes a wxEVT_NOTEBOOK_PAGE_CHANGING event. This event can be vetoed.
And void handlerFuncName(wxBookCtrlEvent& event) is what you're looking for.