/**************************************************************************** * text_OnDestroy * Inputs: * HWND hwnd: * HWND destroy: * Result: void * * Effect: * After forwarding the message to the default procedure, posts a * message to the main window suggesting that it should check for * the proper menu being posted. ****************************************************************************/ static void text_OnDestroy( HWND hwnd) { struct textWindowData *theData; theData = (struct textWindowData *) GetWindowLong(hwnd,GWL_USERDATA); if (theData != NULL) { free(theData); } FORWARD_WM_DESTROY(hwnd, DefMDIChildProc); PostMessage(hMainFrame, UWM_MDI_DESTROY, 0, 0); }
void FAR PASCAL _EXPORT closeTab(HWND hwnd, LPTabData lpTabData) // Destroy all controls inside the tab panel { if (lpTabData) { if (lpTabData->lpTabList && lpTabData->nIndex>=0) FORWARD_WM_DESTROY(hwnd, lpTabData->lpTabList[lpTabData->nIndex].fpDlgProc); EnumChildWindows(hwnd, (WNDENUMPROC)enumChildProc, (LPARAM)GetDlgItem(hwnd, lpTabData->nFrame)); lpTabData->nIndex= -1; } }