static Bool WInitEditWindow( WMenuEditInfo *einfo ) { HWND lbox; Bool ok; ok = (einfo != NULL && einfo->edit_dlg != NULL); if( ok ) { ok = WSetEditWinResName( einfo ); } if( ok ) { ok = WInitEditWindowListBox( einfo ); } if( ok ) { WSetEditWindowControls( einfo, einfo->menu->first_entry ); if( einfo->menu->first_entry != NULL ) { ok = WSetEditWindowMenuEntry( einfo, einfo->menu->first_entry ); if( ok ) { lbox = GetDlgItem( einfo->edit_dlg, IDM_MENUEDLIST ); ok = (SendMessage( lbox, LB_SETCURSEL, 0, 0 ) != LB_ERR); einfo->current_entry = einfo->menu->first_entry; einfo->current_pos = 0; } } else { CheckDlgButton( einfo->edit_dlg, IDM_MENUEDPOPUP, TRUE ); } } return( ok ); }
static bool WInitEditWindow( WAccelEditInfo *einfo ) { HWND lbox; bool ok; ok = (einfo != NULL && einfo->edit_dlg != NULL); if( ok ) { ok = WSetEditWinResName( einfo ); } if( ok ) { ok = WInitEditWindowListBox( einfo ); } if( ok ) { if( einfo->tbl->first_entry != NULL ) { ok = WSetEditWindowKeyEntry( einfo, einfo->tbl->first_entry ); if( ok ) { lbox = GetDlgItem( einfo->edit_dlg, IDM_ACCEDLIST ); ok = (SendMessage( lbox, LB_SETCURSEL, 0, 0 ) != LB_ERR); einfo->current_entry = einfo->tbl->first_entry; einfo->current_pos = 0; } } } return( ok ); }
void WHandleRename( WMenuEditInfo *einfo ) { if( einfo != NULL ) { WSetStatusByID( einfo->wsb, W_RENAMINGMENU, -1 ); einfo->info->modified |= WRenameResource( einfo->win, &einfo->info->res_name, WMenuHelpRoutine ); WSetEditWinResName( einfo ); WSetStatusReadyText( einfo->wsb ); } }