If what you want is to change the behavior of Ext.Msg
which is an instance of the class Ext.window.MessageBox
you need to make it an instance of your overridden class:
Ext.define('MyMessageBox', {
override: 'Ext.window.MessageBox',
initComponent: function() {
this.callParent();
//your changes here..
}
},function() {
Ext.MessageBox = Ext.Msg = new this();
});
Check out this fiddle where I changed the default padding inside initComponent