Mercurial > dwindows
changeset 332:7b0f00729a32
Implement switch-page signal for notebooks. Bit of a bug in that it fires
3 times each time you select a notebook page :-(
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 09 Apr 2003 09:43:01 +0000 |
parents | 20def3eaae8d |
children | b6491cefa512 |
files | win/dw.c |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/win/dw.c Wed Apr 09 09:41:34 2003 +0000 +++ b/win/dw.c Wed Apr 09 09:43:01 2003 +0000 @@ -88,7 +88,7 @@ static int in_checkbox_handler = 0; /* List of signals and their equivilent Win32 message */ -#define SIGNALMAX 14 +#define SIGNALMAX 15 SignalList SignalTranslate[SIGNALMAX] = { { WM_SIZE, DW_SIGNAL_CONFIGURE }, @@ -104,7 +104,8 @@ { LBN_SELCHANGE, DW_SIGNAL_LIST_SELECT }, { TVN_SELCHANGED, DW_SIGNAL_ITEM_SELECT }, { WM_SETFOCUS, DW_SIGNAL_SET_FOCUS }, - { WM_VSCROLL, DW_SIGNAL_VALUE_CHANGED } + { WM_VSCROLL, DW_SIGNAL_VALUE_CHANGED }, + { TCN_SELCHANGE, DW_SIGNAL_SWITCH_PAGE } }; #ifdef BUILD_DLL @@ -1574,6 +1575,16 @@ } } } + else if(tmp->message == TCN_SELCHANGE) + { + NMHDR FAR *tem=(NMHDR FAR *)mp2; + if(tmp->window == tem->hwndFrom) + { + int (*switchpagefunc)(HWND, int, void *) = tmp->signalfunction; + int num=TabCtrl_GetCurSel(tem->hwndFrom); + result = switchpagefunc(tem->hwndFrom, num, tmp->data); + } + } } break; case WM_COMMAND: