What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Mungo1981
Experienced Solver
Experienced Solver
Posts: 86
Joined: Wed Jan 30, 2019 5:42 pm

What is the Correct Begining of a Function tio handle EVT_NOTEBOOK_PAGE_CHANGED

Post 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
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

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

Post by ONEEYEMAN »

Hi,
Did you check the notebook sample?

Thank you.
Mungo1981
Experienced Solver
Experienced Solver
Posts: 86
Joined: Wed Jan 30, 2019 5:42 pm

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

Post 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 !!!
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

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

Post 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.
Use the source, Luke!
Post Reply