void WFreeAccelEInfo( WAccelEditInfo *einfo ) { if( einfo != NULL ) { if( einfo->tbl != NULL ) { WFreeAccelTable( einfo->tbl ); einfo->tbl = NULL; } if( einfo->wsb != NULL ) { WDestroyStatusLine( einfo->wsb ); einfo->wsb = NULL; } if( einfo->ribbon != NULL ) { WDestroyRibbon( einfo ); } if( einfo->edit_dlg != (HWND)NULL && IsWindow( einfo->edit_dlg ) ) { DestroyWindow( einfo->edit_dlg ); einfo->edit_dlg = (HWND)NULL; } if( einfo->win != (HWND)NULL && IsWindow( einfo->win ) ) { SET_WNDINFO( einfo->win, 0 ); DestroyWindow( einfo->win ); einfo->win = (HWND)NULL; } if( einfo->file_name != NULL ) { WRMemFree( einfo->file_name ); } WRMemFree( einfo ); } }
void WFreeMenuEInfo( WMenuEditInfo *einfo ) { if( einfo != NULL ) { if( einfo->menu != NULL ) { WFreeMenu( einfo->menu ); einfo->menu = NULL; } if( einfo->wsb != NULL ) { WDestroyStatusLine( einfo->wsb ); einfo->wsb = NULL; } if( einfo->ribbon != NULL ) { WDestroyRibbon( einfo ); } if( einfo->preview_window != (HWND)NULL && IsWindow( einfo->preview_window ) ) { DestroyWindow( einfo->preview_window ); einfo->preview_window = (HWND)NULL; } if( einfo->edit_dlg != (HWND)NULL && IsWindow( einfo->edit_dlg ) ) { DestroyWindow( einfo->edit_dlg ); einfo->edit_dlg = (HWND)NULL; } if( einfo->win != (HWND)NULL && IsWindow( einfo->win ) ) { SetWindowLong( einfo->win, 0, (LONG)0 ); DestroyWindow( einfo->win ); einfo->win = (HWND)NULL; } if( einfo->file_name != NULL ) { WRMemFree( einfo->file_name ); } WRMemFree( einfo ); } }
void WFreeAccelEInfo ( WAccelEditInfo *einfo ) { if ( einfo ) { if ( einfo->tbl ) { WFreeAccelTable ( einfo->tbl ); einfo->tbl = NULL; } if ( einfo->wsb ) { WDestroyStatusLine ( einfo->wsb ); einfo->wsb = NULL; } if ( einfo->ribbon ) { WDestroyRibbon ( einfo ); } if ( ( einfo->edit_dlg != (HWND)NULL ) && IsWindow ( einfo->edit_dlg ) ) { DestroyWindow ( einfo->edit_dlg ); einfo->edit_dlg = (HWND)NULL; } if ( ( einfo->win != (HWND)NULL ) && IsWindow ( einfo->win ) ) { SetWindowLong( einfo->win, 0, (LONG)0 ); DestroyWindow ( einfo->win ); einfo->win = (HWND)NULL; } if ( einfo->file_name ) { WMemFree ( einfo->file_name ); } WMemFree ( einfo ); } }
WStatBar *WCreateStatusLine( HWND parent, HINSTANCE inst ) { WStatBar *wsb; RECT rect; status_block_desc sbd; wsb = (WStatBar *)WMemAlloc( sizeof( WStatBar ) ); if( wsb != NULL ) { wsb->stat = StatusWndStart(); if( wsb->stat == NULL ) { return( NULL ); } } else { return( NULL ); } GetClientRect( parent, &rect ); rect.top = rect.bottom - WStatusDepth; sbd.separator_width = STATUS_LINE_PAD; sbd.width = STATUS1_WIDTH; sbd.width_is_percent = FALSE; sbd.width_is_pixels = TRUE; StatusWndSetSeparators( wsb->stat, 1, &sbd ); if( (wsb->win = StatusWndCreate( wsb->stat, parent, &rect, inst, NULL )) == NULL ) { WDisplayErrorMsg( W_STATUSNOTCREATED ); WDestroyStatusLine( wsb ); return( NULL ); } WSetStatusReadyText( wsb ); GetWindowRect( wsb->win, &rect ); WStatusDepth = rect.bottom - rect.top; return( wsb ); }