MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / OnSelChanged

Function OnSelChanged

src/windows/OptionsDialog.cpp:657–678  ·  view source on GitHub ↗

Processes the TCN_SELCHANGE notification. hwndDlg - handle to the parent dialog box.

Source from the content-addressed store, hash-verified

655// hwndDlg - handle to the parent dialog box.
656//
657void 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
680HRESULT OnPreferenceDialogInit(HWND hWnd)
681{

Callers 2

OnPreferenceDialogInitFunction · 0.85
OptionsOnNotifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected