Bool WCreateMenuEditWindow( WMenuEditInfo *einfo, HINSTANCE inst ) { einfo->edit_dlg = JCreateDialogParam( inst, "WMenuEditDLG", einfo->win, WMenuEditWinProc, (LPARAM)einfo ); if( einfo->edit_dlg == (HWND)NULL ) { return( FALSE ); } if( !WCreatePrevWindow( inst, einfo ) ) { return( FALSE ); } SetWindowPos( einfo->edit_dlg, (HWND)NULL, 0, WGetRibbonHeight(), 0, 0, SWP_NOSIZE | SWP_NOZORDER ); return( WInitEditWindow( einfo ) ); }
bool WCreateAccelEditWindow( WAccelEditInfo *einfo, HINSTANCE inst ) { int tabstop; einfo->edit_dlg = JCreateDialogParam( inst, "WAccelEditDLG", einfo->win, WAccelEditWinProc, (LPARAM)einfo ); if( einfo->edit_dlg == (HWND)NULL ) { return( FALSE ); } tabstop = 85; SendDlgItemMessage( einfo->edit_dlg, IDM_ACCEDLIST, LB_SETTABSTOPS, (WPARAM)1, (LPARAM)&tabstop ); SetWindowPos( einfo->edit_dlg, (HWND)NULL, 0, WGetRibbonHeight(), 0, 0, SWP_NOSIZE | SWP_NOZORDER ); return( WInitEditWindow( einfo ) ); }
Bool WResizeMenuEditWindow( WMenuEditInfo *einfo, RECT *prect ) { int width, height, ribbon_depth; HWND win; RECT crect; if( einfo == NULL || einfo->edit_dlg == NULL || prect == NULL ) { return( FALSE ); } if( einfo->show_ribbon ) { ribbon_depth = WGetRibbonHeight(); } else { ribbon_depth = 0; } width = prect->right - prect->left; height = prect->bottom - prect->top - ribbon_depth - WGetStatusDepth(); /* change the size of the divider */ win = GetDlgItem( einfo->edit_dlg, IDM_MENUEDBLACKLINE ); GetWindowRect( win, &crect ); SetWindowPos( win, (HWND)NULL, 0, 0, width, crect.bottom - crect.top, SWP_NOMOVE | SWP_NOZORDER ); // change the size of the resource name edit field win = GetDlgItem( einfo->edit_dlg, IDM_MENUEDRNAME ); WExpandEditWindowItem( einfo->edit_dlg, win, prect ); // change the size of the listbox win = GetDlgItem( einfo->edit_dlg, IDM_MENUEDLIST ); WExpandEditWindowItem( einfo->edit_dlg, win, prect ); SetWindowPos( einfo->edit_dlg, (HWND)NULL, 0, ribbon_depth, width, height, SWP_NOZORDER ); // change the size of the preview window WExpandEditWindowItem( einfo->edit_dlg, einfo->preview_window, prect ); return( TRUE ); }