Minimize or Maximize CFWindow

Generally, In pop-up window has a minimize or maximize button but coldfusion cfwindow’s has not it. We need to add after creating cfwindow. How can we done it? Have a look below code.

[code:js] var objWin = ColdFusion.Window.getWindowObject("cfwindowname")
//always expand when opening a window
objWin.expand();
if (!objWin.collapseBtn){
objWin.collapseBtn = objWin.toolbox.createChild({
cls: "x-dlg-collapse"
});
//add a listener for the collapse click
objWin.collapseBtn.on("click",objWin.collapseClick,objWin);
//add the class to swap the image on mouse over
objWin.collapseBtn.addClassOnOver("x-dlg-collapse-over");
} [/code]