Processes the TCN_SELCHANGE notification. hwndDlg - handle to the parent dialog box.
| 655 | // hwndDlg - handle to the parent dialog box. |
| 656 | // |
| 657 | void OnSelChanged(HWND hwndDlg) |
| 658 | { |
| 659 | if (NT31SimplifiedInterface()) |
| 660 | return; |
| 661 | |
| 662 | // Get the dialog header data. |
| 663 | DialogHeader *pHdr = (DialogHeader*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA); |
| 664 | |
| 665 | // Get the index of the selected tab. |
| 666 | int iSel = TabCtrl_GetCurSel(pHdr->hwndTab); |
| 667 | |
| 668 | // Destroy the current child dialog box, if any. |
| 669 | if (pHdr->hwndDisplay != NULL) |
| 670 | DestroyWindow(pHdr->hwndDisplay); |
| 671 | |
| 672 | // Create the new child dialog box. Note that g_hInst is the |
| 673 | // global instance handle. |
| 674 | pHdr->pageNum = iSel; |
| 675 | pHdr->hwndDisplay = CreateDialogIndirect(g_hInstance, (DLGTEMPLATE *)pHdr->apRes[iSel], hwndDlg, OptionsChildDialogProc); |
| 676 | |
| 677 | return; |
| 678 | } |
| 679 | |
| 680 | HRESULT OnPreferenceDialogInit(HWND hWnd) |
| 681 | { |
no outgoing calls
no test coverage detected